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: <aAczJzofvwrCUUNa@infradead.org>
Date: Mon, 21 Apr 2025 23:11:51 -0700
From: Christoph Hellwig <hch@...radead.org>
To: Yu Kuai <yukuai1@...weicloud.com>
Cc: Christoph Hellwig <hch@...radead.org>, axboe@...nel.dk, xni@...hat.com,
	agk@...hat.com, snitzer@...nel.org, mpatocka@...hat.com,
	song@...nel.org, viro@...iv.linux.org.uk, akpm@...ux-foundation.org,
	nadav.amit@...il.com, ubizjak@...il.com, cl@...ux.com,
	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 1/5] block: cleanup and export bdev IO inflight APIs

On Mon, Apr 21, 2025 at 09:13:57PM +0800, Yu Kuai wrote:
> > I'm not sure why this is needed or related, or even what additional
> > distinction is added here.
> 
> Because for rq-based device, there are two different stage,
> blk_account_io_start() while allocating new rq, and
> blk_mq_start_request() while issuing the rq to driver.
> 
> When will we think the reqeust is inflight? For iostat, my anser is the
> former one, because rq->start_time_ns is set here as well. And noted in
> iostats api diskstats_show(/proc/diskstats) and part_stat_show
> (/sys/block/sda/stat), inflight is get by part_in_flight, which is
> different from disk sysfs api(/sys/block/sda/inflight).

Trying to express this in a not very obvious function name isn't
going to work very well.  Documenting your findings in comments is
much better.

> > 
> > I'd just change this helper to call blk_mq_count_in_driver_rw for
> > blk-mq devices and remove the conditional from the sysfs code instead.
> > That gives us a much more robust and easier to understand API.
> 
> Ok, and another separate patch, right?

Yes.


Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ