public inbox for linux-kernel@vger.kernel.org
 help / color / mirror / Atom feed
From: Jacob Pan <jacob.jun.pan@linux.intel.com>
To: Ingo Molnar <mingo@kernel.org>
Cc: Peter Zijlstra <peterz@infradead.org>,
	Ingo Molnar <mingo@redhat.com>,
	Thomas Gleixner <tglx@linutronix.de>,
	John Stultz <john.stultz@linaro.org>,
	LKML <linux-kernel@vger.kernel.org>,
	Arjan van de Ven <arjan@linux.intel.com>,
	Srinivas Pandruvada <srinivas.pandruvada@linux.intel.com>,
	Len Brown <len.brown@intel.com>,
	Rafael Wysocki <rafael.j.wysocki@intel.com>,
	Eduardo Valentin <edubezval@gmail.com>,
	Paul Turner <pjt@google.com>,
	jacob.jun.pan@linux.intel.com
Subject: Re: [PATCH 3/4] sched: introduce synchronized idle injection
Date: Wed, 2 Dec 2015 09:28:04 -0800	[thread overview]
Message-ID: <20151202092804.5c6e79f1@icelake> (raw)
In-Reply-To: <20151127091702.GA27790@gmail.com>

On Fri, 27 Nov 2015 10:17:02 +0100
Ingo Molnar <mingo@kernel.org> 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.

  reply	other threads:[~2015-12-02 17:29 UTC|newest]

Thread overview: 78+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2015-11-13 19:53 [PATCH 0/4] CFS idle injection Jacob Pan
2015-11-13 19:53 ` [PATCH 1/4] ktime: add a roundup function Jacob Pan
2015-11-13 20:11   ` John Stultz
2015-11-13 22:33     ` Jacob Pan
2015-11-13 20:13   ` Thomas Gleixner
2015-11-13 22:36     ` Jacob Pan
2015-11-13 19:53 ` [PATCH 2/4] timer: relax tick stop in idle entry Jacob Pan
2015-11-13 20:22   ` Thomas Gleixner
2015-11-13 22:24     ` Jacob Pan
2015-11-16 15:06       ` Thomas Gleixner
2015-11-16 21:51         ` Jacob Pan
2015-11-16 22:01           ` Thomas Gleixner
2015-11-17  0:09             ` Jacob Pan
2015-11-19 17:43               ` Jacob Pan
2015-11-19 19:06               ` Peter Zijlstra
2015-11-19 19:21                 ` Jacob Pan
2015-11-19 19:59                   ` Peter Zijlstra
2015-11-19 23:41                     ` Jacob Pan
2015-11-16 22:31           ` Paul E. McKenney
2015-11-16 23:05             ` Jacob Pan
2015-11-16 23:15             ` Jacob Pan
2015-11-16 23:28               ` Paul E. McKenney
2015-11-16 23:32                 ` Arjan van de Ven
2015-11-16 23:40                   ` Jacob Pan
2015-11-17  0:00                     ` Paul E. McKenney
2015-11-16 22:32           ` Josh Triplett
2015-11-16 23:26             ` Paul E. McKenney
2015-11-17  1:41               ` Josh Triplett
2015-11-17  2:53                 ` Paul E. McKenney
2015-11-17  2:57                   ` Arjan van de Ven
2015-11-17  5:04                     ` Paul E. McKenney
2015-11-17 10:24                       ` Peter Zijlstra
2015-11-17 12:57                         ` Jacob Pan
2015-11-17 13:49                           ` Paul E. McKenney
2015-11-13 19:53 ` [PATCH 3/4] sched: introduce synchronized idle injection Jacob Pan
2015-11-13 20:23   ` kbuild test robot
2015-11-18  8:36   ` Ingo Molnar
2015-11-18 10:35     ` Peter Zijlstra
2015-11-18 12:27       ` Morten Rasmussen
2015-11-18 12:49         ` Peter Zijlstra
2015-11-18 14:04           ` Morten Rasmussen
2015-11-18 14:52             ` Jacob Pan
2015-11-18 15:09               ` Morten Rasmussen
2015-11-18 15:11                 ` Jacob Pan
2015-11-18 15:21                   ` Thomas Gleixner
2015-11-18 17:03                     ` Jacob Pan
2015-11-18 16:04                   ` Morten Rasmussen
2015-11-27  9:17       ` Ingo Molnar
2015-11-18 14:10     ` Jacob Pan
2015-11-27  9:17       ` Ingo Molnar
2015-12-02 17:28         ` Jacob Pan [this message]
2015-11-18 14:19     ` Arjan van de Ven
2015-11-18 15:44   ` Morten Rasmussen
2015-11-18 15:51     ` Arjan van de Ven
2015-11-19 17:24       ` Morten Rasmussen
2015-11-19 20:09         ` Peter Zijlstra
2015-11-20  9:45           ` Thomas Gleixner
2015-11-20 10:20             ` Peter Zijlstra
2015-11-20 10:58               ` Thomas Gleixner
2015-11-20 12:54                 ` Peter Zijlstra
2015-11-20 18:53                   ` Thomas Gleixner
2016-01-11 21:50                     ` Jacob Pan
2016-01-19 12:06                       ` Ingo Molnar
2016-01-19 18:00                         ` Jacob Pan
2015-11-24 11:38                 ` Jacob Pan
2015-11-23 17:59         ` Jacob Pan
2015-11-23 17:56   ` Javi Merino
2015-11-23 18:07     ` Peter Zijlstra
2015-11-24  9:12       ` Javi Merino
2015-11-24 10:09         ` Peter Zijlstra
2015-11-24 11:10           ` Jacob Pan
2015-11-24 12:00             ` Javi Merino
2015-11-24 18:22               ` Jacob Pan
2015-11-25  9:41                 ` Javi Merino
2015-11-13 19:53 ` [PATCH 4/4] sched: add trace event for " Jacob Pan
2015-11-13 20:10   ` kbuild test robot
2015-11-19 14:39   ` Javi Merino
2015-11-19 15:35     ` Jacob Pan

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=20151202092804.5c6e79f1@icelake \
    --to=jacob.jun.pan@linux.intel.com \
    --cc=arjan@linux.intel.com \
    --cc=edubezval@gmail.com \
    --cc=john.stultz@linaro.org \
    --cc=len.brown@intel.com \
    --cc=linux-kernel@vger.kernel.org \
    --cc=mingo@kernel.org \
    --cc=mingo@redhat.com \
    --cc=peterz@infradead.org \
    --cc=pjt@google.com \
    --cc=rafael.j.wysocki@intel.com \
    --cc=srinivas.pandruvada@linux.intel.com \
    --cc=tglx@linutronix.de \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox