Re: [RFC][PATCH] kprobes: Add separate preempt_disabling for kprobes

From: Masami Hiramatsu
Date: Thu Jun 30 2011 - 21:22:21 EST


(2011/07/01 6:56), Peter Zijlstra wrote:
> On Thu, 2011-06-30 at 11:51 -0400, Steven Rostedt wrote:
>>
>> To solve this, I've added a per_cpu variable called
>> kprobe_preempt_disabled, that is set by the kprobe code. If it is set,
>> the preempt_schedule() will not preempt the code.

Sorry for replying so late :(

> Damn this is ugly. Can we step back and see if we can make the
> requirement for kprobe to disable preemption go away?

As I replied right now, I think we can just eliminate that
disabling preemption code. At least we'd better try it.
I agree with you, introducing this kind of complexity
just for kprobes is not what I want. :(

> Why does it have to do that anyway? Isn't it keeping enough per-task
> state to allow preemption over the single step?

preemption itself must not happen on single stepping, but it seems
impossible to do heavy context switching with setting TF bit...

Thank you,

--
Masami HIRAMATSU
Software Platform Research Dept. Linux Technology Center
Hitachi, Ltd., Yokohama Research Laboratory
E-mail: masami.hiramatsu.pt@xxxxxxxxxxx
--
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@xxxxxxxxxxxxxxx
More majordomo info at http://vger.kernel.org/majordomo-info.html
Please read the FAQ at http://www.tux.org/lkml/