mirror of https://lore.kernel.org/lkml/
 help / color / mirror / Atom feed
From: John Kacur <jkacur@rogers.com>
To: Thomas Gleixner <tglx@linutronix.de>, Ingo Molnar <mingo@elte.hu>
Cc: john stultz <johnstul@us.ibm.com>,
	Steven Rostedt <rostedt@goodmis.org>,
	Darren Hart <dvhltc@us.ibm.com>,
	lkml <linux-kernel@vger.kernel.org>
Subject: register_timer_hook fails on realtime kernel with CONFIG_PROFILE_NMI
Date: Sun, 06 Aug 2006 01:59:37 -0400	[thread overview]
Message-ID: <1154843977.7027.33.camel@moblin.mtmk.phub.net.cable.rogers.com> (raw)

Hi,
I wrote a "Very Simple Timer Notification Module", which calls
register_timer_hook to register a function to be called using the timer
interrupt. This is essentially what OProfile would do in timer interrupt
mode. The standard kernel allows you to do this even if
CONFIG_PROFILE_NMI is defined but the realtime kernel does not. With the
realtime kernel register_timer_hook succeeds but the timer hooks is
never called. From patch-2.6.17-rt8 the following modifies
linux/include/linux/clockchips.h
+#ifndef CONFIG_PROFILE_NMI
+#define CLOCK_CAP_PROFILE	0x000008
+#else
+#define CLOCK_CAP_PROFILE	0x000000
+#endif

So, it's simple enough to work around, by just making CLOCK_CAP_PROFILE
0x000008 regardless of whether CONFIG_PROFILE_NMI is defined or not, but
I would like to understand the intention of the authors here. Is there a
good reason to disallow the timer interrupt mode of profiling if
CONFIG_PROFILE_NMI is defined? (other than arguing that NMI profiling is
superior)

I have included vstnm.tar.bz2 in case it is of any help examinig the
problem. Just do:
tar xjf vstnm.tar.bz2
cd vstnm
make
make install
then use the script load_vstnm to load the module and unload_vstnm to
unload the module. If the timer_tick function is called it will print a
rate limited message to the console that it was called.

Thank you



             reply	other threads:[~2006-08-06  5:59 UTC|newest]

Thread overview: 2+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2006-08-06  5:59 John Kacur [this message]
2006-08-06  6:05 ` John Kacur

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=1154843977.7027.33.camel@moblin.mtmk.phub.net.cable.rogers.com \
    --to=jkacur@rogers.com \
    --cc=dvhltc@us.ibm.com \
    --cc=johnstul@us.ibm.com \
    --cc=linux-kernel@vger.kernel.org \
    --cc=mingo@elte.hu \
    --cc=rostedt@goodmis.org \
    --cc=tglx@linutronix.de \
    /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®