[lkml]   [2004]   [Aug]   [14]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
Messages in this thread
Patch in this message
SubjectRe: [patch] voluntary-preempt-2.6.8-rc4-O7

* Lee Revell <> wrote:

> In some of the traces, like this one:
> there are calls to voluntary_resched. How is this possible? Does it
> mean that we called voluntary_resched while holding a spinlock, where
> we needed to call voluntary_preempt_lock(&foo_lock), and thus failed
> to reschedule?

voluntary_resched() was probably called as part of the might_sleep_if()
done in mm/slab.c. If you have CONFIG_DEBUG_SPINLOCK_SLEEP enabled then
the kernel should have complained about 'Debug: sleeping function ...'.
but what i think happened here is that reiserfs still uses
lock_kernel()/unlock_kernel() quite alot (eg. ext3 or xfs doesnt), which
from a preemptability POV is just as much of a critical section as a
spinlock, but processes can sleep (the scheduler auto-releases and
auto-reacquires the big kernel lock).


--- linux/kernel/sched.c.orig
+++ linux/kernel/sched.c
@@ -3210,11 +3210,11 @@ __setup("voluntary-preempt=", voluntary_

int __sched voluntary_resched(void)
- if (kernel_preemption || !voluntary_preemption)
- return 0;
__might_sleep(__FILE__, __LINE__);
+ if (kernel_preemption || !voluntary_preemption)
+ return 0;
* The system_state check is somewhat ugly but we might be
* called during early boot when we are not yet ready to reschedule.
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to
More majordomo info at
Please read the FAQ at
 \ /
  Last update: 2005-03-22 14:05    [from the cache]
©2003-2014 Jasper Spaans. hosted at Digital Ocean