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

H. Peter Anvin
2016-01-13T22:23:02Z

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