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: 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


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