From: Ming Lei <ming.lei@redhat.com>
To: Keith Busch <kbusch@kernel.org>
Cc: Sagi Grimberg <sagi@grimberg.me>, Jens Axboe <axboe@kernel.dk>,
Christoph Hellwig <hch@lst.de>,
linux-block@vger.kernel.org,
Lai Jiangshan <jiangshanlai@gmail.com>,
"Paul E . McKenney" <paulmck@kernel.org>,
Josh Triplett <josh@joshtriplett.org>,
Bart Van Assche <bvanassche@acm.org>
Subject: Re: [RFC PATCH] blk-mq: implement queue quiesce via percpu_ref for BLK_MQ_F_BLOCKING
Date: Fri, 31 Jul 2020 08:24:52 +0800 [thread overview]
Message-ID: <20200731002452.GA1717993@T590> (raw)
In-Reply-To: <20200730181857.GA147247@dhcp-10-100-145-180.wdl.wdc.com>
On Thu, Jul 30, 2020 at 11:18:57AM -0700, Keith Busch wrote:
> On Thu, Jul 30, 2020 at 09:10:48AM -0700, Sagi Grimberg wrote:
> > > > I think it will be a significant improvement to have a single code path.
> > > > The code will be more robust and we won't need to face issues that are
> > > > specific for blocking.
> > > >
> > > > If the cost is negligible, I think the upside is worth it.
> > > >
> > >
> > > rcu_read_lock and rcu_read_unlock has been proved as efficient enough,
> > > and I don't think percpu_refcount is better than it, so I'd suggest to
> > > not switch non-blocking into this way.
> >
> > It's not a matter of which is better, its a matter of making the code
> > more robust because it has a single code-path. If moving to percpu_ref
> > is negligible, I would suggest to move both, I don't want to have two
> > completely different mechanism for blocking vs. non-blocking.
>
> FWIW, I proposed an hctx percpu_ref over a year ago (but for a
> completely different reason), and it was measured as too costly.
>
> https://lore.kernel.org/linux-block/d4a4b6c0-3ea8-f748-85b0-6b39c5023a6f@kernel.dk/
That is why I don't want to switch non-blocking to percpu-refcount.
However, cost of srcu read lock/unlock is basically similar with percpu
ref.
Thanks,
Ming
next prev parent reply other threads:[~2020-07-31 0:25 UTC|newest]
Thread overview: 20+ messages / expand[flat|nested] mbox.gz Atom feed top
2020-07-28 13:49 [RFC PATCH] blk-mq: implement queue quiesce via percpu_ref for BLK_MQ_F_BLOCKING Ming Lei
2020-07-29 10:28 ` Ming Lei
2020-07-29 15:42 ` Sagi Grimberg
2020-07-29 15:49 ` Ming Lei
2020-07-29 22:37 ` Sagi Grimberg
2020-07-30 14:53 ` Ming Lei
2020-07-30 16:10 ` Sagi Grimberg
2020-07-30 18:18 ` Keith Busch
2020-07-30 18:23 ` Sagi Grimberg
2020-07-30 19:27 ` Keith Busch
2020-07-30 19:53 ` Jens Axboe
2020-07-30 21:03 ` Sagi Grimberg
2020-07-31 0:33 ` Ming Lei
2020-07-31 0:24 ` Ming Lei [this message]
2020-07-31 0:28 ` Ming Lei
2020-07-29 11:20 ` Johannes Thumshirn
2020-07-29 16:12 ` Keith Busch
2020-07-29 22:16 ` Ming Lei
2020-07-29 22:42 ` Sagi Grimberg
2020-07-30 15:05 ` Ming Lei
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=20200731002452.GA1717993@T590 \
--to=ming.lei@redhat.com \
--cc=axboe@kernel.dk \
--cc=bvanassche@acm.org \
--cc=hch@lst.de \
--cc=jiangshanlai@gmail.com \
--cc=josh@joshtriplett.org \
--cc=kbusch@kernel.org \
--cc=linux-block@vger.kernel.org \
--cc=paulmck@kernel.org \
--cc=sagi@grimberg.me \
/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.