Re: [PATCH][RFC] Adding information of counts processes acquired how many spinlocks to schedstat

From: Andi Kleen
Date: Mon Jul 06 2009 - 07:55:02 EST


> Maybe re-use the LOCK_CONTENDED macros for this, but I'm not sure we
> want to go there and put code like this on the lock hot-paths for !debug
> kernels.

My concern was similar.

I suspect it would be in theory ok for the slow spinning path, but I am
somewhat concerned about the additional cache miss for checking
the global flag even in this case. This could hurt when
the kernel is running fully cache hold, in that the cache miss
might be far more expensive that short spin.

Needs immediate value patching or just use a jumper kprobe when it's
really needed? I think I would prefer the later variant.

-Andi

--
ak@xxxxxxxxxxxxxxx -- Speaking for myself only.
--
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@xxxxxxxxxxxxxxx
More majordomo info at http://vger.kernel.org/majordomo-info.html
Please read the FAQ at http://www.tux.org/lkml/