linux-kernel.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
From: Matthew Wilcox <willy@infradead.org>
To: Alex Shi <seakeel@gmail.com>
Cc: Alex Shi <alexs@kernel.org>,
	Andrew Morton <akpm@linux-foundation.org>,
	Steven Rostedt <rostedt@goodmis.org>,
	Ingo Molnar <mingo@redhat.com>,
	Naoya Horiguchi <naoya.horiguchi@nec.com>,
	Yu Zhao <yuzhao@google.com>, Arnd Bergmann <arnd@arndb.de>,
	Vlastimil Babka <vbabka@suse.cz>,
	Mel Gorman <mgorman@techsingularity.net>,
	Johannes Weiner <hannes@cmpxchg.org>,
	linux-kernel@vger.kernel.org, linux-mm@kvack.org
Subject: Re: [PATCH 1/5] mm: remove page_is_file_lru function
Date: Fri, 21 Jan 2022 13:19:39 +0000	[thread overview]
Message-ID: <Yeqy69KK31PSmZdi@casper.infradead.org> (raw)
In-Reply-To: <CAJy-AmnmRVZ2ezSt1bws4TVKEw-VKubUXbc4SP8wU0-SQprhcA@mail.gmail.com>

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@infradead.org> wrote:
> >
> > On Thu, Jan 20, 2022 at 09:10:20PM +0800, alexs@kernel.org wrote:
> > > From: Alex Shi <alexs@kernel.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.

  reply	other threads:[~2022-01-21 13:20 UTC|newest]

Thread overview: 9+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2022-01-20 13:10 [PATCH 0/5] remove add/del page to lru functions alexs
2022-01-20 13:10 ` [PATCH 1/5] mm: remove page_is_file_lru function alexs
2022-01-20 13:27   ` Matthew Wilcox
2022-01-21  7:02     ` Alex Shi
2022-01-21 13:19       ` Matthew Wilcox [this message]
2022-01-20 13:10 ` [PATCH 2/5] mm: remove __clear_page_lru_flags() alexs
2022-01-20 13:10 ` [PATCH 3/5] mm: remove add_page_to_lru_list() function alexs
2022-01-20 13:10 ` [PATCH 4/5] mm: remove add_page_to_lru_list_tail() alexs
2022-01-20 13:10 ` [PATCH 5/5] mm: remove del_page_from_lru_list() alexs

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=Yeqy69KK31PSmZdi@casper.infradead.org \
    --to=willy@infradead.org \
    --cc=akpm@linux-foundation.org \
    --cc=alexs@kernel.org \
    --cc=arnd@arndb.de \
    --cc=hannes@cmpxchg.org \
    --cc=linux-kernel@vger.kernel.org \
    --cc=linux-mm@kvack.org \
    --cc=mgorman@techsingularity.net \
    --cc=mingo@redhat.com \
    --cc=naoya.horiguchi@nec.com \
    --cc=rostedt@goodmis.org \
    --cc=seakeel@gmail.com \
    --cc=vbabka@suse.cz \
    --cc=yuzhao@google.com \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).