Return-Path: Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1753041AbbBMNcH (ORCPT ); Fri, 13 Feb 2015 08:32:07 -0500 Received: from bombadil.infradead.org ([198.137.202.9]:43838 "EHLO bombadil.infradead.org" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1752509AbbBMNcF (ORCPT ); Fri, 13 Feb 2015 08:32:05 -0500 Date: Fri, 13 Feb 2015 14:31:58 +0100 From: Peter Zijlstra To: Preeti U Murthy Cc: tglx@linutronix.de, arjan@linux.intel.com, linux-kernel@vger.kernel.org, jacob.jun.pan@intel.com, fweisbec@gmail.com, frederic@kernel.org, daniel.lezcano@linaro.org, amit.kucheria@linaro.org, edubezval@gmail.com, viresh.kumar@linaro.org, rui.zhang@intel.com Subject: Re: [PATCH V2] idle/intel_powerclamp: Redesign idle injection to use bandwidth control mechanism Message-ID: <20150213133158.GP2896@worktop.programming.kicks-ass.net> References: <20150209044852.6231.66456.stgit@preeti.in.ibm.com> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <20150209044852.6231.66456.stgit@preeti.in.ibm.com> User-Agent: Mutt/1.5.22.1 (2013-10-16) Sender: linux-kernel-owner@vger.kernel.org List-ID: X-Mailing-List: linux-kernel@vger.kernel.org Content-Length: 1369 Lines: 33 On Mon, Feb 09, 2015 at 10:19:43AM +0530, Preeti U Murthy wrote: > diff --git a/include/linux/sched.h b/include/linux/sched.h > index 8db31ef..6a7ccb2 100644 > --- a/include/linux/sched.h > +++ b/include/linux/sched.h > @@ -3002,6 +3002,12 @@ extern long sched_getaffinity(pid_t pid, struct cpumask *mask); > > #ifdef CONFIG_CGROUP_SCHED > extern struct task_group root_task_group; > +extern int tg_set_cfs_quota(struct task_group *tg, long cfs_quota_us); > +extern int tg_set_cfs_period(struct task_group *tg, long cfs_period_us); > +#else > + > +static inline int tg_set_cfs_quota(struct task_group *tg, long cfs_quota_us); > +static inline int tg_set_cfs_period(struct task_group *tg, long cfs_period_us); > #endif /* CONFIG_CGROUP_SCHED */ Instead you might want to make the whole powerclamp thing depend on CONFIG_CFS_BANDWIDTH. Also, exposing these and root_task_group is of course vile. Not to mention you change the user (cgroup) interface without mention. In any case, I cannot see how this could ever work. Bandwidth is shared across CPUs; nothing will even attempt to get CPUs to idle at the same time. -- To unsubscribe from this list: send the line "unsubscribe linux-kernel" in the body of a message to majordomo@vger.kernel.org More majordomo info at http://vger.kernel.org/majordomo-info.html Please read the FAQ at http://www.tux.org/lkml/