lkml.org 
[lkml]   [2013]   [Mar]   [18]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
/
SubjectRe: workqueue code needing preemption disabled
From
Date
On Mon, 2013-03-18 at 12:23 -0400, Steven Rostedt wrote:

> > Maybe I'm confused but I can't really see how the above would be a
> > problem to workqueue in itself. Both rq->lock and gcwq->lock are
> > irq-safe, so spin_lock() not disabling preemption shouldn't be a
> > problem. Are CPU hotplug operations involved?
>
> No CPU hotplug is involved here. But I will note that gcwq->lock in -rt
> is not irq -safe. That is, in rt the spin_lock_irq(&gcwq->lock) really
> becomes a special "mutex_lock(&gcwq->lock)".

IOW, what can happen in -rt here is:

spin_lock_irq(&gcwq->lock);
[...]
<interrupt>
-> preempt_schedule();
schedule();
try_to_wake_up_local();

[...]
spin_unlock_irq(&gcwq->lock);

Again, with -rt, spin_lock_irq() does not prevent interrupts nor
preemption.

-- Steve




\
 
 \ /
  Last update: 2013-03-18 18:01    [W:0.083 / U:3.428 seconds]
©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site