From: Jens Axboe <axboe@kernel.dk>
To: Pankaj Raghav <p.raghav@samsung.com>, hch@lst.de
Cc: gost.dev@samsung.com, damien.lemoal@opensource.wdc.com,
linux-block@vger.kernel.org
Subject: Re: [PATCH] block: add rationale for not using blk_mq_plug() when applicable
Date: Thu, 29 Sep 2022 09:02:02 -0600 [thread overview]
Message-ID: <1e6a094e-c2f7-a352-d91a-ac5169afeb58@kernel.dk> (raw)
In-Reply-To: <20220929144141.140077-1-p.raghav@samsung.com>
On 9/29/22 8:41 AM, Pankaj Raghav wrote:
> There are two places in the block layer at the moment where
> blk_mq_plug() helper could be used instead of directly accessing the
> plug from struct current. In both these cases, directly accessing the plug
> should not have any consequences for zoned devices.
>
> Make the intent explicit by adding comments instead of introducing unwanted
> checks with blk_mq_plug() helper.[1]
>
> [1] https://lore.kernel.org/linux-block/f6e54907-1035-2b2c-6387-ed178be05ccb@kernel.dk/
>
> Signed-off-by: Pankaj Raghav <p.raghav@samsung.com>
> Suggested-by: Jens Axboe <axboe@kernel.dk>
> ---
> block/blk-core.c | 5 +++++
> block/blk-mq.c | 5 +++++
> 2 files changed, 10 insertions(+)
>
> diff --git a/block/blk-core.c b/block/blk-core.c
> index 203be672da52..c19d084b2a74 100644
> --- a/block/blk-core.c
> +++ b/block/blk-core.c
> @@ -850,6 +850,11 @@ int bio_poll(struct bio *bio, struct io_comp_batch *iob, unsigned int flags)
> !test_bit(QUEUE_FLAG_POLL, &q->queue_flags))
> return 0;
>
> + /* As the requests that require a zone lock are not plugged in the
> + * first place, directly accessing the plug instead of using
> + * blk_mq_plug() should not have any consequences during flushing for
> + * zoned devices.
> + */
> blk_flush_plug(current->plug, false);
Multi-line comments should follow the style of:
/*
* This is a multi
* line comment
*/
I can fix that up while applying.
--
Jens Axboe
next prev parent reply other threads:[~2022-09-29 15:02 UTC|newest]
Thread overview: 3+ messages / expand[flat|nested] mbox.gz Atom feed top
[not found] <CGME20220929144143eucas1p2a68d7cb3f5e347954e3a5a5e335cf620@eucas1p2.samsung.com>
2022-09-29 14:41 ` [PATCH] block: add rationale for not using blk_mq_plug() when applicable Pankaj Raghav
2022-09-29 15:02 ` Jens Axboe [this message]
2022-09-29 15:03 ` 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=1e6a094e-c2f7-a352-d91a-ac5169afeb58@kernel.dk \
--to=axboe@kernel.dk \
--cc=damien.lemoal@opensource.wdc.com \
--cc=gost.dev@samsung.com \
--cc=hch@lst.de \
--cc=linux-block@vger.kernel.org \
--cc=p.raghav@samsung.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