public inbox for linux-kernel@vger.kernel.org
 help / color / mirror / Atom feed
From: Matt Helsley <matthltc@us.ibm.com>
To: Philippe Elie <phil.el@wanadoo.fr>
Cc: oprofile-list@lists.sourceforge.net, LKML <linux-kernel@vger.kernel.org>
Subject: Mark profile notifier blocks __read_mostly
Date: Mon, 12 Jun 2006 19:01:52 -0700	[thread overview]
Message-ID: <1150164112.21787.68.camel@stark> (raw)

Mark profile notifier blocks __read_mostly since once registered they tend
not to be written. This seems like a good idea but I'm not yet familiar
enough with the profile paths to be certain.

Compiles, boots, and runs with CONFIG_PROFILING=y and readprofile on a 4-way
Opteron running Debian Sarge.

Signed-off-by: Matt Helsley <matthltc@us.ibm.com>
Cc: oprofile-list@lists.sf.net
--

Booted with profile=2
Profiling 3 iterations of kernbench
readprofile output | grep profile:
	without this patch:
	     1 write_profile                              0.0037
	     1 profile_tick                               0.0112
	     1 profile_munmap                             0.0435

	with this patch:
	     1 write_profile                              0.0037

(full readprofile results available for posting upon request)

 drivers/oprofile/buffer_sync.c |    8 ++++----
 1 files changed, 4 insertions(+), 4 deletions(-)

Index: linux-2.6.17-rc6-mm2/drivers/oprofile/buffer_sync.c
===================================================================
--- linux-2.6.17-rc6-mm2.orig/drivers/oprofile/buffer_sync.c
+++ linux-2.6.17-rc6-mm2/drivers/oprofile/buffer_sync.c
@@ -115,23 +115,23 @@ static int module_load_notify(struct not
 #endif
 	return 0;
 }
 
  
-static struct notifier_block task_free_nb = {
+static struct notifier_block __read_mostly task_free_nb = {
 	.notifier_call	= task_free_notify,
 };
 
-static struct notifier_block task_exit_nb = {
+static struct notifier_block __read_mostly task_exit_nb = {
 	.notifier_call	= task_exit_notify,
 };
 
-static struct notifier_block munmap_nb = {
+static struct notifier_block __read_mostly munmap_nb = {
 	.notifier_call	= munmap_notify,
 };
 
-static struct notifier_block module_load_nb = {
+static struct notifier_block __read_mostly module_load_nb = {
 	.notifier_call = module_load_notify,
 };
 
  
 static void end_sync(void)



                 reply	other threads:[~2006-06-13  2:13 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=1150164112.21787.68.camel@stark \
    --to=matthltc@us.ibm.com \
    --cc=linux-kernel@vger.kernel.org \
    --cc=oprofile-list@lists.sourceforge.net \
    --cc=phil.el@wanadoo.fr \
    /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