lkml.org 
[lkml]   [2003]   [Nov]   [9]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
/
SubjectRe: preemption when running in the kernel
From
Date
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@vger.kernel.org
More majordomo info at http://vger.kernel.org/majordomo-info.html
Please read the FAQ at http://www.tux.org/lkml/

\
 
 \ /
  Last update: 2005-03-22 13:58    [W:0.028 / U:0.964 seconds]
©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site