From: "Matthew Wilcox (Oracle)" <willy@infradead.org>
To: Yin Fengwei <fengwei.yin@intel.com>, linux-mm@kvack.org
Cc: "Matthew Wilcox (Oracle)" <willy@infradead.org>,
david@redhat.com, dave.hansen@intel.com, tim.c.chen@intel.com,
ying.huang@intel.com
Subject: [PATCH v5 0/5] Batched page table updates for file-backed large folios
Date: Tue, 7 Feb 2023 19:49:30 +0000 [thread overview]
Message-ID: <20230207194937.122543-1-willy@infradead.org> (raw)
On page fault, filemap_map_pages() already retrieves a folio from the page
cache and iterates over it, which realised some savings. This patch series
drives that further down by allowing filemap to tell the MM to map a
contiguous range of pages in the folio. This improves performance by
batching the updates to the folio's refcount and the rmap counters.
Testing with a micro benchmark like will-it-scale.pagefault on a
48C/96T IceLake box showed:
- batched rmap brings around 15% performance gain
- batched refcount brings around 2% performance gain
v4:
- Add the set_ptes() architecture interface
- Change various interfaces to take (folio, struct page *, nr) instead of
(folio, unsigned long start, nr)
- Remove do_set_pte() instead of keeping a compat interface
- Add a check in set_pte_range() to ensure that large anon folios are not
being passed in yet (David Hildenbrand)
- Save / restore the old vmf->pte pointer instead of passing a different
pte pointer to set_pte_range()
Matthew Wilcox (Oracle) (1):
mm: Add generic set_ptes()
Yin Fengwei (4):
filemap: Add filemap_map_folio_range()
rmap: add folio_add_file_rmap_range()
mm: Convert do_set_pte() to set_pte_range()
filemap: Batch PTE mappings
Documentation/filesystems/locking.rst | 2 +-
include/linux/mm.h | 3 +-
include/linux/pgtable.h | 27 +++++++
include/linux/rmap.h | 2 +
mm/filemap.c | 111 ++++++++++++++++----------
mm/memory.c | 31 ++++---
mm/rmap.c | 60 ++++++++++----
7 files changed, 164 insertions(+), 72 deletions(-)
--
2.35.1
next reply other threads:[~2023-02-07 19:49 UTC|newest]
Thread overview: 12+ messages / expand[flat|nested] mbox.gz Atom feed top
2023-02-07 19:49 Matthew Wilcox (Oracle) [this message]
2023-02-07 19:49 ` [PATCH v5 1/5] filemap: Add filemap_map_folio_range() Matthew Wilcox (Oracle)
2023-02-07 19:49 ` [PATCH v5 2/5] mm: Add generic set_ptes() Matthew Wilcox (Oracle)
2023-02-08 0:48 ` kernel test robot
2023-02-08 2:20 ` kernel test robot
2023-02-08 4:57 ` Yin Fengwei
2023-02-08 8:38 ` Kirill A. Shutemov
2023-02-08 18:14 ` Matthew Wilcox
2023-02-09 8:11 ` Kirill A. Shutemov
2023-02-07 19:49 ` [PATCH v5 3/5] rmap: add folio_add_file_rmap_range() Matthew Wilcox (Oracle)
2023-02-07 19:49 ` [PATCH v5 4/5] mm: Convert do_set_pte() to set_pte_range() Matthew Wilcox (Oracle)
2023-02-07 19:49 ` [PATCH v5 5/5] filemap: Batch PTE mappings Matthew Wilcox (Oracle)
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=20230207194937.122543-1-willy@infradead.org \
--to=willy@infradead.org \
--cc=dave.hansen@intel.com \
--cc=david@redhat.com \
--cc=fengwei.yin@intel.com \
--cc=linux-mm@kvack.org \
--cc=tim.c.chen@intel.com \
--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 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).