From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1753608AbcAMQWa (ORCPT ); Wed, 13 Jan 2016 11:22:30 -0500 Received: from mga03.intel.com ([134.134.136.65]:59658 "EHLO mga03.intel.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1752846AbcAMQW2 (ORCPT ); Wed, 13 Jan 2016 11:22:28 -0500 X-ExtLoop1: 1 X-IronPort-AV: E=Sophos;i="5.22,289,1449561600"; d="scan'208";a="889761724" Date: Wed, 13 Jan 2016 08:21:13 -0800 From: Jacob Pan To: Thomas Gleixner Cc: LKML , Linux PM , Rafael Wysocki , "H. Peter Anvin" , Ingo Molnar , X86 Kernel , Srinivas Pandruvada , Peter Zijlstra , jacob.jun.pan@linux.intel.com, Borislav Petkov Subject: Re: [PATCH v2 2/2] powercap/rapl: reduce ipi calls Message-ID: <20160113082113.3314fa92@icelake> In-Reply-To: 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> 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 10:47:26 +0100 (CET) Thomas Gleixner wrote: > So here you actually use that new (misnomed) function, but for > > > +static void power_limit_irq_save_cpu(void *info) > > and > > > +static void power_limit_irq_restore_cpu(void *info) > > you use a bog standard smp function call. What's the benefit of > adding that rmw function over a bog standard smp function call if you > can only use it for one instance of the same pattern? > > Boris asked you the same question here > > https://lkml.kernel.org/r/20151220152749.GA29805@pd.tnic > > but you decided to ignore it. +Borislav, 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. Jacob