Return-Path: Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1753216Ab2HPE54 (ORCPT ); Thu, 16 Aug 2012 00:57:56 -0400 Received: from mga03.intel.com ([143.182.124.21]:61002 "EHLO mga03.intel.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1752807Ab2HPE5y (ORCPT ); Thu, 16 Aug 2012 00:57:54 -0400 X-ExtLoop1: 1 X-IronPort-AV: E=Sophos;i="4.77,776,1336374000"; d="scan'208";a="134839801" Message-ID: <502C7DC7.8010601@intel.com> Date: Thu, 16 Aug 2012 12:57:43 +0800 From: Alex Shi User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:9.0) Gecko/20111229 Thunderbird/9.0 MIME-Version: 1.0 To: Rakib Mullick CC: Peter Zijlstra , Suresh Siddha , Arjan van de Ven , vincent.guittot@linaro.org, svaidy@linux.vnet.ibm.com, Ingo Molnar , Andrew Morton , Linus Torvalds , "linux-kernel@vger.kernel.org" Subject: Re: [discussion]sched: a rough proposal to enable power saving in scheduler References: <5028F12C.7080405@intel.com> In-Reply-To: Content-Type: text/plain; charset=ISO-8859-1 Content-Transfer-Encoding: 7bit Sender: linux-kernel-owner@vger.kernel.org List-ID: X-Mailing-List: linux-kernel@vger.kernel.org Content-Length: 1688 Lines: 60 On 08/15/2012 10:24 PM, Rakib Mullick wrote: > On 8/13/12, Alex Shi wrote: >> Since there is no power saving consideration in scheduler CFS, I has a >> very rough idea for enabling a new power saving schema in CFS. >> >> It bases on the following assumption: >> 1, If there are many task crowd in system, just let few domain cpus >> running and let other cpus idle can not save power. Let all cpu take the >> load, finish tasks early, and then get into idle. will save more power >> and have better user experience. >> > This assumption indirectly point towards the scheme when performance > is enabled, isn't it? Cause you're trying to spread the load equally > amongst all the CPUs. It is. > >> >> select_task_rq_fair() >> { int powersaving = 0; >> for_each_domain(cpu, tmp) { >> if (policy == power && tmp_has_capacity && >> tmp->flags & sd_flag) { >> sd = tmp; >> //It is fine to got cpu in the domain powersaving = 1; >> break; >> } >> } >> >> while(sd) { if (policy == power && powersaving == 1) >> find_busiest_and_capable_group() > > I'm not sure what find_busiest_and_capable_group() would really be, it > seems it'll find the busiest and capable group, but isn't it a > conflict with the first assumption you proposed on your proposal? This pseudo code missed a power saving workable flag , adding it into above code should solved your concern. > > Thanks, > Rakib. -- 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/