From mboxrd@z Thu Jan 1 00:00:00 1970 From: Daniel Lezcano Subject: Re: [RFC/PATCH 1/2] cpuidle: Allow idle-states to be disabled at start Date: Thu, 25 Aug 2016 16:07:58 +0200 Message-ID: <57BEFBBE.8050601@linaro.org> References: <48afad7788300482c047fc35e70ca8e4bf31a5ac.1471557381.git.ego@linux.vnet.ibm.com> <57BDB2D8.4080507@linaro.org> <57BDB7F7.3090502@linaro.org> Mime-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit Return-path: In-Reply-To: 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: Balbir Singh , "Gautham R. Shenoy" , "Rafael J. Wysocki" , Michael Ellerman , Benjamin Herrenschmidt , Michael Neuling , Paul Mackerras , Vaidyanathan Srinivasan Cc: linux-pm@vger.kernel.org, linuxppc-dev@lists.ozlabs.org, linux-kernel@vger.kernel.org, Anton Blanchard List-Id: linux-pm@vger.kernel.org On 08/25/2016 03:46 PM, Balbir Singh wrote: > > > On 25/08/16 01:06, Daniel Lezcano wrote: >> On 08/24/2016 04:48 PM, Balbir Singh wrote: >>> >>> >>> On 25/08/16 00:44, Daniel Lezcano wrote: >>>> On 08/19/2016 12:26 AM, Gautham R. Shenoy wrote: >>>>> From: "Gautham R. Shenoy" >>>>> >>>>> Currently all the idle states registered by a cpu-idle driver are >>>>> enabled by default. This patch adds a mechanism which allows the >>>>> driver to hint if an idle-state should start in a disabled state. The >>>>> cpu-idle core will use this hint to appropriately initialize the >>>>> usage->disable knob of the CPU device idle state. >>>> >>>> Why do you need to do that ? >>>> >>> >>> I think patch 2/2 explains the reason as it uses this infrastructure >> >> Ok, let me elaborate the question, I was not clear. >> >> Why the userspace can't setup the system environment at boot time by >> disabling the state instead of adding extra code to disable it at boot >> time in the kernel and then re-enable it from userspace ? > > Gautham's patches don't want to have those states enabled by default. > They are unlikely to be what production systems need, but likely > what a knowledgeable person can look into selectively enable for > experimentation. Why not invert the logic ? A knowledgeable person can look into selectively disable for production. In addition, a kernel command line option to specify which state to disable would be appropriate and beneficial for all existing drivers. -- Linaro.org │ Open source software for ARM SoCs Follow Linaro: Facebook | Twitter | Blog From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from mail-wm0-x229.google.com (mail-wm0-x229.google.com [IPv6:2a00:1450:400c:c09::229]) (using TLSv1.2 with cipher ECDHE-RSA-AES128-GCM-SHA256 (128/128 bits)) (No client certificate requested) by lists.ozlabs.org (Postfix) with ESMTPS id 3sKmGx1BsczDrHp for ; Fri, 26 Aug 2016 00:08:09 +1000 (AEST) Received: by mail-wm0-x229.google.com with SMTP id i5so73961087wmg.0 for ; Thu, 25 Aug 2016 07:08:09 -0700 (PDT) Subject: Re: [RFC/PATCH 1/2] cpuidle: Allow idle-states to be disabled at start To: Balbir Singh , "Gautham R. Shenoy" , "Rafael J. Wysocki" , Michael Ellerman , Benjamin Herrenschmidt , Michael Neuling , Paul Mackerras , Vaidyanathan Srinivasan References: <48afad7788300482c047fc35e70ca8e4bf31a5ac.1471557381.git.ego@linux.vnet.ibm.com> <57BDB2D8.4080507@linaro.org> <57BDB7F7.3090502@linaro.org> Cc: linux-kernel@vger.kernel.org, linuxppc-dev@lists.ozlabs.org, Anton Blanchard , linux-pm@vger.kernel.org From: Daniel Lezcano Message-ID: <57BEFBBE.8050601@linaro.org> Date: Thu, 25 Aug 2016 16:07:58 +0200 MIME-Version: 1.0 In-Reply-To: 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/25/2016 03:46 PM, Balbir Singh wrote: > > > On 25/08/16 01:06, Daniel Lezcano wrote: >> On 08/24/2016 04:48 PM, Balbir Singh wrote: >>> >>> >>> On 25/08/16 00:44, Daniel Lezcano wrote: >>>> On 08/19/2016 12:26 AM, Gautham R. Shenoy wrote: >>>>> From: "Gautham R. Shenoy" >>>>> >>>>> Currently all the idle states registered by a cpu-idle driver are >>>>> enabled by default. This patch adds a mechanism which allows the >>>>> driver to hint if an idle-state should start in a disabled state. The >>>>> cpu-idle core will use this hint to appropriately initialize the >>>>> usage->disable knob of the CPU device idle state. >>>> >>>> Why do you need to do that ? >>>> >>> >>> I think patch 2/2 explains the reason as it uses this infrastructure >> >> Ok, let me elaborate the question, I was not clear. >> >> Why the userspace can't setup the system environment at boot time by >> disabling the state instead of adding extra code to disable it at boot >> time in the kernel and then re-enable it from userspace ? > > Gautham's patches don't want to have those states enabled by default. > They are unlikely to be what production systems need, but likely > what a knowledgeable person can look into selectively enable for > experimentation. Why not invert the logic ? A knowledgeable person can look into selectively disable for production. In addition, a kernel command line option to specify which state to disable would be appropriate and beneficial for all existing drivers. -- Linaro.org │ Open source software for ARM SoCs Follow Linaro: Facebook | Twitter | Blog