diff options
author | Ingo Molnar <mingo@elte.hu> | 2011-07-01 13:20:51 +0200 |
---|---|---|
committer | Ingo Molnar <mingo@elte.hu> | 2011-07-01 13:20:51 +0200 |
commit | 1ecc818c51b1f6886825dae3885792d5e49ec798 (patch) | |
tree | 2179ae53fa86ea6a42d01ff4efc1a3f6a32e76f2 /kernel | |
parent | 1c09ab0d257317f97e8629a3d0c8713d6dd9de4c (diff) | |
parent | d902db1eb60387040fe541573083e47469db50ac (diff) | |
download | linux-1ecc818c51b1f6886825dae3885792d5e49ec798.tar.gz linux-1ecc818c51b1f6886825dae3885792d5e49ec798.tar.bz2 linux-1ecc818c51b1f6886825dae3885792d5e49ec798.zip |
Merge branch 'sched/core-v2' of git://git.kernel.org/pub/scm/linux/kernel/git/frederic/random-tracing into sched/core
Diffstat (limited to 'kernel')
-rw-r--r-- | kernel/Kconfig.preempt | 3 | ||||
-rw-r--r-- | kernel/sched.c | 6 |
2 files changed, 5 insertions, 4 deletions
diff --git a/kernel/Kconfig.preempt b/kernel/Kconfig.preempt index bf987b95b356..24e7cb0ba26a 100644 --- a/kernel/Kconfig.preempt +++ b/kernel/Kconfig.preempt @@ -35,6 +35,7 @@ config PREEMPT_VOLUNTARY config PREEMPT bool "Preemptible Kernel (Low-Latency Desktop)" + select PREEMPT_COUNT help This option reduces the latency of the kernel by making all kernel code (that is not executing in a critical section) @@ -52,3 +53,5 @@ config PREEMPT endchoice +config PREEMPT_COUNT + bool
\ No newline at end of file diff --git a/kernel/sched.c b/kernel/sched.c index e355ee72e83f..4380a80c1e7a 100644 --- a/kernel/sched.c +++ b/kernel/sched.c @@ -2854,7 +2854,7 @@ void sched_fork(struct task_struct *p) #if defined(CONFIG_SMP) p->on_cpu = 0; #endif -#ifdef CONFIG_PREEMPT +#ifdef CONFIG_PREEMPT_COUNT /* Want to start with kernel preemption disabled. */ task_thread_info(p)->preempt_count = 1; #endif @@ -8022,7 +8022,7 @@ void __init sched_init(void) scheduler_running = 1; } -#ifdef CONFIG_DEBUG_SPINLOCK_SLEEP +#ifdef CONFIG_DEBUG_ATOMIC_SLEEP static inline int preempt_count_equals(int preempt_offset) { int nested = (preempt_count() & ~PREEMPT_ACTIVE) + rcu_preempt_depth(); @@ -8032,7 +8032,6 @@ static inline int preempt_count_equals(int preempt_offset) void __might_sleep(const char *file, int line, int preempt_offset) { -#ifdef in_atomic static unsigned long prev_jiffy; /* ratelimiting */ if ((preempt_count_equals(preempt_offset) && !irqs_disabled()) || @@ -8054,7 +8053,6 @@ void __might_sleep(const char *file, int line, int preempt_offset) if (irqs_disabled()) print_irqtrace_events(current); dump_stack(); -#endif } EXPORT_SYMBOL(__might_sleep); #endif |