All of lore.kernel.org
 help / color / mirror / Atom feed
* [merged mm-stable] mm-remove-misleading-unlikely-hint-in-vms_gather_munmap_vmas.patch removed from -mm tree
@ 2024-11-06  0:59 Andrew Morton
  0 siblings, 0 replies; only message in thread
From: Andrew Morton @ 2024-11-06  0:59 UTC (permalink / raw)
  To: mm-commits, vbabka, lorenzo.stoakes, Liam.Howlett, leitao, akpm


The quilt patch titled
     Subject: mm: remove misleading 'unlikely' hint in vms_gather_munmap_vmas()
has been removed from the -mm tree.  Its filename was
     mm-remove-misleading-unlikely-hint-in-vms_gather_munmap_vmas.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: Breno Leitao <leitao@debian.org>
Subject: mm: remove misleading 'unlikely' hint in vms_gather_munmap_vmas()
Date: Fri, 4 Oct 2024 09:48:31 -0700

Performance analysis using branch annotation on a fleet of 200 hosts
running web servers revealed that the 'unlikely' hint in
vms_gather_munmap_vmas() was 100% consistently incorrect.  In all observed
cases, the branch behavior contradicted the hint.

Remove the 'unlikely' qualifier from the condition checking 'vms->uf'.  By
doing so, we allow the compiler to make optimization decisions based on
its own heuristics and profiling data, rather than relying on a static
hint that has proven to be inaccurate in real-world scenarios.

Link: https://lkml.kernel.org/r/20241004164832.218681-1-leitao@debian.org
Signed-off-by: Breno Leitao <leitao@debian.org>
Reviewed-by: Lorenzo Stoakes <lorenzo.stoakes@oracle.com>
Acked-by: Vlastimil Babka <vbabka@suse.cz>
Reviewed-by: Liam R. Howlett <Liam.Howlett@oracle.com>
Signed-off-by: Andrew Morton <akpm@linux-foundation.org>
---

 mm/vma.c |    2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

--- a/mm/vma.c~mm-remove-misleading-unlikely-hint-in-vms_gather_munmap_vmas
+++ a/mm/vma.c
@@ -1254,7 +1254,7 @@ int vms_gather_munmap_vmas(struct vma_mu
 		else if (is_data_mapping(next->vm_flags))
 			vms->data_vm += nrpages;
 
-		if (unlikely(vms->uf)) {
+		if (vms->uf) {
 			/*
 			 * If userfaultfd_unmap_prep returns an error the vmas
 			 * will remain split, but userland will get a
_

Patches currently in -mm which might be from leitao@debian.org are

scripts-decode_stacktracesh-remove-trailing-space.patch


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

only message in thread, other threads:[~2024-11-06  0:59 UTC | newest]

Thread overview: (only message) (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2024-11-06  0:59 [merged mm-stable] mm-remove-misleading-unlikely-hint-in-vms_gather_munmap_vmas.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.