> This is the minimal temporary ugly fix for now, we should certainly
> cleanup and simplify this logic. The barriers in mark_engine_detached()
> and in start_callback() can't help and should be removed. If we ignore
> utrace_get_signal() we do not even need utrace_detached_quiesce(),
> start_callback() could just do

Agreed.  I applied the patch for now.

> I think in the longer term mark_engine_detached() should not change
> engine->flags at all but add QUIESCE to ->utrace_flags. However, this
> breaks utrace_maybe_reap(reap => true) and we should avoid the race
> with finish_callback() which clears ->reporting after report_quiesce().

What's the benefit to adding QUIESCE?  If any utrace code gets entered at
all, then any callback run will be able to do the special-case ops check
for detached engines.

> A bit off-topic, but I don't think finish_callback() should check
> engine->ops == &utrace_detached_ops before return. Instead we should
> change finish_callback_report() to return the boolean. We shouldn't
> return true without setting report->detaches.

Ok.


Thanks,
Roland

Reply via email to