From: Andrew Morton <akpm@linux-foundation.org>
To: mm-commits@vger.kernel.org,alexs@kernel.org,willy@infradead.org,akpm@linux-foundation.org
Subject: + ksm-convert-should_skip_rmap_item-to-take-a-folio.patch added to mm-unstable branch
Date: Wed, 02 Oct 2024 13:55:33 -0700 [thread overview]
Message-ID: <20241002205534.78D6FC4CEC2@smtp.kernel.org> (raw)
The patch titled
Subject: ksm: convert should_skip_rmap_item() to take a folio
has been added to the -mm mm-unstable branch. Its filename is
ksm-convert-should_skip_rmap_item-to-take-a-folio.patch
This patch will shortly appear at
https://git.kernel.org/pub/scm/linux/kernel/git/akpm/25-new.git/tree/patches/ksm-convert-should_skip_rmap_item-to-take-a-folio.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: "Matthew Wilcox (Oracle)" <willy@infradead.org>
Subject: ksm: convert should_skip_rmap_item() to take a folio
Date: Wed, 2 Oct 2024 16:25:29 +0100
Remove a call to PageKSM() by passing the folio containing tmp_page to
should_skip_rmap_item. Removes a hidden call to compound_head().
Link: https://lkml.kernel.org/r/20241002152533.1350629-4-willy@infradead.org
Signed-off-by: Matthew Wilcox (Oracle) <willy@infradead.org>
Cc: Alex Shi <alexs@kernel.org>
Signed-off-by: Andrew Morton <akpm@linux-foundation.org>
---
mm/ksm.c | 8 ++++----
1 file changed, 4 insertions(+), 4 deletions(-)
--- a/mm/ksm.c~ksm-convert-should_skip_rmap_item-to-take-a-folio
+++ a/mm/ksm.c
@@ -2401,10 +2401,10 @@ static unsigned int skip_age(rmap_age_t
/*
* Determines if a page should be skipped for the current scan.
*
- * @page: page to check
+ * @folio: folio containing the page to check
* @rmap_item: associated rmap_item of page
*/
-static bool should_skip_rmap_item(struct page *page,
+static bool should_skip_rmap_item(struct folio *folio,
struct ksm_rmap_item *rmap_item)
{
rmap_age_t age;
@@ -2417,7 +2417,7 @@ static bool should_skip_rmap_item(struct
* will essentially ignore them, but we still have to process them
* properly.
*/
- if (PageKsm(page))
+ if (folio_test_ksm(folio))
return false;
age = rmap_item->age;
@@ -2560,7 +2560,7 @@ next_mm:
ksm_scan.rmap_list =
&rmap_item->rmap_list;
- if (should_skip_rmap_item(tmp_page, rmap_item)) {
+ if (should_skip_rmap_item(folio, rmap_item)) {
folio_put(folio);
goto next_page;
}
_
Patches currently in -mm which might be from willy@infradead.org are
ksm-use-a-folio-in-try_to_merge_one_page.patch
ksm-convert-cmp_and_merge_page-to-use-a-folio.patch
ksm-convert-should_skip_rmap_item-to-take-a-folio.patch
mm-add-pageanonnotksm.patch
mm-remove-pageksm.patch
reply other threads:[~2024-10-02 20:55 UTC|newest]
Thread overview: [no followups] expand[flat|nested] mbox.gz Atom feed
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=20241002205534.78D6FC4CEC2@smtp.kernel.org \
--to=akpm@linux-foundation.org \
--cc=alexs@kernel.org \
--cc=mm-commits@vger.kernel.org \
--cc=willy@infradead.org \
/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.