This is the mail archive of the systemtap@sourceware.org mailing list for the systemtap project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

Re: [RFC][Patch 2/2][take3]kprobe: kprobe-booster against 2.6.15-rc5-mm3 for i386


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


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]