From: Hua Zhong <hzhong@gmail.com>
To: linux-kernel@vger.kernel.org
Cc: akpm@osdl.org, linux-mm@vger.kernel.org
Subject: [PATCH] likely cleanup: remove unlikely in sys_mprotect()
Date: Tue, 25 Apr 2006 11:20:38 -0700 (PDT) [thread overview]
Message-ID: <Pine.LNX.4.64.0604251118110.5810@localhost.localdomain> (raw)
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);
reply other threads:[~2006-04-25 18:21 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=Pine.LNX.4.64.0604251118110.5810@localhost.localdomain \
--to=hzhong@gmail.com \
--cc=akpm@osdl.org \
--cc=linux-kernel@vger.kernel.org \
--cc=linux-mm@vger.kernel.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 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®