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]
Message-ID: <aWnBX07vqjKAV4De@google.com>
Date: Fri, 16 Jan 2026 04:41:03 +0000
From: Jaegeuk Kim <jaegeuk@...nel.org>
To: Matthew Wilcox <willy@...radead.org>
Cc: linux-kernel@...r.kernel.org, linux-f2fs-devel@...ts.sourceforge.net,
	linux-mm@...ck.org
Subject: Re: [PATCH 3/3] mm/readahead: try to allocate high order pages for
 FADVISE_FAV_WILLNEED

On 12/03, Jaegeuk Kim wrote:
> On 12/02, Matthew Wilcox wrote:
> > On Tue, Dec 02, 2025 at 01:30:13AM +0000, Jaegeuk Kim wrote:
> > > @@ -627,7 +628,7 @@ void page_cache_sync_ra(struct readahead_control *ractl,
> > >  	ra->size = min(contig_count + req_count, max_pages);
> > >  	ra->async_size = 1;
> > >  readit:
> > > -	ra->order = 0;
> > > +	ra->order = mapping_max_folio_order(ractl->mapping);
> > >  	ractl->_index = ra->start;
> > >  	page_cache_ra_order(ractl, ra);
> > >  }
> > 
> > I suspect this is in the wrong place, but I'm on holiday and not going
> > to go spelunking through the readahead code looking for the right place.
> > 
> > Also, going directly to max folio order is wrong, we should use the same
> > approach as the write order code, encapsulated in filemap_get_order().
> > See 4f6617011910
> 
> It seems the key is page_cache_ra_order() which allocates pages by
> ra_alloc_folio() given ra->order. FWIW, madvise() and fault() readahead
> takes page_cache_async_ra(), while fadvise() takes page_cache_sync_ra().
> And, the former one has a logic to bump up the ra->order += 2 by f838ddf8cef5.
> I think it'd make sense to match that behavior?

Comment by any chance?

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ