Re: [PATCH] powerpc/perf: Fix for core/nest imc call trace on cpuhotplug

From: Michael Ellerman
Date: Thu Sep 21 2017 - 00:35:02 EST


Anju T Sudhakar <anju@xxxxxxxxxxxxxxxxxx> writes:

> Nest/core pmu units are enabled only when it is used. A reference count is
> maintained for the events which uses the nest/core pmu units. Currently in
> *_imc_counters_release function a WARN() is used for notification of any
> underflow of ref count. Replace WARN() with a pr_info since it is an overkill.

As discussed elsewhere this is not the right solution.

If it's OK for the reference count to be negative, then we shouldn't
print anything when it is.

But I don't understand how it can be OK for the refcount to be negative.
That means someone has a negative number of references to something?

cheers