lists.openwall.net   lists  /  announce  owl-users  owl-dev  john-users  john-dev  passwdqc-users  yescrypt  popa3d-users  /  oss-security  kernel-hardening  musl  sabotage  tlsify  passwords  /  crypt-dev  xvendor  /  Bugtraq  Full-Disclosure  linux-kernel  linux-netdev  linux-ext4  linux-hardening  linux-cve-announce  PHC 
Open Source and information security mailing list archives
 
Hash Suite: Windows password security audit tool. GUI, reports in PDF.
[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <3de1a819-050e-fc3d-f369-302b3824e9d2@huaweicloud.com>
Date: Tue, 29 Apr 2025 17:07:52 +0800
From: Yu Kuai <yukuai1@...weicloud.com>
To: Hannes Reinecke <hare@...e.de>, Yu Kuai <yukuai1@...weicloud.com>,
 hch@...radead.org, axboe@...nel.dk, xni@...hat.com, agk@...hat.com,
 snitzer@...nel.org, mpatocka@...hat.com, song@...nel.org, cl@...ux.com,
 nadav.amit@...il.com, ubizjak@...il.com, akpm@...ux-foundation.org
Cc: linux-block@...r.kernel.org, linux-kernel@...r.kernel.org,
 dm-devel@...ts.linux.dev, linux-raid@...r.kernel.org, yi.zhang@...wei.com,
 yangerkun@...wei.com, johnny.chenyi@...wei.com,
 "yukuai (C)" <yukuai3@...wei.com>
Subject: Re: [PATCH v2 4/9] block: cleanup blk_mq_in_flight_rw()

Hi,

在 2025/04/29 14:31, Hannes Reinecke 写道:
> On 4/27/25 10:29, Yu Kuai wrote:
>> From: Yu Kuai <yukuai3@...wei.com>
>>
>> Also add comment for part_inflight_show() for the difference between
>> bio-based and rq-based device.
>>
>> Signed-off-by: Yu Kuai <yukuai3@...wei.com>
>> ---
>>   block/blk-mq.c | 12 ++++++------
>>   block/blk-mq.h |  3 +--
>>   block/genhd.c  | 43 +++++++++++++++++++++++++------------------
>>   3 files changed, 32 insertions(+), 26 deletions(-)
>>
>> diff --git a/block/blk-mq.c b/block/blk-mq.c
>> index 301dbd3e1743..0067e8226e05 100644
>> --- a/block/blk-mq.c
>> +++ b/block/blk-mq.c
>> @@ -89,7 +89,7 @@ struct mq_inflight {
>>       unsigned int inflight[2];
>>   };
>> -static bool blk_mq_check_inflight(struct request *rq, void *priv)
>> +static bool blk_mq_check_in_driver(struct request *rq, void *priv)
> 
> Please don't rename these functions. 'in flight' always means 'in flight
> in the driver', so renaming them just introduces churn with no real 
> advantage.

Actually, the inflight value, from /proc/diskstats from diskstats_show,
actually means IO start accounting, which may not in the rq driver. For
example, IO scheduler. The same inflight value is used in
update_io_ticks as well.

This is the main reason about this rename. Related comments are added in
part_inflight_show() in this patch, and in part_in_flight() in next
patch.

Thanks,
Kuai

> 
> Cheers,
> 
> Hannes


Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ