From: Joao Martins <joao.m.martins@oracle.com>
To: linux-mm@kvack.org
Cc: linux-kernel@vger.kernel.org,
Mike Kravetz <mike.kravetz@oracle.com>,
Andrew Morton <akpm@linux-foundation.org>,
Joao Martins <joao.m.martins@oracle.com>
Subject: [PATCH 0/2] mm/hugetlb: follow_hugetlb_page() improvements
Date: Mon, 25 Jan 2021 20:57:42 +0000 [thread overview]
Message-ID: <20210125205744.10203-1-joao.m.martins@oracle.com> (raw)
Hey,
While looking at ZONE_DEVICE struct page reuse particularly the last
patch[0], I found two possible improvements for follow_hugetlb_page()
which is solely used for get_user_pages()/pin_user_pages().
The first patch batches page refcount updates while the second tidies
up storing the subpages/vmas. Both together bring the cost of slow
variant of gup() cost from ~86k usecs to ~4.4k usecs.
libhugetlbfs tests seem to pass as well gup_test benchmarks
with hugetlbfs vmas.
[0] https://lore.kernel.org/linux-mm/20201208172901.17384-11-joao.m.martins@oracle.com/
Joao Martins (2):
mm/hugetlb: grab head page refcount once per group of subpages
mm/hugetlb: refactor subpage recording
include/linux/mm.h | 3 +++
mm/gup.c | 5 ++--
mm/hugetlb.c | 66 +++++++++++++++++++++++++++-------------------
3 files changed, 44 insertions(+), 30 deletions(-)
--
2.17.1
next reply other threads:[~2021-01-25 21:03 UTC|newest]
Thread overview: 15+ messages / expand[flat|nested] mbox.gz Atom feed top
2021-01-25 20:57 Joao Martins [this message]
2021-01-25 20:57 ` [PATCH 1/2] mm/hugetlb: grab head page refcount once per group of subpages Joao Martins
2021-01-26 2:14 ` Mike Kravetz
2021-01-25 20:57 ` [PATCH 2/2] mm/hugetlb: refactor subpage recording Joao Martins
2021-01-26 18:08 ` Mike Kravetz
2021-01-26 19:21 ` Joao Martins
2021-01-26 19:24 ` Joao Martins
2021-01-26 21:21 ` Mike Kravetz
2021-01-26 23:20 ` Joao Martins
2021-01-27 0:07 ` Jason Gunthorpe
2021-01-27 1:58 ` Mike Kravetz
2021-01-27 2:10 ` Jason Gunthorpe
2021-02-13 21:12 ` Mike Kravetz
2021-01-27 2:24 ` Matthew Wilcox
2021-01-27 2:50 ` Zi Yan
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=20210125205744.10203-1-joao.m.martins@oracle.com \
--to=joao.m.martins@oracle.com \
--cc=akpm@linux-foundation.org \
--cc=linux-kernel@vger.kernel.org \
--cc=linux-mm@kvack.org \
--cc=mike.kravetz@oracle.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).