All of lore.kernel.org
 help / color / mirror / Atom feed
From: "Yin, Fengwei" <fengwei.yin@intel.com>
To: <willy@infradead.org>, <david@redhat.com>, <linux-mm@kvack.org>
Cc: <dave.hansen@intel.com>, <tim.c.chen@intel.com>, <ying.huang@intel.com>
Subject: Re: [RFC PATCH 0/5] folio based filemap_map_pages()
Date: Mon, 30 Jan 2023 20:58:46 +0800	[thread overview]
Message-ID: <ec4e3827-360e-41cf-696c-e040a867cd48@intel.com> (raw)
In-Reply-To: <20230130125504.2509710-1-fengwei.yin@intel.com>



On 1/30/2023 8:54 PM, Yin Fengwei wrote:
> Current filemap_map_pages() still use page granularity
> even when the underneath folio is large folio. Making it
> use folio based granularity allows batched refcount,
> rmap and mm counter opertion. Which brings some level
> performance gain. This series tries to update
>    filemap_map_pages()
>    do_set_pte()
>    page_add_file_rmap()
> to bring batched refcount, rmap and mm counter in.
> 
> Patch 1 enabled the fault around for shared file page
>         write fault. As David suggested here:
> https://lore.kernel.org/linux-mm/e14b4e9a-612d-fc02-edc0-8f3b6bcf4148@redhat.com/
> 
> Patch 2 update filemap_map_pages() to do map based on
>         folio granularity and batched refcount update
> 
> Patch 3,4,5 Enable batched rmap and mm counter
> 
> Function testing:
>   - two days daily usage: boot to xfs GUI, kernel build, editor and browser
> 
> Performance testing:
>   - kernel build: no obvious performance impact
>   - micro benchmark: will-it-scale:page_fault3 (shared file write fault)
>     Patch 1 brings 3.75X performance gain
> 
>   - micro benchmark: will-it-scale:page_fault3 like but with file read fault
>     - Patch 2 brings about 2% performance gain (batched refcount)
>     - Patch 3,4,5 brings about 15% performance gain (batched rmap and mm counter)
> 
Forgot to mention: the base of the series is next-20230119.
> 
> Yin Fengwei (5):
>   mm: Enable fault around for shared file page fault
>   filemap: do file page mapping with folio granularity
>   rmap: add page_add_file_rmap_range()
>   mm: add do_set_pte_entry()
>   filemap: batched update mm counter,rmap when map file folio
> 
>  include/linux/mm.h   |   2 +
>  include/linux/rmap.h |   2 +
>  mm/filemap.c         | 106 +++++++++++++++++++++++++++++--------------
>  mm/memory.c          |  25 +++++++++-
>  mm/rmap.c            |  70 +++++++++++++++++-----------
>  5 files changed, 143 insertions(+), 62 deletions(-)
> 


      parent reply	other threads:[~2023-01-30 12:59 UTC|newest]

Thread overview: 20+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2023-01-30 12:54 [RFC PATCH 0/5] folio based filemap_map_pages() Yin Fengwei
2023-01-30 12:55 ` [RFC PATCH 1/5] mm: Enable fault around for shared file page fault Yin Fengwei
2023-01-30 13:21   ` Matthew Wilcox
2023-01-31  0:59     ` Yin, Fengwei
2023-01-30 12:55 ` [RFC PATCH 2/5] filemap: do file page mapping with folio granularity Yin Fengwei
2023-01-30 13:35   ` Matthew Wilcox
2023-01-31  1:03     ` Yin, Fengwei
2023-01-31  3:34   ` Huang, Ying
2023-01-31  6:32     ` Yin, Fengwei
2023-01-30 12:55 ` [RFC PATCH 3/5] rmap: add page_add_file_rmap_range() Yin Fengwei
2023-01-30 13:50   ` Matthew Wilcox
2023-01-31  7:24   ` Huang, Ying
2023-01-31  7:48     ` Yin, Fengwei
2023-01-30 12:55 ` [RFC PATCH 4/5] mm: add do_set_pte_entry() Yin Fengwei
2023-01-30 13:53   ` Matthew Wilcox
2023-01-31  1:06     ` Yin, Fengwei
2023-01-30 12:55 ` [RFC PATCH 5/5] filemap: batched update mm counter,rmap when map file folio Yin Fengwei
2023-01-30 14:14   ` Matthew Wilcox
2023-01-31  1:11     ` Yin, Fengwei
2023-01-30 12:58 ` Yin, Fengwei [this message]

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=ec4e3827-360e-41cf-696c-e040a867cd48@intel.com \
    --to=fengwei.yin@intel.com \
    --cc=dave.hansen@intel.com \
    --cc=david@redhat.com \
    --cc=linux-mm@kvack.org \
    --cc=tim.c.chen@intel.com \
    --cc=willy@infradead.org \
    --cc=ying.huang@intel.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 an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.