Re: [PATCH 1/1] mm/readahead: simplify page_cache_ra_unbounded loop counter reset
From: Andrew Morton
Date: Fri May 08 2026 - 15:25:16 EST
On Thu, 7 May 2026 19:01:27 -0700 Frederick Mayle <fmayle@xxxxxxxxxx> wrote:
> On Fri, May 1, 2026 at 6:11 AM Andrew Morton <akpm@xxxxxxxxxxxxxxxxxxxx> wrote:
> >
> > On Thu, 30 Apr 2026 18:19:07 -0700 Frederick Mayle <fmayle@xxxxxxxxxx> wrote:
> >
> > > Minor cleanup, no behavior change intended.
> > >
> > > `read_pages` ensures that `ractl->_nr_pages` is zero before it returns,
> >
> > So it seems, but depending upon this might be a bit fragile?
> >
> > It would be better to make this a more explicit/formal part of the
> > read_pages() contract. kerneldocifying read_pages() would be a
> > suitable way.
>
> I agree. I've sent the following patch to document the invariant
> https://lore.kernel.org/r/20260508015402.735441-1-fmayle@xxxxxxxxxx/
Thanks. I suggest you turn both into a single patch and resend when
people have returned and recovered from the conference ;)