Return-Path: Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S933193AbbKRPoS (ORCPT ); Wed, 18 Nov 2015 10:44:18 -0500 Received: from foss.arm.com ([217.140.101.70]:35597 "EHLO foss.arm.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S933132AbbKRPoQ (ORCPT ); Wed, 18 Nov 2015 10:44:16 -0500 Date: Wed, 18 Nov 2015 15:44:59 +0000 From: Morten Rasmussen To: Jacob Pan Cc: Peter Zijlstra , Ingo Molnar , Thomas Gleixner , John Stultz , LKML , Arjan van de Ven , Srinivas Pandruvada , Len Brown , Rafael Wysocki , Eduardo Valentin , Paul Turner Subject: Re: [PATCH 3/4] sched: introduce synchronized idle injection Message-ID: <20151118154457.GD30184@e105550-lin.cambridge.arm.com> References: <1447444387-23525-1-git-send-email-jacob.jun.pan@linux.intel.com> <1447444387-23525-4-git-send-email-jacob.jun.pan@linux.intel.com> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <1447444387-23525-4-git-send-email-jacob.jun.pan@linux.intel.com> User-Agent: Mutt/1.5.21 (2010-09-15) Sender: linux-kernel-owner@vger.kernel.org List-ID: X-Mailing-List: linux-kernel@vger.kernel.org Content-Length: 2174 Lines: 40 On Fri, Nov 13, 2015 at 11:53:06AM -0800, Jacob Pan wrote: > With increasingly constrained power and thermal budget, it's often > necessary to cap power via throttling. Throttling individual CPUs > or devices at random times can help power capping but may not be > optimal in terms of energy efficiency. Frequency scaling is also > limited by certain range before losing energy efficiency. > > In general, the optimal solution in terms of energy efficiency is > to align idle periods such that more shared circuits can be power > gated to enter lower power states. Combined with energy efficient > frequency point, idle injection provides a way to scale power and > performance efficiently. > > This patch introduces a scheduler based idle injection method, it > works by blocking CFS runqueue synchronously and periodically. The > actions on all online CPUs are orchestrated by per CPU hrtimers. I fully agree with the idea of synchronous duty cycling of cpus for thermal management to avoid those inefficient low frequencies where we loose a lot of energy to static power consumption and get very little work done. However, I would not necessarily want to punish all cpus system-wide if we have local overheating in one corner. If would rather have it apply to only the overheating socket in a multi-socket machine and only the big cores in a big.LITTLE system. Several people have already brought up that we should look into integrating this with the thermal framework. It already has the concepts of thermal zones and cooling devices which could be used to control idle-injection separately for different sockets/clusters. Also, letting user-space control idle-injection opens up for having two entities (user-space daemon and the in-kernel thermal governor) stepping on each others toes. Wouldn't the control of idle-injection naturally belong to thermal governors so we have everything controlled from a single place? -- 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/