]> asedeno.scripts.mit.edu Git - linux.git/commit
sched/fair: Advance global expiration when period timer is restarted
authorXunlei Pang <xlpang@linux.alibaba.com>
Wed, 20 Jun 2018 10:18:34 +0000 (18:18 +0800)
committerIngo Molnar <mingo@kernel.org>
Tue, 3 Jul 2018 07:17:29 +0000 (09:17 +0200)
commitf1d1be8aee6c461652aea8f58bedebaa73d7f4d3
treed3d3500dbd34f3232e2b95aa9a7d48bef910d485
parent512ac999d2755d2b7109e996a76b6fb8b888631d
sched/fair: Advance global expiration when period timer is restarted

When period gets restarted after some idle time, start_cfs_bandwidth()
doesn't update the expiration information, expire_cfs_rq_runtime() will
see cfs_rq->runtime_expires smaller than rq clock and go to the clock
drift logic, wasting needless CPU cycles on the scheduler hot path.

Update the global expiration in start_cfs_bandwidth() to avoid frequent
expire_cfs_rq_runtime() calls once a new period begins.

Signed-off-by: Xunlei Pang <xlpang@linux.alibaba.com>
Signed-off-by: Peter Zijlstra (Intel) <peterz@infradead.org>
Reviewed-by: Ben Segall <bsegall@google.com>
Cc: Linus Torvalds <torvalds@linux-foundation.org>
Cc: Peter Zijlstra <peterz@infradead.org>
Cc: Thomas Gleixner <tglx@linutronix.de>
Link: http://lkml.kernel.org/r/20180620101834.24455-2-xlpang@linux.alibaba.com
Signed-off-by: Ingo Molnar <mingo@kernel.org>
kernel/sched/fair.c