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: <ZbPAjGJr7hrOvNOo@casper.infradead.org>
Date: Fri, 26 Jan 2024 14:24:12 +0000
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>,
	Yu Zhao <yuzhao@...gle.com>, Damien Le Moal <dlemoal@...nel.org>,
	Niklas Cassel <niklas.cassel@....com>,
	"Martin K . Petersen" <martin.petersen@...cle.com>,
	Hannes Reinecke <hare@...e.de>,
	Linus Walleij <linus.walleij@...aro.org>, linux-mm@...ck.org,
	linux-block@...r.kernel.org, linux-fsdevel@...r.kernel.org,
	linux-kernel@...r.kernel.org,
	Zhaoyang Huang <huangzhaoyang@...il.com>, steve.kang@...soc.com
Subject: Re: [PATCHv4 1/1] block: introduce content activity based ioprio

On Fri, Jan 26, 2024 at 08:08:00PM +0800, zhaoyang.huang wrote:
> +#ifdef CONFIG_CONTENT_ACT_BASED_IOPRIO
> +#define bio_add_page(bio, page, len, offset)	\
> +	({					\
> +		int class, level, hint, activity;	\
> +		int ret = 0;				\
> +		ret = bio_add_page(bio, page, len, offset);		\
> +		if (ret > 0) {						\
> +			class = IOPRIO_PRIO_CLASS(bio->bi_ioprio);	\
> +			level = IOPRIO_PRIO_LEVEL(bio->bi_ioprio);	\
> +			hint = IOPRIO_PRIO_HINT(bio->bi_ioprio);	\
> +			activity = IOPRIO_PRIO_ACTIVITY(bio->bi_ioprio);		\
> +			activity += (bio->bi_vcnt + 1 <= IOPRIO_NR_ACTIVITY &&		\
> +				PageWorkingset(&folio->page)) ? 1 : 0;			\

I know you didn't even compile this version.

More importantly, conceptually it doesn't work.  All kinds of pages
get added to bios, and not all of them are file/anon pages.  That
PageWorkingset bit might well be reused for other purposes.  Only
the caller knows if this is file/anon memory.  You can't do this here.


Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ