[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <5696CE46.1000802@zytor.com>
Date: Wed, 13 Jan 2016 14:23:02 -0800
From: "H. Peter Anvin" <hpa@...or.com>
To: Jacob Pan <jacob.jun.pan@...ux.intel.com>,
Thomas Gleixner <tglx@...utronix.de>
Cc: Srinivas Pandruvada <srinivas.pandruvada@...ux.intel.com>,
Borislav Petkov <bp@...en8.de>,
LKML <linux-kernel@...r.kernel.org>,
Linux PM <linux-pm@...r.kernel.org>,
Rafael Wysocki <rafael.j.wysocki@...el.com>,
Ingo Molnar <mingo@...hat.com>, X86 Kernel <x86@...nel.org>,
Peter Zijlstra <peterz@...radead.org>
Subject: Re: [PATCH v2 2/2] powercap/rapl: reduce ipi calls
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
Powered by blists - more mailing lists