Re: [PATCH v2 2/2] powercap/rapl: reduce ipi calls

From: H. Peter Anvin
Date: Wed Jan 13 2016 - 17:24:11 EST


On 01/13/16 14:11, Jacob Pan wrote:
>
> The balance of pros and cons depends on the number of occurrence. The
> lib call overhead is constant where saving from the callers are
> multiplied. Anyway, I will go back to my original code until we have
> enough callers to tip the balance.
>

The thing about premature librarization is that it can cause very
unnatural code to end up being written. Until it is clear what the APIs
we actually need are, we shouldn't force them into a mold. Of course,
it often makes sense to make these *local* APIs that, if useful, can get
globalized.

-hpa