[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <20150202155843.5991a10c@notabene.brown>
Date: Mon, 2 Feb 2015 15:58:43 +1100
From: NeilBrown <neilb@...e.de>
To: Peter Zijlstra <peterz@...radead.org>
Cc: Fengguang Wu <fengguang.wu@...el.com>, LKP <lkp@...org>,
linux-kernel@...r.kernel.org, linux-fsdevel@...r.kernel.org,
Shaohua Li <shli@...nel.org>,
Dan Williams <dan.j.williams@...el.com>,
"linux-btrfs@...r.kernel.org" <linux-btrfs@...r.kernel.org>,
Ingo Molnar <mingo@...nel.org>,
Linus Torvalds <torvalds@...ux-foundation.org>
Subject: Re: __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@...radead.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
Content of type "application/pgp-signature" skipped
Powered by blists - more mailing lists