lkml.org 
[lkml]   [2014]   [Oct]   [1]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
/
Date
From
SubjectRe: [PATCH 10/11] sched: Debug nested sleeps
On Tue, Sep 30, 2014 at 11:47:32PM +0200, Oleg Nesterov wrote:

> > > This is minor, but this way CONFIG_DEBUG_ATOMIC_SLEEP will not imply
> > > a subtle behavioural change.
> >
> > You mean the __set_current_state() that's extra?
>
> Yes, and note that it only does __set_current_state(RUNNING) if
> CONFIG_DEBUG_ATOMIC_SLEEP. This means that disabling/enabling this
> option can, silently hide/uncover a bug.
>
> > I would actually argue
> > to keep that since it makes the 'problem' much worse.
>
> OK, I won't insist, but could you explain why the suggested change can
> make the problem (and which problem ;) worse?

Sure, so the trivial problem is not actually going to sleep in the outer
wait primitive because the inner wait primitive reset ->state to
TASK_RUNNING.

So by always setting the ->state to TASK_RUNNING it never goes to sleep
and it'll revert to spinning, causing spikes in CPU usage that should
hopefully be far easier to notice than the occasional funny.


\
 
 \ /
  Last update: 2014-10-01 18:41    [W:0.750 / U:0.172 seconds]
©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site