[merged mm-stable] ksm-use-precise-linear_page_index-instead-of-the-whole-address-space.patch removed from -mm tree
Andrew Morton <[email protected]> Tue, 04 Aug 2026 19:24:50 -0700
| Newsgroups | org.kernel.vger.mm-commits |
|---|---|
| Message-ID | <[email protected]> |
The quilt patch titled
Subject: ksm: use precise linear_page_index instead of the whole address space
has been removed from the -mm tree. Its filename was
ksm-use-precise-linear_page_index-instead-of-the-whole-address-space.patch
This patch was dropped because it was merged into the mm-stable branch
of git://git.kernel.org/pub/scm/linux/kernel/git/akpm/mm
------------------------------------------------------
From: xu xin <[email protected]>
Subject: ksm: use precise linear_page_index instead of the whole address space
Date: Thu, 9 Jul 2026 17:33:12 +0800 (CST)
Since we now have linear_page_index available that we can use here,
allowing for optimizing the RMAP walk, we can also use it to locate more
precisely all related-processes when error hits the KSM page, which will
decrease a lot of invalid iterations.
Link: https://lore.kernel.org/[email protected]
Signed-off-by: xu xin <[email protected]>
Acked-by: David Hildenbrand (Arm) <[email protected]>
Cc: Chengming Zhou <[email protected]>
Signed-off-by: Andrew Morton <[email protected]>
---
mm/ksm.c | 5 +++--
1 file changed, 3 insertions(+), 2 deletions(-)
--- a/mm/ksm.c~ksm-use-precise-linear_page_index-instead-of-the-whole-address-space
+++ a/mm/ksm.c
@@ -3290,12 +3290,13 @@ void collect_procs_ksm(const struct foli
for_each_process(tsk) {
struct anon_vma_chain *vmac;
const unsigned long addr = rmap_item->address & PAGE_MASK;
+ const unsigned long index = rmap_item->linear_page_index;
struct task_struct *t =
task_early_kill(tsk, force_early);
if (!t)
continue;
- anon_vma_interval_tree_foreach(vmac, &av->rb_root, 0,
- ULONG_MAX)
+ anon_vma_interval_tree_foreach(vmac, &av->rb_root, index,
+ index)
{
vma = vmac->vma;
if (vma->vm_mm == t->mm) {
_
Patches currently in -mm which might be from [email protected] are
mm-mm_sloth-add-a-helper-function-mm_slot_remove.patch
mm-mm_sloth-add-comments-for-mm_slot_lookup-insert.patch