From: Andrew Morton <akpm@linux-foundation.org>
To: "Lukáš Czerner" <lczerner@redhat.com>
Cc: linux-kernel@vger.kernel.org, linux-raid@vger.kernel.org,
axboe@kernel.dk, jmoyer@redhat.com, Neil Brown <neilb@suse.de>
Subject: Re: [PATCH 1/2 v3] wait: add wait_event_lock_irq() interface
Date: Fri, 30 Nov 2012 12:13:08 -0800 [thread overview]
Message-ID: <20121130121308.54d66bfe.akpm@linux-foundation.org> (raw)
In-Reply-To: <alpine.LFD.2.00.1211301233320.8688@dhcp-1-104.brq.redhat.com>
On Fri, 30 Nov 2012 12:36:35 +0100 (CET)
Lukáš Czerner <lczerner@redhat.com> wrote:
> On Fri, 30 Nov 2012, Andrew Morton wrote:
>
> > Date: Fri, 30 Nov 2012 02:48:42 -0800
> > From: Andrew Morton <akpm@linux-foundation.org>
> > To: Lukas Czerner <lczerner@redhat.com>
> > Cc: linux-kernel@vger.kernel.org, linux-raid@vger.kernel.org, axboe@kernel.dk,
> > jmoyer@redhat.com, Neil Brown <neilb@suse.de>,
> > David Howells <dhowells@redhat.com>, Ingo Molnar <mingo@elte.hu>,
> > Peter Zijlstra <a.p.zijlstra@chello.nl>
> > Subject: Re: [PATCH 1/2 v3] wait: add wait_event_lock_irq() interface
> >
> > On Fri, 30 Nov 2012 11:42:40 +0100 Lukas Czerner <lczerner@redhat.com> wrote:
> >
> > > New wait_event{_interruptible}_lock_irq{_cmd} macros added. This commit
> > > moves the private wait_event_lock_irq() macro from MD to regular wait
> > > includes, introduces new macro wait_event_lock_irq_cmd() instead of using
> > > the old method with omitting cmd parameter which is ugly and makes a use
> > > of new macros in the MD. It also introduces the _interruptible_ variant.
> > >
> > > The use of new interface is when one have a special lock to protect data
> > > structures used in the condition, or one also needs to invoke "cmd"
> > > before putting it to sleep.
> > >
> > > All new macros are expected to be called with the lock taken. The lock
> > > is released before sleep and is reacquired afterwards. We will leave the
> > > macro with the lock held.
> > >
> > > Note to DM: IMO this should also fix theoretical race on waitqueue while
> > > using simultaneously wait_event_lock_irq() and wait_event() because of
> > > lack of locking around current state setting and wait queue removal.
> >
> > Does this fix the sparse warning which Fengguang just sent us?
>
> Which report from Fengguang do you have in mind ? I do not see any
> on linux-kernel today.
>
> /me going to see what spare reports
>
On Fri, 30 Nov 2012 16:30:24 +0800
kbuild test robot <fengguang.wu@intel.com> wrote:
> tree: git://git.kernel.org/pub/scm/linux/kernel/git/next/linux-next.git akpm
> head: cfb65dadcd079ad4547407a1584bc6b96bd48bb3
> commit: 2b29cdb6f98c86a1da4ec5335d6247392b7c6551 [35/476] wait: add wait_event_lock_irq() interface
>
>
> sparse warnings:
>
> + drivers/block/drbd/drbd_int.h:2339:9: sparse: preprocessor token __wait_event_lock_irq redefined
> include/linux/wait.h:554:9: this was the original definition
> + drivers/block/drbd/drbd_int.h:2358:9: sparse: preprocessor token wait_event_lock_irq redefined
> include/linux/wait.h:621:9: this was the original definition
> drivers/block/drbd/drbd_interval.h:12:63: sparse: dubious one-bit signed bitfield
> drivers/block/drbd/drbd_interval.h:13:22: sparse: dubious one-bit signed bitfield
> drivers/block/drbd/drbd_int.h:903:39: sparse: attribute 'require_context': unknown attribute
> drivers/block/drbd/drbd_int.h:1123:69: sparse: attribute 'require_context': unknown attribute
> drivers/block/drbd/drbd_int.h:1124:70: sparse: attribute 'require_context': unknown attribute
> drivers/block/drbd/drbd_int.h:1125:59: sparse: attribute 'require_context': unknown attribute
> drivers/block/drbd/drbd_int.h:1126:63: sparse: attribute 'require_context': unknown attribute
> drivers/block/drbd/drbd_int.h:1127:60: sparse: attribute 'require_context': unknown attribute
> drivers/block/drbd/drbd_int.h:1128:71: sparse: attribute 'require_context': unknown attribute
> drivers/block/drbd/drbd_int.h:1129:65: sparse: attribute 'require_context': unknown attribute
> drivers/block/drbd/drbd_int.h:1130:66: sparse: attribute 'require_context': unknown attribute
> drivers/block/drbd/drbd_int.h:1335:74: sparse: attribute 'require_context': unknown attribute
> drivers/block/drbd/drbd_int.h:1336:50: sparse: attribute 'require_context': unknown attribute
> drivers/block/drbd/drbd_int.h:1338:51: sparse: attribute 'require_context': unknown attribute
> drivers/block/drbd/drbd_int.h:1339:58: sparse: attribute 'require_context': unknown attribute
> drivers/block/drbd/drbd_int.h:1340:54: sparse: attribute 'require_context': unknown attribute
> drivers/block/drbd/drbd_int.h:1341:62: sparse: attribute 'require_context': unknown attribute
> drivers/block/drbd/drbd_int.h:1435:92: sparse: attribute 'require_context': unknown attribute
next prev parent reply other threads:[~2012-11-30 20:13 UTC|newest]
Thread overview: 8+ messages / expand[flat|nested] mbox.gz Atom feed top
2012-11-30 10:42 [PATCH 1/2 v3] wait: add wait_event_lock_irq() interface Lukas Czerner
2012-11-30 10:42 ` [PATCH 2/2 v6] loop: Limit the number of requests in the bio list Lukas Czerner
2012-11-30 13:57 ` Jeff Moyer
2012-11-30 10:48 ` [PATCH 1/2 v3] wait: add wait_event_lock_irq() interface Andrew Morton
2012-11-30 11:36 ` Lukáš Czerner
2012-11-30 20:13 ` Andrew Morton [this message]
2012-12-03 9:21 ` Lukáš Czerner
2012-11-30 21:43 ` Andrew Morton
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=20121130121308.54d66bfe.akpm@linux-foundation.org \
--to=akpm@linux-foundation.org \
--cc=axboe@kernel.dk \
--cc=jmoyer@redhat.com \
--cc=lczerner@redhat.com \
--cc=linux-kernel@vger.kernel.org \
--cc=linux-raid@vger.kernel.org \
--cc=neilb@suse.de \
/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).