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: <12e79682-21a3-9389-9390-14702d6ca389@huaweicloud.com>
Date: Mon, 14 Apr 2025 14:48:23 +0800
From: Yu Kuai <yukuai1@...weicloud.com>
To: Christoph Hellwig <hch@...radead.org>, Yu Kuai <yukuai1@...weicloud.com>
Cc: axboe@...nel.dk, song@...nel.org, xni@...hat.com,
 linux-block@...r.kernel.org, linux-kernel@...r.kernel.org,
 linux-raid@...r.kernel.org, yi.zhang@...wei.com, yangerkun@...wei.com,
 "yukuai (C)" <yukuai3@...wei.com>
Subject: Re: [PATCH 1/4] block: export part_in_flight()

Hi,

在 2025/04/14 14:32, Christoph Hellwig 写道:
> On Sat, Apr 12, 2025 at 03:31:59PM +0800, Yu Kuai wrote:
>> From: Yu Kuai <yukuai3@...wei.com>
>>
>> This helper will be used in mdraid in later patches, check if there
>> are normal IO inflight while generating background sync IO, to fix a
>> problem in mdraid that foreground IO can be starved by background sync
>> IO.
> 
> If we export this it needs a kerneldoc comment, and probably also
> a better name.

Sure about comment.
> 
> Looking at this I'm also a little confused about blk_mq_in_flight_rw vs
> blk_mq_in_flight and why one needs blk-mq special casing and the other
> not, maybe we need to dig into the history and try to understand that
> as well while we're at it.

There are two kinds of helpers:

1) part_in_flight and part_in_flight_rw
2) blk_mq_in_flight and blk_mq_in_flight_rw

1) is accounted at blk_account_io_start(), while 2) is
blk_mq_start_request(), I think this is the essential difference.

part_in_flight_rw() and blk_mq_in_flight_rw() is also used in sysfs API
inflight for bio/rq based device. And commit 7be835694dae ("block: fix
that util can be greater than 100%") convert blk_mq_in_flight() to
part_in_flight() from disk stats API. Now I just checked there is no use
for blk_mq_in_flight() anymore and maybe it can be removed.

Thanks,
Kuai

> 
> 
> .
> 


Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ