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: <Zjw_0UPKvGkPfKFO@casper.infradead.org>
Date: Thu, 9 May 2024 04:15:29 +0100
From: Matthew Wilcox <willy@...radead.org>
To: "zhaoyang.huang" <zhaoyang.huang@...soc.com>
Cc: Andrew Morton <akpm@...ux-foundation.org>, Jens Axboe <axboe@...nel.dk>,
	Tejun Heo <tj@...nel.org>, Josef Bacik <josef@...icpanda.com>,
	Baolin Wang <baolin.wang@...ux.alibaba.com>, linux-mm@...ck.org,
	linux-block@...r.kernel.org, linux-kernel@...r.kernel.org,
	cgroups@...r.kernel.org, Zhaoyang Huang <huangzhaoyang@...il.com>,
	steve.kang@...soc.com
Subject: Re: [RFC PATCH 2/2] mm: introduce budgt control in readahead

On Thu, May 09, 2024 at 10:39:37AM +0800, zhaoyang.huang wrote:
> -static unsigned long get_next_ra_size(struct file_ra_state *ra,
> +static unsigned long get_next_ra_size(struct readahead_control *ractl,
>  				      unsigned long max)
>  {
> -	unsigned long cur = ra->size;
> +	unsigned long cur = ractl->ra->size;
> +	struct inode *inode = ractl->mapping->host;
> +	unsigned long budgt = inode->i_sb->s_bdev ?
> +			blk_throttle_budgt(inode->i_sb->s_bdev) : 0;

You can't do this.  There's no guarantee that the IO is going to
mapping->host->i_sb->s_bdev.  You'd have to figure out how to ask the
filesystem to get the bdev for the particular range (eg the fs might
implement RAID internally).


Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ