[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <20180109161914.GM3668920@devbig577.frc2.facebook.com>
Date: Tue, 9 Jan 2018 08:19:14 -0800
From: "tj@...nel.org" <tj@...nel.org>
To: Bart Van Assche <Bart.VanAssche@....com>
Cc: "jbacik@...com" <jbacik@...com>, "jack@...e.cz" <jack@...e.cz>,
"clm@...com" <clm@...com>, "axboe@...nel.dk" <axboe@...nel.dk>,
"kernel-team@...com" <kernel-team@...com>,
"linux-kernel@...r.kernel.org" <linux-kernel@...r.kernel.org>,
"peterz@...radead.org" <peterz@...radead.org>,
"linux-btrfs@...r.kernel.org" <linux-btrfs@...r.kernel.org>,
"linux-block@...r.kernel.org" <linux-block@...r.kernel.org>,
"jianchao.w.wang@...cle.com" <jianchao.w.wang@...cle.com>
Subject: Re: [PATCH 2/8] blk-mq: protect completion path with RCU
Hello, Bart.
On Tue, Jan 09, 2018 at 04:12:40PM +0000, Bart Van Assche wrote:
> I'm concerned about the additional CPU cycles needed for the new blk_mq_map_queue()
> call, although I know this call is cheap. Would the timeout code really get that
So, if that is really a concern, let's cache that mapping instead of
changing synchronization rules for that.
> much more complicated if the hctx_lock() and hctx_unlock() calls would be changed
> into rcu_read_lock() and rcu_read_unlock() calls? Would it be sufficient if
> "if (has_rcu) synchronize_rcu();" would be changed into "synchronize_rcu();" in
> blk_mq_timeout_work()?
Code-wise, it won't be too much extra code but I think diverging the
sync methods between issue and completion paths is more fragile and
likely to invite confusions and mistakes in the future. We have the
normal path (issue&completion) synchronizing against the exception
path (timeout). I think it's best to keep the sync constructs aligned
with that conceptual picture.
Thanks.
--
tejun
Powered by blists - more mailing lists