public inbox for linux-kernel@vger.kernel.org
 help / color / mirror / Atom feed
* [RFC] [PATCH 0/3] sched: Support for real CPU runtime and SMT scaling
@ 2015-01-30 14:02 Philipp Hachtmann
  2015-01-30 14:02 ` [PATCH 1/3] sched: Support for CPU runtime and SMT based adaption Philipp Hachtmann
                   ` (3 more replies)
  0 siblings, 4 replies; 7+ messages in thread
From: Philipp Hachtmann @ 2015-01-30 14:02 UTC (permalink / raw)
  To: mingo, peterz, linux-kernel
  Cc: heiko.carstens, linux-s390, schwidefsky, Philipp Hachtmann

Hello,

when using "real" processors the scheduler can make its decisions based
on wall time. But CPUs under hypervisor control are sometimes
unavailable without further notice to the guest operating system.
Using wall time for scheduling decisions in this case will lead to
unfair decisions and erroneous distribution of CPU bandwidth when
using cgroups.
On (at least) S390 every CPU has a timer that counts the real execution
time from IPL. When the hypervisor has sheduled out the CPU, the timer
is stopped. So it is desirable to use this timer as a source for the
scheduler's rq runtime calculations.

On SMT systems the consumed runtime of a task might be worth  more
or less depending on the fact that the task can have run alone or not
during the last delta. This should be scalable based on the current
CPU utilization.

The first patch introduces two little hooks to the optional architecture
funtions cpu_exec_time and scale_rq_clock_delta.
Calls to cpu_exec_time replace calls to sched_clock_cpu a few times but
are mapped back to sched_clock_cpu if architecture does not define
cpu_exec_time. The call to scale_rq_clock_delta is added into
update_rq_clock (sched/core.c) and defaults to a NOP when not defined
by architecture code.

Regards

Philipp


Philipp Hachtmann (3):
  sched: Support for CPU runtime and SMT based adaption
  s390/cputime: Provide CPU runtime since IPL
  s390/cputime: SMT based scaling of CPU runtime deltas

 arch/s390/include/asm/cputime.h | 31 +++++++++++++++++++++++++++++++
 arch/s390/kernel/vtime.c        |  4 ++--
 kernel/sched/core.c             |  4 +++-
 kernel/sched/fair.c             |  8 ++++----
 kernel/sched/sched.h            |  8 ++++++++
 5 files changed, 48 insertions(+), 7 deletions(-)

-- 
2.1.4


^ permalink raw reply	[flat|nested] 7+ messages in thread

end of thread, other threads:[~2015-02-05 11:24 UTC | newest]

Thread overview: 7+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2015-01-30 14:02 [RFC] [PATCH 0/3] sched: Support for real CPU runtime and SMT scaling Philipp Hachtmann
2015-01-30 14:02 ` [PATCH 1/3] sched: Support for CPU runtime and SMT based adaption Philipp Hachtmann
2015-01-30 14:02 ` [PATCH 2/3] s390/cputime: Provide CPU runtime since IPL Philipp Hachtmann
2015-01-30 14:02 ` [PATCH 3/3] s390/cputime: SMT based scaling of CPU runtime deltas Philipp Hachtmann
2015-01-31 11:43 ` [RFC] [PATCH 0/3] sched: Support for real CPU runtime and SMT scaling Peter Zijlstra
2015-02-03 14:11   ` Martin Schwidefsky
2015-02-05 11:24     ` Peter Zijlstra

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox