lkml.org 
[lkml]   [2013]   [May]   [3]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
/
Date
From
SubjectRe: [PATCH RT] sched/workqueue: Only wake up idle workers if not blocked on sleeping spin lock
* Steven Rostedt | 2013-03-18 15:12:49 [-0400]:

>In -rt, most spin_locks() turn into mutexes. One of these spin_lock
>conversions is performed on the workqueue gcwq->lock. When the idle
>worker is worken, the first thing it will do is grab that same lock and
>it too will block, possibly jumping into the same code, but because
>nr_running would already be decremented it prevents an infinite loop.
>
>But this is still a waste of CPU cycles, and it doesn't follow the method
>of mainline, as new workers should only be woken when a worker thread is
>truly going to sleep, and not just blocked on a spin_lock().
>
>Check the saved_state too before waking up new workers.
>
>Signed-off-by: Steven Rostedt <rostedt@goodmis.org>

Taking for v3.8-rt.

Sebastian


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