[<prev] [next>] [<thread-prev] [day] [month] [year] [list]
Message-ID: <Yeqy69KK31PSmZdi@casper.infradead.org>
Date: Fri, 21 Jan 2022 13:19:39 +0000
From: Matthew Wilcox <willy@...radead.org>
To: Alex Shi <seakeel@...il.com>
Cc: Alex Shi <alexs@...nel.org>,
Andrew Morton <akpm@...ux-foundation.org>,
Steven Rostedt <rostedt@...dmis.org>,
Ingo Molnar <mingo@...hat.com>,
Naoya Horiguchi <naoya.horiguchi@....com>,
Yu Zhao <yuzhao@...gle.com>, Arnd Bergmann <arnd@...db.de>,
Vlastimil Babka <vbabka@...e.cz>,
Mel Gorman <mgorman@...hsingularity.net>,
Johannes Weiner <hannes@...xchg.org>,
linux-kernel@...r.kernel.org, linux-mm@...ck.org
Subject: Re: [PATCH 1/5] mm: remove page_is_file_lru function
On Fri, Jan 21, 2022 at 03:02:12PM +0800, Alex Shi wrote:
> On Thu, Jan 20, 2022 at 9:28 PM Matthew Wilcox <willy@...radead.org> wrote:
> >
> > On Thu, Jan 20, 2022 at 09:10:20PM +0800, alexs@...nel.org wrote:
> > > From: Alex Shi <alexs@...nel.org>
> > >
> > > This function could be full replaced by folio_is_file_lru, so no reason
> > > to keep a duplicate function.
> >
> > This is not a helpful way to do this kind of replacement.
> >
> > Instead of choosing a function to remove and doing a blind replacement,
> > choose a call site and convert the whole calling function to use folios.
> > Once you've removed all callers, you can remove the wrapper function.
> >
> > Also, a number of changes here will conflict with patches I've already
> > posted. Try doing change_pte_range() in mprotect.c to get a feel for
> > how to convert a function entirely to folios.
>
> Hi Willy,
>
> Thanks for your comments!
>
> The patchset did the thing as you required "convert the whole calling
> function to use folios. then remove the wrapper function" on yesterday's
> Linus and next tree, that included your patchset "Page cache/iomap for 5.17".
That's not what I meant. What I meant is you're currently doing:
- Find folio wrapper function
- Inline it into all callers
- Delete wrapper function
That creates a lot of churn and not a lot of improvement.
What would be helpful is doing:
- Find folio wrapper function
- Find a caller, convert it from using pages to using folios
That's harder, but it actually accomplishes something (ie auditing
a function to make it work with folios). These wrapper functions are
signals that the callers need to be converted to use folios.
> Is the conflicting patch "Enabling large folios for 5.17" or others? Sorry
> for can't check everyone, your patches are many. If just the former, I see
> you mentioned: "I'd be uncomfortable seeing it merged before 5.18".
> Would you point out which of your patches was interfered or blocked?
The GUP series was the specific series that this conflicted with.
And yes, I have a lot of patches outstanding in this area. That's a
sign that small cleanup patches aren't going to be welcomed because
they're going to conflict with meaningful patches.
> And yes, replacing page functions in change_pte_range is a bit harder,
> but it seems it has no much relation with this trival patchset.
That is, indeed, the point.
Powered by blists - more mailing lists