From: Kent Overstreet <kmo@daterainc.com>
To: Alexander Gordeev <agordeev@redhat.com>
Cc: Oleg Nesterov <oleg@redhat.com>, Jens Axboe <axboe@kernel.dk>,
"Nicholas A. Bellinger" <nab@linux-iscsi.org>,
linux-kernel@vger.kernel.org
Subject: Re: [PATCH 1/5] percpu_ida: Fix data race on cpus_have_tags cpumask
Date: Mon, 28 Oct 2013 14:20:54 -0700 [thread overview]
Message-ID: <20131028212054.GF8153@kmo> (raw)
In-Reply-To: <20131028100505.GB5744@dhcp-26-207.brq.redhat.com>
On Mon, Oct 28, 2013 at 11:05:06AM +0100, Alexander Gordeev wrote:
> Function steal_tags() might miss a bit in cpus_have_tags due to
> unsynchronized access from percpu_ida_free(). As result, function
> percpu_ida_alloc() might enter unwakable sleep. This update adds
> memory barriers to prevent the described scenario.
>
> In fact, accesses to cpus_have_tags are fenced by prepare_to_wait()
> and wake_up() calls at the moment and the aforementioned sequence
> does not appear could hit. Nevertheless, explicit memory barriers
> still seem justifiable.
Good catch!
Acked-by: Kent Overstreet <kmo@daterainc.com>
next prev parent reply other threads:[~2013-10-28 21:20 UTC|newest]
Thread overview: 7+ messages / expand[flat|nested] mbox.gz Atom feed top
[not found] <cover.1382950629.git.agordeev@redhat.com>
2013-10-28 10:05 ` [PATCH 1/5] percpu_ida: Fix data race on cpus_have_tags cpumask Alexander Gordeev
2013-10-28 21:20 ` Kent Overstreet [this message]
2013-10-28 10:05 ` [PATCH 2/5] percpu_ida: Move waking up waiters out of atomic contexts Alexander Gordeev
2013-10-28 21:21 ` Kent Overstreet
2013-10-28 10:05 ` [PATCH 3/5] percpu_ida: Optimize freeing tags when maximum cache size is 1 Alexander Gordeev
2013-10-28 10:06 ` [PATCH 4/5] percpu_ida: Sanity check initialization parameters Alexander Gordeev
2013-10-28 10:06 ` [PATCH 5/5] percpu_ida: Allow variable maximum number of cached tags Alexander Gordeev
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=20131028212054.GF8153@kmo \
--to=kmo@daterainc.com \
--cc=agordeev@redhat.com \
--cc=axboe@kernel.dk \
--cc=linux-kernel@vger.kernel.org \
--cc=nab@linux-iscsi.org \
--cc=oleg@redhat.com \
/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 an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.