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] [day] [month] [year] [list]
Date: Tue, 25 Jun 2024 12:36:53 +0200
From: Jan Kara <jack@...e.cz>
To: zippermonkey <zzippermonkey@...look.com>
Cc: zhangpengpeng0808@...il.com, akpm@...ux-foundation.org,
	bruzzhang@...cent.com, linux-fsdevel@...r.kernel.org,
	linux-kernel@...r.kernel.org, linux-mm@...ck.org,
	vernhao@...cent.com, willy@...radead.org, zigiwang@...cent.com,
	jack@...e.cz
Subject: Re: [PATCH RFC] mm/readahead: Fix repeat initial_readahead

On Tue 25-06-24 14:28:34, zippermonkey wrote:
> To illustrate this problem, I created the following example:
> 
> Assuming that the process reads sequentially from the beginning of the file
> and
> calls the `page_cache_sync_readahead` function. In this sync readahead
> function,
> since the index is 0, it will proceed to `initial_readahead` and initialize
> `ra_state`. It allocates a folio with an order of 2 and marks it as
> PG_readahead.
> Next, because` (folio_test_readahead(folio))` is true, the
> page_cache_async_ra
> function is called, which causes the `ra_state` to be initialized again.

Good spotting guys! There are actually more problems in the readahead code.
I have just pushed out a patch series [1] addressing several issues that
should also address the problem you've found. Can you please test whether
it provides a similar speedup as your fix (sorry, I forgot to CC you on the
series)? Thanks!

[1] https://lore.kernel.org/20240625100859.15507-1-jack@suse.cz

								Honza
-- 
Jan Kara <jack@...e.com>
SUSE Labs, CR

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ