mirror of https://lore.kernel.org/lkml/
 help / color / mirror / Atom feed
* [PATCH] likely cleanup: remove unlikely in sys_mprotect()
@ 2006-04-25 18:20 Hua Zhong
  0 siblings, 0 replies; only message in thread
From: Hua Zhong @ 2006-04-25 18:20 UTC (permalink / raw)
  To: linux-kernel; +Cc: akpm, linux-mm

With likely/unlikely profiling (see the recent patch dwalker@mvista.com sent), on my not-so-busy-typical-developmentsystem there are 5k misses vs 2k hits. So I guess we should remove the unlikely.

Signed-off-by: Hua Zhong <hzhong@gmail.com>

diff --git a/mm/mprotect.c b/mm/mprotect.c
index 4c14d42..5faf01a 100644
--- a/mm/mprotect.c
+++ b/mm/mprotect.c
@@ -205,8 +205,7 @@ sys_mprotect(unsigned long start, size_t
  	/*
  	 * Does the application expect PROT_READ to imply PROT_EXEC:
  	 */
-	if (unlikely((prot & PROT_READ) &&
-			(current->personality & READ_IMPLIES_EXEC)))
+	if ((prot & PROT_READ) && (current->personality & READ_IMPLIES_EXEC))
  		prot |= PROT_EXEC;

  	vm_flags = calc_vm_prot_bits(prot);

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

only message in thread, other threads:[~2006-04-25 18:21 UTC | newest]

Thread overview: (only message) (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2006-04-25 18:20 [PATCH] likely cleanup: remove unlikely in sys_mprotect() Hua Zhong

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox

all inboxes | Powered by JetHome®