Return-Path: Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1755337AbbKRIg2 (ORCPT ); Wed, 18 Nov 2015 03:36:28 -0500 Received: from mail-wm0-f42.google.com ([74.125.82.42]:38228 "EHLO mail-wm0-f42.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1755256AbbKRIg1 (ORCPT ); Wed, 18 Nov 2015 03:36:27 -0500 Date: Wed, 18 Nov 2015 09:36:22 +0100 From: Ingo Molnar 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: <20151118083622.GA25217@gmail.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.23 (2014-03-12) Sender: linux-kernel-owner@vger.kernel.org List-ID: X-Mailing-List: linux-kernel@vger.kernel.org Content-Length: 2584 Lines: 59 * 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. > > Two sysctl knobs are given to the userspace for selecting the > percentage of idle time as well as the forced idle duration for each > idle period injected. What's the purpose of these knobs? Just testing, or will some user-space daemon set them dynamically? I.e. what mechanism will drive the throttling in the typical case? > Since only CFS class is targeted, other high priority tasks are not affected, > such as EDF and RT tasks as well as softirq and interrupts. > > Hotpath in CFS pick_next_task is optimized by Peter Zijlstra, where a new > runnable flag is introduced to combine forced idle and nr_running. > +config CFS_IDLE_INJECT > + bool "Synchronized CFS idle injection" > + depends on NO_HZ_IDLE && HIGH_RES_TIMERS > + default n > + help > + This feature let scheduler inject synchronized idle time across all online > + CPUs. Idle injection affects normal tasks only, yeilds to RT and interrupts. > + Effecitvely, CPUs can be duty cycled between running at the most power > + efficient performance state and deep idle states. So there are 3 typos in this single paragraph alone ... I also think that naming it 'idle injection' is pretty euphemistic: this is forced idling, right? So why not name it CFS_FORCED_IDLE? What will such throttling do to latencies, as observed by user-space tasks? What's the typical expected frequency of the throttling frequency that you are targeting? Thanks, Ingo -- 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/