From: Pankaj Raghav <p.raghav@samsung.com>
To: Jens Axboe <axboe@kernel.dk>, <hch@lst.de>
Cc: <gost.dev@samsung.com>, <linux-block@vger.kernel.org>,
<damien.lemoal@opensource.wdc.com>
Subject: Re: [PATCH v3 2/2] block: use blk_mq_plug() wrapper consistently in the block layer
Date: Thu, 29 Sep 2022 15:48:11 +0200 [thread overview]
Message-ID: <59aa1b6c-2cbd-b342-b17d-a6965ed6239c@samsung.com> (raw)
In-Reply-To: <f6e54907-1035-2b2c-6387-ed178be05ccb@kernel.dk>
On 2022-09-29 15:45, Jens Axboe wrote:
> On 9/29/22 7:41 AM, Pankaj Raghav wrote:
>>>> Either of the changes should not have led to a bug in zoned devices:
>>>>
>>>> - blk_execute_rq_nowait:
>>>> Only passthrough requests can use this function, and plugging can be
>>>> performed on those requests in zoned devices. So no issues directly
>>>> accessing the plug.
>>>>
>>>> - blk_flush_plug in bio_poll:
>>>> As we don't plug the requests that require a zone lock in the first
>>>> place, flushing should not have any impact. So no issues directly
>>>> accessing the plug.
>>>>
>>>> This is just a cleanup patch to use this wrapper to get the plug
>>>> consistently across the block layer.
>>>
>>> While I did suggest to make this consistent and in principle it's
>>> the right thing to do, it also irks me to add extra checks to paths
>>> where we know that it's just extra pointless code. Maybe we can
>>> just comment these two spots? Basically each of the sections above
>>> could just go into the appropriate file.
>>>
>> The checks should go away, and the plug could be inlined by the
>> compiler if we don't have CONFIG_BLK_DEV_ZONED. Otherwise, I do agree
>> with you that it is a pointless check.
>
> But that's my general complaint with the argument that "it doesn't
> matter if this feature isn't configured" - distros enable features.
> Anything that uses IS_ENABLED() is handy for testing, but assuming it
> all pretty much gets enabled in the distro kernel, it does absolutely
> nothing to help the added overhead. It's something that gets done to
> create the illusion that an added feature CAN have zero core overhead,
> while in reality that's utterly wrong.
> Got it!
>> I am fine with either, though I prefer what this patch is doing. So if
>> you feel strongly against calling the blk_mq_plug function, I can turn
>> this patch into just adding comments as you suggested.
>
> I think we should. I can pick patch 1 here, and then you can send a
> patch 2 for that when you have time.
>
I will do it right away as a separate patch! Thanks.
next prev parent reply other threads:[~2022-09-29 13:48 UTC|newest]
Thread overview: 12+ messages / expand[flat|nested] mbox.gz Atom feed top
[not found] <CGME20220929074747eucas1p1821a5b79ad24cb559b7b6ec324239e9e@eucas1p1.samsung.com>
2022-09-29 7:47 ` [PATCH v3 0/2] plugging cleanup v3 Pankaj Raghav
2022-09-29 7:47 ` [PATCH v3 1/2] block: adapt blk_mq_plug() to not plug for writes that require a zone lock Pankaj Raghav
2022-09-29 8:14 ` Damien Le Moal
2022-09-29 8:34 ` Johannes Thumshirn
2022-09-29 7:47 ` [PATCH v3 2/2] block: use blk_mq_plug() wrapper consistently in the block layer Pankaj Raghav
2022-09-29 8:15 ` Damien Le Moal
2022-09-29 8:35 ` Johannes Thumshirn
2022-09-29 13:24 ` Jens Axboe
2022-09-29 13:41 ` Pankaj Raghav
2022-09-29 13:45 ` Jens Axboe
2022-09-29 13:48 ` Pankaj Raghav [this message]
2022-09-29 13:46 ` (subset) [PATCH v3 0/2] plugging cleanup v3 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=59aa1b6c-2cbd-b342-b17d-a6965ed6239c@samsung.com \
--to=p.raghav@samsung.com \
--cc=axboe@kernel.dk \
--cc=damien.lemoal@opensource.wdc.com \
--cc=gost.dev@samsung.com \
--cc=hch@lst.de \
--cc=linux-block@vger.kernel.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