[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <e2ba1495-e9a8-8dfc-4eee-d9a2984bc0d2@huaweicloud.com>
Date: Mon, 16 Jan 2023 09:07:00 +0800
From: Kemeng Shi <shikemeng@...weicloud.com>
To: Christoph Hellwig <hch@....de>
Cc: axboe@...nel.dk, dwagner@...e.de, hare@...e.de,
ming.lei@...hat.com, linux-block@...r.kernel.org,
linux-kernel@...r.kernel.org, john.garry@...wei.com, jack@...e.cz
Subject: Re: [PATCH v3 07/14] blk-mq: make blk_mq_commit_rqs a general
function for all commits
on 1/11/2023 2:30 PM, Kemeng Shi wrote:
>
> Hi Christoph, thank you for taking time to review, alos sorry for the bother
> of code style problem. I will fix them in next version.
> on 1/11/2023 1:45 PM, Christoph Hellwig wrote:
>> On Wed, Jan 11, 2023 at 09:01:52PM +0800, Kemeng Shi wrote:
>>> 1. rename orignal blk_mq_commit_rqs to blk_mq_plug_commit_rqs as
>>> trace_block_unplug is only needed when we dispatch request from plug list.
>>
>> Why? I think always having the trace even for the commit case seems
>> very useful for making the traces useful.
> I think unplug event more likely means that request going to be sent to driver
> was plugged and in plug list. And the current code do only trace unplug event
> when dispatching requests from plug list. If so, would it be better to add
> a new event to trace commit?
Hi Christoph, which way do you prefer now? Keep unplug event consistent to
trace commit of requests from plug list only or trace all commits with
unplug event. Please let me know and I will consider it in next version.
Thanks.
>>> +/* blk_mq_commit_rqs and blk_mq_plug_commit_rqs notify driver using
>>> + * bd->last that there is no more requests. (See comment in struct
>>
>> This is not the normal kernel comment style.
>>
>>> +static void blk_mq_commit_rqs(struct blk_mq_hw_ctx *hctx, int queued)
>>> +{
>>> + if (hctx->queue->mq_ops->commit_rqs && queued) {
>>> + hctx->queue->mq_ops->commit_rqs(hctx);
>>> + }
>>
>> No need for the braces.
>>
>
--
Best wishes
Kemeng Shi
Powered by blists - more mailing lists