Messages in this thread | | | Subject | Re: [RFC PATCH -tip ] [BUGFIX] x86: Remove preempt disabling from kprobes | From | Steven Rostedt <> | Date | Fri, 01 Jul 2011 09:53:31 -0400 |
| |
On Fri, 2011-07-01 at 09:43 -0400, Steven Rostedt wrote:
> I applied it to v3.0-rc5. And not surprisingly it works. But the > question I have is, when we return from the trap, and NEED_RECHED is > set, will it schedule? My test placed the probe within the scheduler > where preemption is already disabled. Let me do this in places that has > preemption and interrupts enabled. > > I'll also try a kernel mod that adds a probe handler that does a > udelay() loop, forcing the timer interrupt to be set on return of the > trap, and see what happens there.
I didn't need to do the above. Just adding a probe at the beginning of schedule() should do the trick. As I see from the latency-format option set, that NEED_RESCHED is enabled when we enter the path. If interrupts are enabled on single step, I would think that the code would go into an infinite loop if it had issues there.
Thus I think we can say that removing preempt_disable() from kprobes in x86_64 (and probably 32) is safe. I'll go and test this on my PPC64 and mips (if I can get that compiled).
-- Steve
| |