From: Andrew Morton <akpm@linux-foundation.org>
To: mm-commits@vger.kernel.org, ziy@nvidia.com, yuzhao@google.com,
ying.huang@intel.com, willy@infradead.org, shy828301@gmail.com,
fengwei.yin@intel.com, david@redhat.com, ryan.roberts@arm.com,
akpm@linux-foundation.org
Subject: + mm-allow-deferred-splitting-of-arbitrary-large-anon-folios.patch added to mm-unstable branch
Date: Thu, 20 Jul 2023 10:13:51 -0700 [thread overview]
Message-ID: <20230720171352.1F7C4C433C7@smtp.kernel.org> (raw)
The patch titled
Subject: mm: allow deferred splitting of arbitrary large anon folios
has been added to the -mm mm-unstable branch. Its filename is
mm-allow-deferred-splitting-of-arbitrary-large-anon-folios.patch
This patch will shortly appear at
https://git.kernel.org/pub/scm/linux/kernel/git/akpm/25-new.git/tree/patches/mm-allow-deferred-splitting-of-arbitrary-large-anon-folios.patch
This patch will later appear in the mm-unstable branch at
git://git.kernel.org/pub/scm/linux/kernel/git/akpm/mm
Before you just go and hit "reply", please:
a) Consider who else should be cc'ed
b) Prefer to cc a suitable mailing list as well
c) Ideally: find the original patch on the mailing list and do a
reply-to-all to that, adding suitable additional cc's
*** Remember to use Documentation/process/submit-checklist.rst when testing your code ***
The -mm tree is included into linux-next via the mm-everything
branch at git://git.kernel.org/pub/scm/linux/kernel/git/akpm/mm
and is updated there every 2-3 working days
------------------------------------------------------
From: Ryan Roberts <ryan.roberts@arm.com>
Subject: mm: allow deferred splitting of arbitrary large anon folios
Date: Thu, 20 Jul 2023 12:29:53 +0100
Patch series "Optimize large folio interaction with deferred split" v3.
A small series in support of my work to enable the use of large folios for
anonymous memory (known as "FLEXIBLE_THP" or "LARGE_ANON_FOLIO") [1]. It
first makes it possible to add large, non-pmd-mappable folios to the
deferred split queue. Then it modifies zap_pte_range() to batch-remove
spans of physically contiguous pages from the rmap, which means that in
the common case, we elide the need to ever put the folio on the deferred
split queue, thus reducing lock contention and improving performance.
This becomes more visible once we have lots of large anonymous folios in
the system, and Huang Ying has suggested solving this needs to be a
prerequisit for merging the main FLEXIBLE_THP/LARGE_ANON_FOLIO work.
This patch (of 3):
In preparation for the introduction of large folios for anonymous memory,
we would like to be able to split them when they have unmapped subpages,
in order to free those unused pages under memory pressure. So remove the
artificial requirement that the large folio needed to be at least
PMD-sized.
Link: https://lkml.kernel.org/r/20230720112955.643283-1-ryan.roberts@arm.com
Link: https://lkml.kernel.org/r/20230720112955.643283-2-ryan.roberts@arm.com
Signed-off-by: Ryan Roberts <ryan.roberts@arm.com>
Reviewed-by: Yu Zhao <yuzhao@google.com>
Reviewed-by: Yin Fengwei <fengwei.yin@intel.com>
Reviewed-by: Matthew Wilcox (Oracle) <willy@infradead.org>
Reviewed-by: David Hildenbrand <david@redhat.com>
Cc: Huang, Ying <ying.huang@intel.com>
Cc: Yang Shi <shy828301@gmail.com>
Cc: Zi Yan <ziy@nvidia.com>
Signed-off-by: Andrew Morton <akpm@linux-foundation.org>
---
mm/rmap.c | 4 ++--
1 file changed, 2 insertions(+), 2 deletions(-)
--- a/mm/rmap.c~mm-allow-deferred-splitting-of-arbitrary-large-anon-folios
+++ a/mm/rmap.c
@@ -1414,11 +1414,11 @@ void page_remove_rmap(struct page *page,
__lruvec_stat_mod_folio(folio, idx, -nr);
/*
- * Queue anon THP for deferred split if at least one
+ * Queue anon large folio for deferred split if at least one
* page of the folio is unmapped and at least one page
* is still mapped.
*/
- if (folio_test_pmd_mappable(folio) && folio_test_anon(folio))
+ if (folio_test_large(folio) && folio_test_anon(folio))
if (!compound || nr < nr_pmdmapped)
deferred_split_folio(folio);
}
_
Patches currently in -mm which might be from ryan.roberts@arm.com are
mm-allow-deferred-splitting-of-arbitrary-large-anon-folios.patch
mm-implement-folio_remove_rmap_range.patch
mm-batch-zap-large-anonymous-folio-pte-mappings.patch
next reply other threads:[~2023-07-20 17:13 UTC|newest]
Thread overview: 3+ messages / expand[flat|nested] mbox.gz Atom feed top
2023-07-20 17:13 Andrew Morton [this message]
-- strict thread matches above, loose matches on Subject: below --
2023-07-27 16:38 + mm-allow-deferred-splitting-of-arbitrary-large-anon-folios.patch added to mm-unstable branch Andrew Morton
2023-08-10 16:31 Andrew Morton
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=20230720171352.1F7C4C433C7@smtp.kernel.org \
--to=akpm@linux-foundation.org \
--cc=david@redhat.com \
--cc=fengwei.yin@intel.com \
--cc=linux-kernel@vger.kernel.org \
--cc=mm-commits@vger.kernel.org \
--cc=ryan.roberts@arm.com \
--cc=shy828301@gmail.com \
--cc=willy@infradead.org \
--cc=ying.huang@intel.com \
--cc=yuzhao@google.com \
--cc=ziy@nvidia.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.