mirror of https://lore.kernel.org/lkml/
 help / color / mirror / Atom feed
From: Tejun Heo <tj@kernel.org>
To: "Michal Koutný" <mkoutny@suse.com>
Cc: Yu Kuai <yukuai3@huawei.com>,
	hch@infradead.org, axboe@kernel.dk, cgroups@vger.kernel.org,
	linux-block@vger.kernel.org, linux-kernel@vger.kernel.org,
	yi.zhang@huawei.com, "Paul E. McKenney" <paulmck@kernel.org>
Subject: Re: [PATCH v5 2/2] block: cancel all throttled bios in del_gendisk()
Date: Fri, 7 Jan 2022 11:18:47 -1000	[thread overview]
Message-ID: <YdiuN9kv5OvE/Rtf@slm.duckdns.org> (raw)
In-Reply-To: <20220107150519.GA26824@blackbody.suse.cz>

Hello,

On Fri, Jan 07, 2022 at 04:05:19PM +0100, Michal Koutný wrote:
> On Fri, Dec 10, 2021 at 04:31:43PM +0800, Yu Kuai <yukuai3@huawei.com> wrote:
> > +	 * queue_lock is held, rcu lock is not needed here.
> > +	 */
> > +	blkg_for_each_descendant_post(blkg, pos_css, td->queue->root_blkg)
> > +		tg_drain_bios(&blkg_to_tg(blkg)->service_queue);
> 
> FTR, I acknowledge this can work due to RCU peculiarities, however, I
> don't understand why is it preferred against more robust explict
> rcu_read_lock().
> 
> (All in all, this isn't a deal breaker and I'm not confident evaluating
> the rest of the patch.)

Cc'ing Paul for RCU. Paul, this nit is around whether or not to use
rcu_read_lock() in an irq disabled section. I can see both sides of the
arguments - it's weird to put in an extra rcu_read_lock() when technically
unnecessary but it's also nice to have something explicit and structured to
mark parts which require RCU protection. Putting in a comment is okay but
consistency is difficult to achieve that way.

Maybe all these are unnecessary as lockdep would be able to catch them
anyway, or maybe we'd want something to explicitly mark RCU protected
sections. I don't know but whichever way, I think we need to establish a
convention.

Thanks.

-- 
tejun

  reply	other threads:[~2022-01-07 21:18 UTC|newest]

Thread overview: 9+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2021-12-10  8:31 [PATCH v5 0/2] " Yu Kuai
2021-12-10  8:31 ` [PATCH v5 1/2] blk-throtl: move WARN_ON_ONCE() from throtl_rb_first() to it's caller Yu Kuai
2021-12-10  8:31 ` [PATCH v5 2/2] block: cancel all throttled bios in del_gendisk() Yu Kuai
2022-01-07 15:05   ` Michal Koutný
2022-01-07 21:18     ` Tejun Heo [this message]
2022-01-07 21:36       ` Paul E. McKenney
2022-01-10  1:28         ` yukuai (C)
2021-12-18  9:09 ` [PATCH v5 0/2] " yukuai (C)
2022-01-07  1:08   ` yukuai (C)

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=YdiuN9kv5OvE/Rtf@slm.duckdns.org \
    --to=tj@kernel.org \
    --cc=axboe@kernel.dk \
    --cc=cgroups@vger.kernel.org \
    --cc=hch@infradead.org \
    --cc=linux-block@vger.kernel.org \
    --cc=linux-kernel@vger.kernel.org \
    --cc=mkoutny@suse.com \
    --cc=paulmck@kernel.org \
    --cc=yi.zhang@huawei.com \
    --cc=yukuai3@huawei.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 a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox

all inboxes | Powered by JetHome®