> (a very minor nit: s/read_barrier_depends/smp_read_barrier_depends/)

commit 23ab966

> Just to complete the discussion, we could do
> 
>       static inline unsigned long task_utrace_flags(struct task_struct *task)
>       {
>               if (!task->utrace)
>                       return 0;
>               return task->utrace_flags;
>       }
> 
> to void rmb() without complicationg the code, but this still adds
> some overhead to the hot path.

Right.

> And a bit offtopic question. Apart from "task_utrace_flags() should
> be as fast as possible", any other reason we can't move ->utrace_flags
> into "struct utrace" ?

No, I think that's the only reason.  But this one reason has a nuance
that your suggestion overlooks.  We've been saying "the hot path" and
"the tracing path" as if there were just one bifurcation to consider.
But that's not really so.  The hot paths are all the places that call
tracehook.h functions (roughly speaking).  Each of these has its own
bifurcation between a hot path and a tracing path.  Each of these
tests a different utrace_flags bit.  So e.g. if utrace_flags has only
UTRACE_EVENT(SIGNAL_CORE), then tracehook_report_exit() is still a
"hot path" that does not need to go off into utrace code at all.


Thanks,
Roland

Reply via email to