This is the mail archive of the
systemtap@sourceware.org
mailing list for the systemtap project.
Re: [RFC][Patch 2/2][take3]kprobe: kprobe-booster against 2.6.15-rc5-mm3 for i386
- From: Masami Hiramatsu <hiramatu at sdl dot hitachi dot co dot jp>
- To: ananth at in dot ibm dot com
- Cc: maneesh at in dot ibm dot com, anil dot s dot keshavamurthy at intel dot com, systemtap at sources dot redhat dot com, Yumiko Sugita <sugita at sdl dot hitachi dot co dot jp>, Satoshi Oshima <soshima at redhat dot com>, Hideo Aoki <haoki at redhat dot com>
- Date: Tue, 24 Jan 2006 22:23:17 +0900
- Subject: Re: [RFC][Patch 2/2][take3]kprobe: kprobe-booster against 2.6.15-rc5-mm3 for i386
- References: <43AAA8F4.3070601@sdl.hitachi.co.jp> <20060124090348.GB3607@in.ibm.com>
Hi, Ananth
Thank you for review.
Ananth N Mavinakayanahalli wrote:
>>@@ -227,6 +275,19 @@ static int __kprobes kprobe_handler(stru
>> /* handler has already set things up, so skip ss setup */
>> return 1;
>>
>>+ if (p->ainsn.boostable == 1 &&
>>+#ifdef CONFIG_PREEMPT
>>+ preempt_count() != 1 && /* This enables booster when the
>>+ direct execution path aren't preempted. */
> ^^^^^
> Why is the comparison against an absolute value? preempt_disable/enable()
> can be nested and on each such invocation, the count is
> incremented/decremented respectively - this number can be 0 or hold
> any positive value.
I could not find validate function/macro of preempt_count(), so I used an
absolute value.
I have an idea to remove the absolute value.
I will store the value of preempt_count() into an local variable before
the preempt_disable() calling, and will check the local variable instead
of preempt_count() itself. Thus I can write as below:
#ifdef CONFIG_PREEMPT
!(local_preempt_count) &&
#endif
Is this OK?
> And multiline comments in
> /*
> *
> */
> format please
OK. I will fix that.
--
Masami HIRAMATSU
2nd Research Dept.
Hitachi, Ltd., Systems Development Laboratory
E-mail: hiramatu@sdl.hitachi.co.jp