lkml.org 
[lkml]   [2015]   [Feb]   [1]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
Patch in this message
/
Date
From
SubjectRe: __might_sleep() warnings on v3.19-rc6

(high-jacking the thread a bit... I don't have the patch that I want to reply
to still in my mail box: the subject still matches...)

I just got a might-sleep warning in my own testing.
This was introduced by

commit e22b886a8a43b147e1994a9f970f678fc0df2033
Author: Peter Zijlstra <peterz@infradead.org>
Date: Wed Sep 24 10:18:48 2014 +0200

sched/wait: Add might_sleep() checks


In particular:

@@ -318,6 +320,7 @@ do {
*/
#define wait_event_cmd(wq, condition, cmd1, cmd2) \
do { \
+ might_sleep(); \
if (condition) \
break; \
__wait_event_cmd(wq, condition, cmd1, cmd2); \

Where I call this in raid5_quiesce(), 'cmd1' releases a lock and enables
interrupts and cmd2 takes the lock and disables interrupts.

So it is perfectly OK to sleep at the point where schedule is called, but not
at the point where wait_event_cmd is called.

I can't use wait_event_lock_irq_cmd() as there are actually several spinlocks
I need to manipulate.

So I'm hoping that this part of the patch (at least) can be reverted.

Otherwise I guess I'll need to use __wait_event_cmd().

Thanks,
NeilBrown
[unhandled content-type:application/pgp-signature]
\
 
 \ /
  Last update: 2015-02-02 06:41    [W:0.095 / U:0.268 seconds]
©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site