linux-mm.kvack.org archive mirror
 help / color / mirror / Atom feed
From: "Yin, Fengwei" <fengwei.yin@intel.com>
To: Matthew Wilcox <willy@infradead.org>
Cc: <linux-mm@kvack.org>
Subject: Re: [RFC PATCH 2/2] mm: add zero_user_folio_segments()
Date: Fri, 17 Feb 2023 10:21:12 +0800	[thread overview]
Message-ID: <2dc545b3-ea14-b457-9b54-5079bac17a54@intel.com> (raw)
In-Reply-To: <Y+6B2C3+VbTDJP67@casper.infradead.org>



On 2/17/2023 3:19 AM, Matthew Wilcox wrote:
> 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.
Yes. I am trying to make some change base on folio to get to know
about folio's API. Thanks a lot for the suggestion and I will check
how to batched page_remove_rmap() in try_to_unmap_one().


Regards
Yin, Fengwei




  reply	other threads:[~2023-02-17  2:21 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
2023-02-17  2:21     ` Yin, Fengwei [this message]
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=2dc545b3-ea14-b457-9b54-5079bac17a54@intel.com \
    --to=fengwei.yin@intel.com \
    --cc=linux-mm@kvack.org \
    --cc=willy@infradead.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