From: Tejun Heo <tj@kernel.org>
To: Paolo Valente <paolo.valente@linaro.org>
Cc: Jens Axboe <axboe@kernel.dk>,
linux-block@vger.kernel.org,
Linux-Kernal <linux-kernel@vger.kernel.org>,
Ulf Hansson <ulf.hansson@linaro.org>,
Linus Walleij <linus.walleij@linaro.org>,
broonie@kernel.org
Subject: Re: [PATCH BUGFIX] block, bfq: access and cache blkg data only when safe
Date: Wed, 24 May 2017 12:47:04 -0400 [thread overview]
Message-ID: <20170524164704.GF24798@htj.duckdns.org> (raw)
In-Reply-To: <C9B2B7D3-1E92-4E22-80FA-8A606643B536@linaro.org>
Hello,
On Wed, May 24, 2017 at 05:43:18PM +0100, Paolo Valente wrote:
> > so none of the above objects can be destroyed before the request is
> > done.
>
> ... the issue seems just to move to a more subtle position: cfq is ok,
> because it protects itself with rq lock, but blk-mq schedulers don't.
> So, the race that leads to the (real) crashes reported by people may
> actually be:
Oh, I was just thinking about !mq paths the whole time.
> 1 blkg_lookup executed on a blkg being destroyed: the scheduler gets a
> copy of the content of the blkg, but the rcu mechanism doesn't prevent
> destruction from going on
> 2 blkg_get gets executed on the copy of the original blkg
So, we can't do that. We should look up and bump the ref and use the
original copy. We probably should switch blkgs to use percpu-refs.
Thanks.
--
tejun
next prev parent reply other threads:[~2017-05-24 16:47 UTC|newest]
Thread overview: 16+ messages / expand[flat|nested] mbox.gz Atom feed top
2017-05-19 8:39 Paolo Valente
2017-05-19 14:37 ` Jens Axboe
2017-05-22 20:20 ` Paolo Valente
2017-05-19 14:54 ` Tejun Heo
2017-05-20 7:27 ` Paolo Valente
2017-05-23 20:42 ` Tejun Heo
2017-05-24 11:53 ` Paolo Valente
2017-05-24 14:24 ` Paolo Valente
2017-05-24 14:50 ` Tejun Heo
2017-05-24 16:43 ` Paolo Valente
2017-05-24 16:47 ` Tejun Heo [this message]
2017-05-25 7:10 ` Paolo Valente
2017-05-25 14:37 ` Tejun Heo
2017-06-05 8:11 Paolo Valente
2017-06-08 15:30 ` Paolo Valente
2017-06-08 15:52 ` Jens Axboe
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=20170524164704.GF24798@htj.duckdns.org \
--to=tj@kernel.org \
--cc=axboe@kernel.dk \
--cc=broonie@kernel.org \
--cc=linus.walleij@linaro.org \
--cc=linux-block@vger.kernel.org \
--cc=linux-kernel@vger.kernel.org \
--cc=paolo.valente@linaro.org \
--cc=ulf.hansson@linaro.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
Powered by JetHome