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 for Android: free password hash cracker in your pocket
[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <CANe_+UghN93pX+WDPTv-bn8ffz-9fDWiOwtSAe1bAC+vN6GEFw@mail.gmail.com>
Date:   Sun, 6 Feb 2022 13:10:46 +0000
From:   Mark Hemment <markhemm@...glemail.com>
To:     "Matthew Wilcox (Oracle)" <willy@...radead.org>
Cc:     linux-mm@...ck.org, linux-kernel@...r.kernel.org
Subject: Re: [PATCH 71/75] mm/readahead: Add large folio readahead

On Fri, 4 Feb 2022 at 20:00, Matthew Wilcox (Oracle)
<willy@...radead.org> wrote:
>
> Allocate large folios in the readahead code when the filesystem supports
> them and it seems worth doing.  The heuristic for choosing which folio
> sizes will surely need some tuning, but this aggressive ramp-up has been
> good for testing.
>
> Signed-off-by: Matthew Wilcox (Oracle) <willy@...radead.org>
> ---
>  mm/readahead.c | 106 +++++++++++++++++++++++++++++++++++++++++++++----
>  1 file changed, 99 insertions(+), 7 deletions(-)

...
> +static void page_cache_ra_order(struct readahead_control *ractl,
> +               struct file_ra_state *ra, unsigned int new_order)
> +{
> +       struct address_space *mapping = ractl->mapping;
> +       pgoff_t index = readahead_index(ractl);
> +       pgoff_t limit = (i_size_read(mapping->host) - 1) >> PAGE_SHIFT;

Not sure if can be called for an empty file, but do _page_cache_ra()
has an explicit check for i_size_read() == 0.

> +       pgoff_t mark = index + ra->size - ra->async_size;
> +       int err = 0;
> +       gfp_t gfp = readahead_gfp_mask(mapping);
> +
> +       if (!mapping_large_folio_support(mapping) || ra->size < 4)
> +               goto fallback;
> +
> +       limit = min(limit, index + ra->size - 1);

Cheers,
Mark

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ