From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S932427AbcAMRv1 (ORCPT ); Wed, 13 Jan 2016 12:51:27 -0500 Received: from mga02.intel.com ([134.134.136.20]:19091 "EHLO mga02.intel.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S932130AbcAMRvZ (ORCPT ); Wed, 13 Jan 2016 12:51:25 -0500 X-ExtLoop1: 1 X-IronPort-AV: E=Sophos;i="5.22,290,1449561600"; d="scan'208";a="28760282" Date: Wed, 13 Jan 2016 09:51:24 -0800 From: Jacob Pan To: Borislav Petkov Cc: Thomas Gleixner , LKML , Linux PM , Rafael Wysocki , "H. Peter Anvin" , Ingo Molnar , X86 Kernel , Srinivas Pandruvada , Peter Zijlstra , jacob.jun.pan@linux.intel.com Subject: Re: [PATCH v2 2/2] powercap/rapl: reduce ipi calls Message-ID: <20160113095124.186ff487@yairi> In-Reply-To: <20160113163610.GH12897@pd.tnic> 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> Organization: OTC X-Mailer: Claws Mail 3.9.3 (GTK+ 2.24.23; x86_64-pc-linux-gnu) MIME-Version: 1.0 Content-Type: text/plain; charset=US-ASCII Content-Transfer-Encoding: 7bit Sender: linux-kernel-owner@vger.kernel.org List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On Wed, 13 Jan 2016 17:36:10 +0100 Borislav Petkov wrote: > On Wed, Jan 13, 2016 at 08:21:13AM -0800, Jacob Pan wrote: > > Thanks for bring this out. I didn't mean to ignore. I thought my > > point was stated in the commit message there was no point of going > > back and forth. Read-Modify-Write is quite common, not just for > > RAPL could be used by future code. Sorry if I wasn't clear. > > But it also shows that it doesn't suffice for all your needs. So why > add it? > > You can much better define your own functions which do all the MSR > handling you require and call them with smp_call_function_*. > yeah, that is what I did in the original patch. https://lkml.org/lkml/2015/12/7/1090 Then i was suggested to add a rmw msr api for the common good :), I think it is a good idea since such operation is not limited to RAPL driver. Other register access APIs such as regmap have more complete selections. Jacob