Re: [PATCH v2] readahead: Correct the start and size in ondemand_readahead()

From: Mike Kravetz
Date: Wed Jul 05 2023 - 12:53:02 EST


On 07/04/23 09:41, Yin, Fengwei wrote:
> On 7/4/2023 2:49 AM, Mike Kravetz wrote:
> > On 06/28/23 12:43, Yin Fengwei wrote:
> >
> > Thank you for your detailed analysis!
> >
> > When the regression was initially discovered, I sent a patch to revert
> > commit 9425c591e06a. Andrew has picked up this change. And, Andrew has
> > also picked up this patch.
> Oh. I didn't notice that you sent revert patch. My understanding is that
> commit 9425c591e06a is a good change.
>
> >
> > I have not verified yet, but I suspect that this patch is going to cause
> > a regression because it depends on the behavior of page_cache_next_miss
> > in 9425c591e06a which has been reverted.
> Yes. If the 9425c591e06a was reverted, this patch could introduce regression.
> Which fixing do you prefer? reverting 9425c591e06a or this patch? Then we
> can suggest to Andrew to take it.

For now, I suggest we go with the revert. Why?
- The revert is already going into stable trees.
- I may not be remembering correctly, but I seem to recall Matthew
mentioning plans to redo/redesign the page cache and possibly
readahead code. If this is the case, then better to keep the legacy
behavior for now. But, I am not sure if this is actually part of any
plan or work in progress.

--
Mike Kravetz