Messages in this thread | | | Date | Tue, 18 Jun 2013 10:31:36 +0900 | From | Masami Hiramatsu <> | Subject | Re: Re: [PATCH] tracing/uprobes: Support ftrace_event_file base multibuffer |
| |
(2013/06/17 21:33), Steven Rostedt wrote: > On Mon, 2013-06-17 at 11:54 +0900, Masami Hiramatsu wrote: > >>> It makes a lot of sense to me, at least assuming no issues with the >>> interrupts being disabled, but the checks not spotting this. Here >>> is the check: >>> >>> preempt_count() != 0 || irqs_disabled() >>> >>> (With additional elaboration for if lockdep is enabled.) >> >> OK, I see. So I'll convert all the rcu_dereference_raw() to >> rcu_dereference_sched() except kprobe handler, because in the >> kprobe handler above check always be true. :) > > I would convert them all to rcu_dereference_sched(), the above check is > only when CONFIG_DEBUG_LOCK_ALLOC is set. It also annotates what is > protecting this variable. Please do not avoid a check because "it's > always true here". You also get people copying that code (like for > uprobes) and that will skip the check too. > > The only reason ftrace function tracer uses the raw (and now > raw_notrace) version is because it is extremely invasive, and these > checks done at *every* function call can actually live lock the system. > But other places in tracing use the appropriate rcu_dereference_*() > functions. If they do not, then they need to be fixed too.
Oh, I see. Anyway, it will be completely replaced by the Oleg's patch. Or should I fix that before his work?
Thank you,
-- Masami HIRAMATSU IT Management Research Dept. Linux Technology Center Hitachi, Ltd., Yokohama Research Laboratory E-mail: masami.hiramatsu.pt@hitachi.com
| |