From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S932200AbcAMWYF (ORCPT ); Wed, 13 Jan 2016 17:24:05 -0500 Received: from terminus.zytor.com ([198.137.202.10]:32973 "EHLO mail.zytor.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1754691AbcAMWYA (ORCPT ); Wed, 13 Jan 2016 17:24:00 -0500 Subject: Re: [PATCH v2 2/2] powercap/rapl: reduce ipi calls To: Jacob Pan , Thomas Gleixner References: <1452647483-14244-1-git-send-email-jacob.jun.pan@linux.intel.com> <1452647483-14244-3-git-send-email-jacob.jun.pan@linux.intel.com> <20160113082113.3314fa92@icelake> <20160113163610.GH12897@pd.tnic> <20160113095124.186ff487@yairi> <20160113180412.GN12897@pd.tnic> <20160113102138.4e34e890@yairi> <20160113191622.GP12897@pd.tnic> <20160113121003.3e9c2108@yairi> <20160113212602.GT12897@pd.tnic> <1452722083.3092.92.camel@linux.intel.com> <20160113141115.59535b45@yairi> Cc: Srinivas Pandruvada , Borislav Petkov , LKML , Linux PM , Rafael Wysocki , Ingo Molnar , X86 Kernel , Peter Zijlstra From: "H. Peter Anvin" Message-ID: <5696CE46.1000802@zytor.com> Date: Wed, 13 Jan 2016 14:23:02 -0800 User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:38.0) Gecko/20100101 Thunderbird/38.4.0 MIME-Version: 1.0 In-Reply-To: <20160113141115.59535b45@yairi> Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 7bit Sender: linux-kernel-owner@vger.kernel.org List-ID: X-Mailing-List: linux-kernel@vger.kernel.org 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