Re: [PATCH for 2.5] preemptible kernel

Keith Owens
2001-03-20T09:33:20Z

On Tue, 20 Mar 2001 19:43:50 +1100,
Rusty Russell <rusty@rustcorp.com.au> wrote:
>The third is that preemtivity conflicts with the naive
>quiescent-period approach proposed for module unloading in 2.5, and
>useful for several other things (eg. hotplugging CPUs). This method
>relies on knowing that when a schedule() has occurred on every CPU, we
>know noone is holding certain references.
>
>This, too, is soluble, but it means that synchronize_kernel() must
>guarantee that each task which was running or preempted in kernel
>space when it was called, has been non-preemtively scheduled before
>synchronize_kernel() can exit. Icky.

The preemption patch only allows preemption from interrupt and only for
a single level of preemption. That coexists quite happily with
synchronize_kernel() which runs in user context. Just count user
context schedules (preempt_count == 0), not preemptive schedules.