Re: preemption when running in the kernel
From: Robert Love
Date: Sun Nov 09 2003 - 12:57:29 EST
On Sun, 2003-11-09 at 05:04, Frank Cusack wrote:
> Thank you for the clarification.
No problem.
> That leads me to 2 followup questions.
>
> If a task in the kernel is preempted, is a membar issued? (I believe
> so -- running another task means that the scheduler must have run,
> which will grab and release various locks thus giving us the membars.)
Yes, a memory barrier is definitely issued.
> When the preempted task resumes, is it guaranteed to run on the same CPU?
> (I wouldn't expect so, unless the task was specifically told to do that
> via hard affinity. But maybe a task preempted in the kernel is different
> then a task preempted in userland.)
No. A preempted task can reschedule on any processor.
Robert Love
-
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@xxxxxxxxxxxxxxx
More majordomo info at http://vger.kernel.org/majordomo-info.html
Please read the FAQ at http://www.tux.org/lkml/