This is the mail archive of the
systemtap@sourceware.org
mailing list for the systemtap project.
RE: Instrumenting context switches
- From: "Stone, Joshua I" <joshua dot i dot stone at intel dot com>
- To: "Frank Ch. Eigler" <fche at redhat dot com>, "Perry Cheng" <perryche at us dot ibm dot com>
- Cc: <systemtap at sourceware dot org>
- Date: Wed, 29 Nov 2006 17:40:03 -0800
- Subject: RE: Instrumenting context switches
On Wednesday, November 29, 2006 4:47 PM, Frank Ch. Eigler wrote:
> It may be that this problem is due to the recent rewrite of
> gettimeofday_us. That code contains bits like preempt_disable() and
> _enable(), even though the equivalent (interrupt disabling) should
> already be done within probe context. In particular, I wonder if
> changing the latter to preempt_enable_no_resched() might improve the
> situation.
I'll take a look at whether some of the locking in the time subsystem
can go away, under the assumption that probes are always
interrupt-disabled. I took a very conservative approach, so I'm sure
some of that is overkill. However, the preempt_enable vs. _no_resched
shouldn't really cause a problem, because preempt_schedule checks for
irqs_disabled() anyway.
I think this is a red herring for Perry though. He mentions that simply
taking out his _stp_printf statement makes things work, so the
gettimeofday_us is still being called in the working case.
A wild guess -- the stack is transitioning in __switch_to, so might it
be that _stp_printf is running out-of-bounds somehow?
Josh