[PATCH?] avoid the unnecessary utrace_resume()->utrace_reset()

Oleg Nesterov oleg at redhat.com
Mon Oct 11 18:04:42 UTC 2010


On 08/18, Oleg Nesterov wrote:
>
> utrace_resume(UTRACE_REPORT) always calls utrace_reset() because
> start_callback() obviously can't clear report->spurious when
> event == 0.
>
> Change start_callback() to correctly clear ->spurious in this case.

Correctly????? I am stupid, and this patch is wrong (47c593ee in
your tree).

> --- kstub/kernel/utrace.c~10_utrace_resume_and_spurious	2010-08-18 19:00:50.000000000 +0200
> +++ kstub/kernel/utrace.c	2010-08-18 19:41:05.000000000 +0200
> @@ -1540,7 +1540,7 @@ static const struct utrace_engine_ops *s
>  	if (want & ENGINE_STOP)
>  		report->action = UTRACE_STOP;
>
> -	if (want & event) {
> +	if (want & (event ?: UTRACE_EVENT(QUIESCE))) {
>  		report->spurious = false;
>  		return ops;
>  	}

with this change utrace_resume()->start_callback() returns with
utrace->reporting != NULL !!! This obviously breaks utrace_barrier(),
it can hang "forever".

I noticed this by accident, when I was trying to understand the
problems with vCont changes.

I'll send the fix tomorrow. Damn, the fix is trivial but I'd like
to avoid another ugly check in start_callback(), and I don't think
utrace_resume() should clear ->reporting.

Oleg.




More information about the utrace-devel mailing list