From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1751992AbdJPGAw (ORCPT ); Mon, 16 Oct 2017 02:00:52 -0400 Received: from mga11.intel.com ([192.55.52.93]:58338 "EHLO mga11.intel.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1751126AbdJPGAu (ORCPT ); Mon, 16 Oct 2017 02:00:50 -0400 X-ExtLoop1: 1 X-IronPort-AV: E=Sophos;i="5.43,385,1503385200"; d="scan'208";a="163037744" Subject: Re: [RFC PATCH v2 6/8] cpuidle: make fast idle threshold tunable To: "Rafael J. Wysocki" , Aubrey Li Cc: tglx@linutronix.de, peterz@infradead.org, len.brown@intel.com, ak@linux.intel.com, tim.c.chen@linux.intel.com, linux-pm@vger.kernel.org, linux-kernel@vger.kernel.org References: <1506756034-6340-1-git-send-email-aubrey.li@intel.com> <1506756034-6340-7-git-send-email-aubrey.li@intel.com> <2242303.t20yq9Lc6j@aspire.rjw.lan> From: "Li, Aubrey" Message-ID: Date: Mon, 16 Oct 2017 14:00:45 +0800 User-Agent: Mozilla/5.0 (Windows NT 10.0; WOW64; rv:52.0) Gecko/20100101 Thunderbird/52.1.1 MIME-Version: 1.0 In-Reply-To: <2242303.t20yq9Lc6j@aspire.rjw.lan> Content-Type: text/plain; charset=utf-8 Content-Language: en-US Content-Transfer-Encoding: 7bit Sender: linux-kernel-owner@vger.kernel.org List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On 2017/10/14 8:59, Rafael J. Wysocki wrote: > On Saturday, September 30, 2017 9:20:32 AM CEST Aubrey Li wrote: >> Add a knob to make fast idle threshold tunable >> >> Signed-off-by: Aubrey Li > > I first of all am not sure about the need to add a tunable for this at all > in the first place. Actually I think a fixed value(10) might be good enough but not quite sure if there is a requirement to tune it for different scenario, for example even if the predicted idle interval is 100x overhead, I still want a fast path for a better benchmark score? >> @@ -1229,6 +1230,17 @@ static struct ctl_table kern_table[] = { >> .extra2 = &one, >> }, >> #endif >> +#ifdef CONFIG_CPU_IDLE >> + { >> + .procname = "fast_idle_ratio", >> + .data = &sysctl_fast_idle_ratio, >> + .maxlen = sizeof(int), >> + .mode = 0644, >> + .proc_handler = proc_dointvec_minmax, >> + .extra1 = &one, >> + .extra2 = &one_hundred, >> + }, >> +#endif >> { } >> }; >> > > And if there is a good enough reason to add it, shouldn't the tunable be > there in the cpuidle framework? > sure, if it makes sense, I'll move it into cpuidle/sysfs.c Thanks, -Aubrey