All of lore.kernel.org
 help / color / mirror / Atom feed
* [merged mm-stable] ksm-use-precise-linear_page_index-instead-of-the-whole-address-space.patch removed from -mm tree
@ 2026-08-05  2:24 Andrew Morton
  0 siblings, 0 replies; only message in thread
From: Andrew Morton @ 2026-08-05  2:24 UTC (permalink / raw)
  To: mm-commits, david, chengming.zhou, xu.xin16, akpm


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 <xu.xin16@zte.com.cn>
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/20260709173312403qgj1Af6pRkFMDSsmc19sM@zte.com.cn
Signed-off-by: xu xin <xu.xin16@zte.com.cn>
Acked-by: David Hildenbrand (Arm) <david@kernel.org>
Cc: Chengming Zhou <chengming.zhou@linux.dev>
Signed-off-by: Andrew Morton <akpm@linux-foundation.org>
---

 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 xu.xin16@zte.com.cn are

mm-mm_sloth-add-a-helper-function-mm_slot_remove.patch
mm-mm_sloth-add-comments-for-mm_slot_lookup-insert.patch


^ permalink raw reply	[flat|nested] only message in thread

only message in thread, other threads:[~2026-08-05  2:24 UTC | newest]

Thread overview: (only message) (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2026-08-05  2:24 [merged mm-stable] ksm-use-precise-linear_page_index-instead-of-the-whole-address-space.patch removed from -mm tree Andrew Morton

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.