From: NeilBrown <neilb@suse.de>
To: Peter Zijlstra <peterz@infradead.org>
Cc: Fengguang Wu <fengguang.wu@intel.com>, LKP <lkp@01.org>,
linux-kernel@vger.kernel.org, linux-fsdevel@vger.kernel.org,
Shaohua Li <shli@kernel.org>,
Dan Williams <dan.j.williams@intel.com>,
"linux-btrfs@vger.kernel.org" <linux-btrfs@vger.kernel.org>,
Ingo Molnar <mingo@kernel.org>,
Linus Torvalds <torvalds@linux-foundation.org>
Subject: Re: __might_sleep() warnings on v3.19-rc6
Date: Mon, 2 Feb 2015 15:58:43 +1100 [thread overview]
Message-ID: <20150202155843.5991a10c@notabene.brown> (raw)
In-Reply-To: <20150202100338.4fa9eefa@notabene.brown>
[-- Attachment #1: Type: text/plain, Size: 1484 bytes --]
(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
[-- Attachment #2: OpenPGP digital signature --]
[-- Type: application/pgp-signature, Size: 811 bytes --]
next prev parent reply other threads:[~2015-02-02 4:58 UTC|newest]
Thread overview: 6+ messages / expand[flat|nested] mbox.gz Atom feed top
[not found] <20141028142541.GA19097@wfg-t540p.sh.intel.com>
2015-02-01 3:43 ` __might_sleep() warnings on v3.19-rc6 Fengguang Wu
2015-02-01 23:03 ` NeilBrown
2015-02-02 4:58 ` NeilBrown [this message]
2015-02-02 5:08 ` Linus Torvalds
2015-02-02 6:09 ` NeilBrown
2015-02-05 16:16 ` Chris Mason
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=20150202155843.5991a10c@notabene.brown \
--to=neilb@suse.de \
--cc=dan.j.williams@intel.com \
--cc=fengguang.wu@intel.com \
--cc=linux-btrfs@vger.kernel.org \
--cc=linux-fsdevel@vger.kernel.org \
--cc=linux-kernel@vger.kernel.org \
--cc=lkp@01.org \
--cc=mingo@kernel.org \
--cc=peterz@infradead.org \
--cc=shli@kernel.org \
--cc=torvalds@linux-foundation.org \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).