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: <6b2d5694-f802-43a4-a0fd-1c8e34f8e69a@kernel.org>
Date: Thu, 25 Jan 2024 16:40:47 +0900
From: Damien Le Moal <dlemoal@...nel.org>
To: "zhaoyang.huang" <zhaoyang.huang@...soc.com>,
 Andrew Morton <akpm@...ux-foundation.org>, Jens Axboe <axboe@...nel.dk>,
 Yu Zhao <yuzhao@...gle.com>, 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-kernel@...r.kernel.org, Zhaoyang Huang <huangzhaoyang@...il.com>,
 steve.kang@...soc.com
Subject: Re: [PATCHv3 1/1] block: introduce content activity based ioprio

On 1/25/24 16:19, zhaoyang.huang wrote:
> From: Zhaoyang Huang <zhaoyang.huang@...soc.com>
> 
> Currently, request's ioprio are set via task's schedule priority(when no
> blkcg configured), which has high priority tasks possess the privilege on
> both of CPU and IO scheduling.
> This commit works as a hint of original policy by promoting the request ioprio
> based on the page/folio's activity. The original idea comes from LRU_GEN
> which provides more precised folio activity than before. This commit try
> to adjust the request's ioprio when certain part of its folios are hot,
> which indicate that this request carry important contents and need be
> scheduled ealier.
> 
> This commit is verified on a v6.6 6GB RAM android14 system via 4 test cases
> by changing the bio_add_page/folio API in ext4 and f2fs.

And as mentioned already by Chrisoph and Jens, why don't you just simply set
bio->bi_ioprio to the value you want before calling submit_bio() in these file
systems ? Why all the hacking of the priority code for that ? That is not
justified at all.

Furthermore, the activity things reduces the ioprio hint bits to the bare
minimum 3 bits necessary for command duration limits. Not great. But if you
simply set the prio class based on your activity algorithm, you do not need to
change all that.

Note: Your patch is full of whitespace changes.

-- 
Damien Le Moal
Western Digital Research


Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ