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: <ZT/eCvQ/Iug8GB1l@casper.infradead.org>
Date:   Mon, 30 Oct 2023 16:47:06 +0000
From:   Matthew Wilcox <willy@...radead.org>
To:     Youling Tang <youling.tang@...look.com>
Cc:     Andrew Morton <akpm@...ux-foundation.org>,
        linux-fsdevel@...r.kernel.org, linux-mm@...ck.org,
        linux-kernel@...r.kernel.org, tangyouling@...inos.cn
Subject: Re: [PATCH] readahead: Update the file_ra_state.ra_pages with each
 readahead operation

On Mon, Oct 30, 2023 at 03:41:30PM +0800, Youling Tang wrote:
> From: Youling Tang <tangyouling@...inos.cn>
> 
> Changing the read_ahead_kb value midway through a sequential read of a
> large file found that the ra->ra_pages value remained unchanged (new
> ra_pages can only be detected the next time the file is opened). Because
> file_ra_state_init() is only called once in do_dentry_open() in most
> cases.
> 
> In ondemand_readahead(), update bdi->ra_pages to ra->ra_pages to ensure
> that the maximum pages that can be allocated by the readahead algorithm
> are the same as (read_ahead_kb * 1024) / PAGE_SIZE after read_ahead_kb
> is modified.

Explain to me why this is the correct behaviour.

Many things are only initialised at open() time and are not updated until
the next open().  This is longstanding behaviour that some apps expect.
Why should we change it?

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ