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]

[Bug translator/17055] _stp_perf_read needs a sleepable context


https://sourceware.org/bugzilla/show_bug.cgi?id=17055

--- Comment #3 from Josh Stone <jistone at redhat dot com> ---
(In reply to David Smith from comment #2)
> For storage, I'm using a per-cpu variable.

If a probe handler is re-entered, they may clobber each other.  This won't
happen for uprobes, but could for kprobes.

(@perf appears to be accepted in a kprobe, but fails at runtime for me in a
quick test.  If this is not supposed to be supported, it needs to fail
earlier.)

But doing anything with per-cpu or smp_processor_id() outside of atomic context
is risky.  If the perf read did sleep, or you were otherwise preempted, you
might wake up on another cpu altogether.  (as raised in one of your FIXMEs)

-- 
You are receiving this mail because:
You are the assignee for the bug.

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