Groups | Search | Server Info | Keyboard shortcuts | Login | Register [http] [https] [nntp] [nntps]


Groups > linux.kernel > #1452914

[RFC][PATCH 5/7] cpufreq / sched: UUF_IO flag to indicate iowait condition

From "Rafael J. Wysocki" <rjw@rjwysocki.net>
Newsgroups linux.kernel
Subject [RFC][PATCH 5/7] cpufreq / sched: UUF_IO flag to indicate iowait condition
Date 2016-08-01 01:50 +0200
Message-ID <s18Ex-6NS-17@gated-at.bofh.it> (permalink)
References <s18Ex-6NS-1@gated-at.bofh.it>
Organization linux.* mail to news gateway

Show all headers | View raw


From: Rafael J. Wysocki <rafael.j.wysocki@intel.com>

Testing indicates that it is possible to improve performace
significantly without increasing energy consumption too much by
teaching cpufreq governors to bump up the CPU performance level if
the in_iowait flag is set for the task in enqueue_task_fair().

For this purpose, define a new cpufreq_update_util() flag
UUF_IO and modify enqueue_task_fair() to pass that flag to
cpufreq_update_util() in the in_iowait case.  That generally
requires cpufreq_update_util() to be called directly from there,
because update_load_avg() is not likely to be invoked in that
case.

Signed-off-by: Rafael J. Wysocki <rafael.j.wysocki@intel.com>
---
 include/linux/sched.h |    1 +
 kernel/sched/fair.c   |    8 ++++++++
 2 files changed, 9 insertions(+)

Index: linux-pm/kernel/sched/fair.c
===================================================================
--- linux-pm.orig/kernel/sched/fair.c
+++ linux-pm/kernel/sched/fair.c
@@ -4459,6 +4459,14 @@ enqueue_task_fair(struct rq *rq, struct
 	struct cfs_rq *cfs_rq;
 	struct sched_entity *se = &p->se;
 
+	/*
+	 * If in_iowait is set, it is likely that the loops below will not
+	 * trigger any cpufreq utilization updates, so do it here explicitly
+	 * with the IO flag passed.
+	 */
+	if (p->in_iowait)
+		cpufreq_update_util(rq, UUF_IO);
+
 	for_each_sched_entity(se) {
 		if (se->on_rq)
 			break;
Index: linux-pm/include/linux/sched.h
===================================================================
--- linux-pm.orig/include/linux/sched.h
+++ linux-pm/include/linux/sched.h
@@ -3376,6 +3376,7 @@ static inline unsigned long rlimit_max(u
 }
 
 #define UUF_RT	0x01
+#define UUF_IO	0x02
 
 #ifdef CONFIG_CPU_FREQ
 struct update_util_data {

Back to linux.kernel | Previous | NextPrevious in thread | Next in thread | Find similar | Unroll thread


Thread

[RFC][PATCH 0/7] cpufreq / sched: cpufreq_update_util() flags and iowait boosting "Rafael J. Wysocki" <rjw@rjwysocki.net> - 2016-08-01 01:50 +0200
  [RFC][PATCH 4/7] cpufreq / sched: Add flags argument to cpufreq_update_util() "Rafael J. Wysocki" <rjw@rjwysocki.net> - 2016-08-01 01:50 +0200
    Re: [RFC][PATCH 4/7] cpufreq / sched: Add flags argument to  cpufreq_update_util() Dominik Brodowski <linux@dominikbrodowski.net> - 2016-08-01 10:00 +0200
      Re: [RFC][PATCH 4/7] cpufreq / sched: Add flags argument to cpufreq_update_util() "Rafael J. Wysocki" <rjw@rjwysocki.net> - 2016-08-01 17:10 +0200
        Re: [RFC][PATCH 4/7] cpufreq / sched: Add flags argument to  cpufreq_update_util() Steve Muckle <steve.muckle@linaro.org> - 2016-08-01 22:30 +0200
          Re: [RFC][PATCH 4/7] cpufreq / sched: Add flags argument to cpufreq_update_util() "Rafael J. Wysocki" <rjw@rjwysocki.net> - 2016-08-02 01:50 +0200
            Re: [RFC][PATCH 4/7] cpufreq / sched: Add flags argument to  cpufreq_update_util() Steve Muckle <steve.muckle@linaro.org> - 2016-08-02 04:10 +0200
  [RFC][PATCH 3/7] cpufreq / sched: Check cpu_of(rq) in cpufreq_update_util() "Rafael J. Wysocki" <rjw@rjwysocki.net> - 2016-08-01 01:50 +0200
    Re: [RFC][PATCH 3/7] cpufreq / sched: Check cpu_of(rq) in  cpufreq_update_util() Dominik Brodowski <linux@dominikbrodowski.net> - 2016-08-01 10:00 +0200
      Re: [RFC][PATCH 3/7] cpufreq / sched: Check cpu_of(rq) in cpufreq_update_util() "Rafael J. Wysocki" <rjw@rjwysocki.net> - 2016-08-01 17:10 +0200
      Re: [RFC][PATCH 3/7] cpufreq / sched: Check cpu_of(rq) in  cpufreq_update_util() Steve Muckle <steve.muckle@linaro.org> - 2016-08-01 21:50 +0200
        Re: [RFC][PATCH 3/7] cpufreq / sched: Check cpu_of(rq) in cpufreq_update_util() "Rafael J. Wysocki" <rjw@rjwysocki.net> - 2016-08-02 01:50 +0200
  [RFC][PATCH 1/7] cpufreq / sched: Make schedutil access utilization data directly "Rafael J. Wysocki" <rjw@rjwysocki.net> - 2016-08-01 01:50 +0200
    Re: [RFC][PATCH 1/7] cpufreq / sched: Make schedutil access  utilization data directly Steve Muckle <steve.muckle@linaro.org> - 2016-08-01 21:40 +0200
      Re: [RFC][PATCH 1/7] cpufreq / sched: Make schedutil access utilization data directly "Rafael J. Wysocki" <rjw@rjwysocki.net> - 2016-08-02 02:10 +0200
        Re: [RFC][PATCH 1/7] cpufreq / sched: Make schedutil access  utilization data directly Juri Lelli <juri.lelli@arm.com> - 2016-08-02 12:40 +0200
          Re: [RFC][PATCH 1/7] cpufreq / sched: Make schedutil access  utilization data directly Steve Muckle <steve.muckle@linaro.org> - 2016-08-02 16:40 +0200
            Re: [RFC][PATCH 1/7] cpufreq / sched: Make schedutil access  utilization data directly Juri Lelli <juri.lelli@arm.com> - 2016-08-02 17:00 +0200
        Re: [RFC][PATCH 1/7] cpufreq / sched: Make schedutil access  utilization data directly Peter Zijlstra <peterz@infradead.org> - 2016-08-08 12:40 +0200
  [RFC][PATCH 2/7] cpufreq / sched: Drop cpufreq_trigger_update() "Rafael J. Wysocki" <rjw@rjwysocki.net> - 2016-08-01 01:50 +0200
  [RFC][PATCH 5/7] cpufreq / sched: UUF_IO flag to indicate iowait condition "Rafael J. Wysocki" <rjw@rjwysocki.net> - 2016-08-01 01:50 +0200
    Re: [RFC][PATCH 5/7] cpufreq / sched: UUF_IO flag to indicate iowait  condition Steve Muckle <steve.muckle@linaro.org> - 2016-08-02 03:30 +0200
      Re: [RFC][PATCH 5/7] cpufreq / sched: UUF_IO flag to indicate iowait condition "Rafael J. Wysocki" <rafael@kernel.org> - 2016-08-02 03:50 +0200
        Re: [RFC][PATCH 5/7] cpufreq / sched: UUF_IO flag to indicate iowait  condition Steve Muckle <steve.muckle@linaro.org> - 2016-08-03 00:30 +0200
          Re: [RFC][PATCH 5/7] cpufreq / sched: UUF_IO flag to indicate iowait condition "Rafael J. Wysocki" <rafael@kernel.org> - 2016-08-03 00:50 +0200
            Re: [RFC][PATCH 5/7] cpufreq / sched: UUF_IO flag to indicate iowait  condition Steve Muckle <steve.muckle@linaro.org> - 2016-08-04 04:30 +0200
              Re: [RFC][PATCH 5/7] cpufreq / sched: UUF_IO flag to indicate iowait condition "Rafael J. Wysocki" <rjw@rjwysocki.net> - 2016-08-04 23:20 +0200
                Re: [RFC][PATCH 5/7] cpufreq / sched: UUF_IO flag to indicate iowait  condition Steve Muckle <steve.muckle@linaro.org> - 2016-08-05 00:10 +0200
                Re: [RFC][PATCH 5/7] cpufreq / sched: UUF_IO flag to indicate iowait condition "Rafael J. Wysocki" <rjw@rjwysocki.net> - 2016-08-06 23:20 +0200
  [RFC][PATCH 7/7] cpufreq: intel_pstate: Change P-state selection algorithm for Core "Rafael J. Wysocki" <rjw@rjwysocki.net> - 2016-08-01 01:50 +0200
    RE: [RFC][PATCH 7/7] cpufreq: intel_pstate: Change P-state selection algorithm for Core "Doug Smythies" <dsmythies@telus.net> - 2016-08-04 09:00 +0200
      Re: [RFC][PATCH 7/7] cpufreq: intel_pstate: Change P-state selection algorithm for Core "Rafael J. Wysocki" <rjw@rjwysocki.net> - 2016-08-06 23:50 +0200
        RE: [RFC][PATCH 7/7] cpufreq: intel_pstate: Change P-state selection algorithm for Core "Doug Smythies" <dsmythies@telus.net> - 2016-08-09 19:20 +0200
  [RFC][PATCH 6/7] cpufreq: schedutil: Add iowait boosting "Rafael J. Wysocki" <rjw@rjwysocki.net> - 2016-08-01 01:50 +0200
    Re: [RFC][PATCH 6/7] cpufreq: schedutil: Add iowait boosting Steve Muckle <steve.muckle@linaro.org> - 2016-08-02 03:40 +0200
      Re: [RFC][PATCH 6/7] cpufreq: schedutil: Add iowait boosting "Rafael J. Wysocki" <rjw@rjwysocki.net> - 2016-08-03 01:00 +0200
  RE: [RFC][PATCH 0/7] cpufreq / sched: cpufreq_update_util() flags and iowait boosting "Doug Smythies" <dsmythies@telus.net> - 2016-08-01 17:30 +0200
    Re: [RFC][PATCH 0/7] cpufreq / sched: cpufreq_update_util() flags and iowait boosting "Rafael J. Wysocki" <rjw@rjwysocki.net> - 2016-08-01 18:30 +0200
      Re: [RFC][PATCH 0/7] cpufreq / sched: cpufreq_update_util() flags  and iowait boosting Peter Zijlstra <peterz@infradead.org> - 2016-08-08 13:10 +0200
        Re: [RFC][PATCH 0/7] cpufreq / sched: cpufreq_update_util() flags and iowait boosting "Rafael J. Wysocki" <rjw@rjwysocki.net> - 2016-08-08 15:00 +0200

csiph-web