* PREEMP_ACTIVE in cond_resched
@ 2007-02-22 3:00 Dong Feng
0 siblings, 0 replies; only message in thread
From: Dong Feng @ 2007-02-22 3:00 UTC (permalink / raw)
To: linux-kernel
cond_resched() checks and conditionally sets PREEMPT_ACTIVE flag for
the current task. The comments says,
/*
* The BKS might be reacquired before we have dropped
* PREEMPT_ACTIVE, which could trigger a second
* cond_resched() call.
*/
My understanding is that cond_resched() would be indirectly invoked
twice recursively, through the following path,
cond_resched() -> schedule() -> reacquire_kernel_lock() -> down() ->
might_sleep() -> might_resched() -> cond_resched().
However, the above path is possible only in a voluntary-preemptive
kernel. In a full-preemptive kernel, I do not find any possible path
to cause recursive cond_resched(). Does that mean we can actually
remove the check and setting of PREEMPT_ACTIVE for a full-preemptive
kernel?
^ permalink raw reply [flat|nested] only message in thread
only message in thread, other threads:[~2007-02-22 3:00 UTC | newest]
Thread overview: (only message) (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2007-02-22 3:00 PREEMP_ACTIVE in cond_resched Dong Feng
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.