linux-mm.kvack.org archive mirror
 help / color / mirror / Atom feed
From: Matthew Wilcox <willy@infradead.org>
To: Yin Fengwei <fengwei.yin@intel.com>
Cc: linux-mm@kvack.org
Subject: Re: [RFC PATCH 2/2] mm: add zero_user_folio_segments()
Date: Thu, 16 Feb 2023 19:19:52 +0000	[thread overview]
Message-ID: <Y+6B2C3+VbTDJP67@casper.infradead.org> (raw)
In-Reply-To: <20230216160528.2146188-3-fengwei.yin@intel.com>

On Fri, Feb 17, 2023 at 12:05:28AM +0800, Yin Fengwei wrote:
> zero_user_folio_segments() has same function as zero_user_segments().
> but take folio as parameter. Update folio_zero_segments(),
> folio_zero_segment() and folio_zero_range() to use it.

If we were going to do something like this, then it should be
folio_zero_segments(), not zero_user_folio_segments().

But I don't understand the advantage to adding this right now.
We're adding a new function that does exactly the same thing
as zero_user_segments() for no real benefit that I can see.

My plan was always to eventually kill off zero_user_segment()
zero_user_segments() and zero_user(), and then move the
implementation of zero_user_segments() to be the implementation
of folio_zero_segments().  But we still have ~100 calls to
those three functions, so we can't do that yet.


If you're looking for something to do, how about batching calls to
page_remove_rmap() in try_to_unmap_one()?  That's a pretty hairy
function, but I think that you'll see similar gains to the ones
you saw with page_add_file_rmap() since it's manipulating the
same counters.


  reply	other threads:[~2023-02-16 19:19 UTC|newest]

Thread overview: 9+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2023-02-16 16:05 [RFC PATCH 0/2] minor cleanup of usage of flush_dcache_folio() Yin Fengwei
2023-02-16 16:05 ` [RFC PATCH 1/2] mm: remove duplicated flush_dcache_folio() Yin Fengwei
2023-02-27  5:46   ` Ira Weiny
2023-02-27  6:14     ` Yin, Fengwei
2023-02-16 16:05 ` [RFC PATCH 2/2] mm: add zero_user_folio_segments() Yin Fengwei
2023-02-16 19:19   ` Matthew Wilcox [this message]
2023-02-17  2:21     ` Yin, Fengwei
2023-02-27  5:31   ` Ira Weiny
2023-02-27  5:44     ` Yin, Fengwei

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=Y+6B2C3+VbTDJP67@casper.infradead.org \
    --to=willy@infradead.org \
    --cc=fengwei.yin@intel.com \
    --cc=linux-mm@kvack.org \
    /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