Return-Path: Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S964844AbbLBR3K (ORCPT ); Wed, 2 Dec 2015 12:29:10 -0500 Received: from mga03.intel.com ([134.134.136.65]:28897 "EHLO mga03.intel.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1759336AbbLBR3G (ORCPT ); Wed, 2 Dec 2015 12:29:06 -0500 X-ExtLoop1: 1 X-IronPort-AV: E=Sophos;i="5.20,374,1444719600"; d="scan'208";a="832820707" Date: Wed, 2 Dec 2015 09:28:04 -0800 From: Jacob Pan To: Ingo Molnar Cc: Peter Zijlstra , Ingo Molnar , Thomas Gleixner , John Stultz , LKML , Arjan van de Ven , Srinivas Pandruvada , Len Brown , Rafael Wysocki , Eduardo Valentin , Paul Turner , jacob.jun.pan@linux.intel.com Subject: Re: [PATCH 3/4] sched: introduce synchronized idle injection Message-ID: <20151202092804.5c6e79f1@icelake> In-Reply-To: <20151127091702.GA27790@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> <20151118083622.GA25217@gmail.com> <20151118061026.03a28616@yairi> <20151127091702.GA27790@gmail.com> Organization: OTC X-Mailer: Claws Mail 3.9.3 (GTK+ 2.24.23; x86_64-pc-linux-gnu) MIME-Version: 1.0 Content-Type: text/plain; charset=US-ASCII Content-Transfer-Encoding: 7bit Sender: linux-kernel-owner@vger.kernel.org List-ID: X-Mailing-List: linux-kernel@vger.kernel.org Content-Length: 2473 Lines: 59 On Fri, 27 Nov 2015 10:17:02 +0100 Ingo Molnar wrote: > > > > 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? > > > > > yes, it is to be used by userspace daemon such as thermal daemon. > > Though there are interests from in kernel thermal governor but that > > is another story. > > Yeah, so let me make this very clear: for a kernel scheduling feature > to be self-sufficient is not 'another story', but a must-have aspect > for this feature to become upstream acceptable. > > We don't add scheduler features that rely on pushing 'policy' to > user-space. That's poor design with many disadvantages. This feature > should offer a reasonable and automatic in-kernel default behavior > with numbers that prove that it works. > Sorry about the late response, have been sick all this time. So my intention here are two folds and two steps. 1. for system under thermal/power limit but still want to operate at optimal energy efficiency point 2. synchronize idle time for better energy efficiency (runtime identify suitable workload) This patchset is intended for #1. Lay ground work for #2. The knobs in #1 can be used by in kernel thermal-aware scheduling as some early discussion pointed out. Thus not pushing policy to userspace. For #2, my plan is to have a PM QoS like knob with sensible default to specify scheduler latency tolerance w.r.t. idle synchronization. Similar to timer slack (where default 5ms slack is used), we can give a default tolerance in the forms of two parameters: - forced_idle_duration (default 5ms) - forced_to_natural_idle_ratio (default 50%) e.g. when playing a online game with 40% natural idle time, idle injection code will try to 20% synchronized idle time. > Keeping an essential part of the feature in user-space earns a NAK > from me. I agree this should be self contained. My intension is to have the essential part used in kernel by thermal aware scheduling or PM QoS with clear intuitive mode of operation. -- 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/