On 08/16, Roland McGrath wrote: > > > In short: this double check allows to avoid tasklist when utrace_flags > > already has these bits while engine->flags doesn't. > > > > But multitracing is unlikely case, in the likely case if we add > > _UTRACE_DEATH_EVENTS to engine->flags we set these bits in utrace_flags > > too. I think it makes sense to consolidate these checks to make the > > code a bit more understandable. > > I don't really agree about "unlikely case". In many uses, the systemtap > task-finder will have a utrace engine on every task in the system, for > example. Moreover, this is an importantly distinct particular kind of > micro-optimization to be doing here: avoiding a system-wide lock. Any > place that we take tasklist_lock at all, we are introducing a system-wide > slowdown or limitation on scaling, just because of our tracing of one task. > So optimizing the minimize that is qualitatively different and really much > more important than avoiding taking the utrace lock, for example. > > But with that note in your mind, I am happy to take this patch now as a > simplification and let reoptimization come back later.
OK, agreed. Oleg.