All of lore.kernel.org
 help / color / mirror / Atom feed
* [RFC PATCH 0/5] folio based filemap_map_pages()
@ 2023-01-30 12:54 Yin Fengwei
  2023-01-30 12:55 ` [RFC PATCH 1/5] mm: Enable fault around for shared file page fault Yin Fengwei
                   ` (5 more replies)
  0 siblings, 6 replies; 20+ messages in thread
From: Yin Fengwei @ 2023-01-30 12:54 UTC (permalink / raw)
  To: willy, david, linux-mm; +Cc: dave.hansen, tim.c.chen, ying.huang, fengwei.yin

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)


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(-)

-- 
2.30.2



^ permalink raw reply	[flat|nested] 20+ messages in thread

end of thread, other threads:[~2023-01-31  7:49 UTC | newest]

Thread overview: 20+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
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 ` [RFC PATCH 0/5] folio based filemap_map_pages() Yin, Fengwei

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.