public inbox for linux-kernel@vger.kernel.org
 help / color / mirror / Atom feed
* [PATCH RFC 0/3] sched/fair: cpu time reserves for cgroups
@ 2016-05-16  9:36 Konstantin Khlebnikov
  2016-05-16  9:36 ` [PATCH RFC 1/3] sched/fair: call __refill_cfs_bandwidth_runtime only for finite quota Konstantin Khlebnikov
                   ` (3 more replies)
  0 siblings, 4 replies; 7+ messages in thread
From: Konstantin Khlebnikov @ 2016-05-16  9:36 UTC (permalink / raw)
  To: Peter Zijlstra, Ingo Molnar, linux-kernel; +Cc: Tejun Heo, cgroups, containers

This feature allows to change cpu cgroup weight for a limited time.

Cgroup interface:
cpu.cfs_reserve_us      - reserved time for each cpu.cfs_period_us
cpu.cfs_reserve_shares  - group weight during reserved time

While cfs group consumes reserved cpu time it has different weight,
thus it gets different vruntime penalty for that execution.

        ^ weight
        |
        |
reserve |
shares  -------*
        |      |
        |      |
        |      |
shares  -      *-----------------*
        |                        |
        |                        |
        0------|-----------------|-----------> time
               reserve           quota

Reserve can work as a "low limit": boost weight for "guaranteed" time,
and as a "high limit": give normal weight for a limited time and allow
utilize cpu when nobody else needs it.

Sample setup:

level   | shares      reserve shares
--------+----------------------------
high    | 1024*16     1024*16*16
normal  | 1024        1024*16
low     | 1024/16     1024

In this way cgroups are devided into three levels.
During reserved time they are promoted to the next level.

---

Konstantin Khlebnikov (3):
      sched/fair: call __refill_cfs_bandwidth_runtime only for finite quota
      sched/fair: copy taskgroup shares to each cfs_rq
      sched/fair: pulse-weight modulation controller for cpu cgroup

 kernel/sched/core.c  |   96 +++++++++++++++++++++++++++++++++++++++++++-----
 kernel/sched/fair.c  |  101 ++++++++++++++++++++++++++++++++++++++------------
 kernel/sched/sched.h |    5 ++
 3 files changed, 168 insertions(+), 34 deletions(-)

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

end of thread, other threads:[~2016-05-16 12:26 UTC | newest]

Thread overview: 7+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2016-05-16  9:36 [PATCH RFC 0/3] sched/fair: cpu time reserves for cgroups Konstantin Khlebnikov
2016-05-16  9:36 ` [PATCH RFC 1/3] sched/fair: call __refill_cfs_bandwidth_runtime only for finite quota Konstantin Khlebnikov
2016-05-16  9:36 ` [PATCH RFC 2/3] sched/fair: copy taskgroup shares to each cfs_rq Konstantin Khlebnikov
2016-05-16  9:36 ` [PATCH RFC 3/3] sched/fair: pulse-weight modulation controller for cpu cgroup Konstantin Khlebnikov
2016-05-16 11:18 ` [PATCH RFC 0/3] sched/fair: cpu time reserves for cgroups Peter Zijlstra
2016-05-16 12:22   ` Konstantin Khlebnikov
2016-05-16 12:26     ` Peter Zijlstra

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