From mboxrd@z Thu Jan 1 00:00:00 1970 From: Shilpasri G Bhat Subject: Re: [PATCH] cpufreq: powernv: Export frequency throttle state of the chip through sysfs Date: Thu, 27 Aug 2015 15:47:04 +0530 Message-ID: <55DEE3A0.1090100@linux.vnet.ibm.com> References: <1440666806-11760-1-git-send-email-shilpa.bhat@linux.vnet.ibm.com> <1440667890.18333.1.camel@ellerman.id.au> Mime-Version: 1.0 Content-Type: text/plain; charset="utf-8" Content-Transfer-Encoding: base64 Return-path: In-Reply-To: <1440667890.18333.1.camel@ellerman.id.au> List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: linuxppc-dev-bounces+glppe-linuxppc-embedded-2=m.gmane.org@lists.ozlabs.org Sender: "Linuxppc-dev" To: Michael Ellerman Cc: stewart@linux.vnet.ibm.com, linux-pm@vger.kernel.org, viresh.kumar@linaro.org, rjw@rjwysocki.net, linux-kernel@vger.kernel.org, linuxppc-dev@ozlabs.org List-Id: linux-pm@vger.kernel.org CgpPbiAwOC8yNy8yMDE1IDAzOjAxIFBNLCBNaWNoYWVsIEVsbGVybWFuIHdyb3RlOgo+IE9uIFRo dSwgMjAxNS0wOC0yNyBhdCAxNDo0MyArMDUzMCwgU2hpbHBhc3JpIEcgQmhhdCB3cm90ZToKPj4g Q3JlYXRlIGEgc3lzZnMgJ3Rocm90dGxlJyBhdHRyaWJ1dGUgcGVyLWNoaXAocGVyLW51bWEtbm9k ZSkgdG8gcmVmbGVjdAo+PiB0aGUgdGhyb3R0bGUgc3RhdGUgb2YgdGhlIGNoaXAuIFRoZSB1c2Vy c2FwY2UgcHJvZ3JhbXMgY2FuIHBvbGwgb24KPj4gdGhpcyBhdHRyaWJ1dGUgdG8ga2VlcCBhbiBl eWUgb24gdGhlIHRocm90dGxlIHN0YXRlLiBDdXJyZW50bHkgd2UKPj4gcHJpbnQgYSBsb2cgbWVz c2FnZSB0byBub3RpZnkgdGhlIHVzZXIgb2YgdGhyb3R0bGluZyBldmVudC4gVGh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Yy1kZXZAbGlzdHMub3ps YWJzLm9yZwpodHRwczovL2xpc3RzLm96bGFicy5vcmcvbGlzdGluZm8vbGludXhwcGMtZGV2 From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from ozlabs.org (ozlabs.org [103.22.144.67]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by lists.ozlabs.org (Postfix) with ESMTPS id 23FD71A05BE for ; Thu, 27 Aug 2015 20:17:30 +1000 (AEST) Received: from e28smtp02.in.ibm.com (e28smtp02.in.ibm.com [122.248.162.2]) (using TLSv1 with cipher CAMELLIA256-SHA (256/256 bits)) (No client certificate requested) by ozlabs.org (Postfix) with ESMTPS id 7075E1401DA for ; Thu, 27 Aug 2015 20:17:28 +1000 (AEST) Received: from /spool/local by e28smtp02.in.ibm.com with IBM ESMTP SMTP Gateway: Authorized Use Only! Violators will be prosecuted for from ; Thu, 27 Aug 2015 15:47:26 +0530 Received: from d28relay05.in.ibm.com (d28relay05.in.ibm.com [9.184.220.62]) by d28dlp02.in.ibm.com (Postfix) with ESMTP id 9B4F53940057 for ; Thu, 27 Aug 2015 15:47:23 +0530 (IST) Received: from d28av02.in.ibm.com (d28av02.in.ibm.com [9.184.220.64]) by d28relay05.in.ibm.com (8.14.9/8.14.9/NCO v10.0) with ESMTP id t7RAH7Xx47186014 for ; Thu, 27 Aug 2015 15:47:09 +0530 Received: from d28av02.in.ibm.com (localhost [127.0.0.1]) by d28av02.in.ibm.com (8.14.4/8.14.4/NCO v10.0 AVout) with ESMTP id t7RAH5AQ008271 for ; Thu, 27 Aug 2015 15:47:05 +0530 Message-ID: <55DEE3A0.1090100@linux.vnet.ibm.com> Date: Thu, 27 Aug 2015 15:47:04 +0530 From: Shilpasri G Bhat MIME-Version: 1.0 To: Michael Ellerman CC: rjw@rjwysocki.net, stewart@linux.vnet.ibm.com, linux-pm@vger.kernel.org, viresh.kumar@linaro.org, linux-kernel@vger.kernel.org, linuxppc-dev@ozlabs.org Subject: Re: [PATCH] cpufreq: powernv: Export frequency throttle state of the chip through sysfs References: <1440666806-11760-1-git-send-email-shilpa.bhat@linux.vnet.ibm.com> <1440667890.18333.1.camel@ellerman.id.au> In-Reply-To: <1440667890.18333.1.camel@ellerman.id.au> Content-Type: text/plain; charset=utf-8 List-Id: Linux on PowerPC Developers Mail List List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , On 08/27/2015 03:01 PM, Michael Ellerman wrote: > On Thu, 2015-08-27 at 14:43 +0530, Shilpasri G Bhat wrote: >> Create a sysfs 'throttle' attribute per-chip(per-numa-node) to reflect >> the throttle state of the chip. The usersapce programs can poll on >> this attribute to keep an eye on the throttle state. Currently we >> print a log message to notify the user of throttling event. The >> performance-sensitive applications can monitor the throttle state >> using this attribute. > > Performance sensitive applications can *poll* on a sysfs file, which does a > loop over all chips and potentially spams the console with pr_crit() messages ? > > That does not sound like a recipe for success. Okay. > > What problem are we actually trying to solve here? How to export the throttle information to the user space, such that it is consumable by the applications (for example to discard the benchmark run if the frequency was throttled)? We already print the throttle information to console. Can we extend this to notify/broadcast as an event to the applications? Thanks and Regards, Shilpa