public inbox for linux-kernel@vger.kernel.org
 help / color / mirror / Atom feed
* [RFC PATCH 0/2] sched/fair: Delay throttling to kernel exit
@ 2023-11-30 16:12 Valentin Schneider
  2023-11-30 16:12 ` [RFC PATCH 1/2] sched/fair: Only throttle CFS tasks on return to userspace Valentin Schneider
  2023-11-30 16:12 ` [RFC PATCH 2/2] sched/fair: Repurpose cfs_rq_throttled() Valentin Schneider
  0 siblings, 2 replies; 10+ messages in thread
From: Valentin Schneider @ 2023-11-30 16:12 UTC (permalink / raw)
  To: linux-kernel
  Cc: Ingo Molnar, Peter Zijlstra, Juri Lelli, Vincent Guittot,
	Dietmar Eggemann, Steven Rostedt, Ben Segall, Mel Gorman,
	Daniel Bristot de Oliveira, Phil Auld, Clark Williams,
	Tomas Glozar

Hi folks

I apologize for the one-big-patch-to-rule-them-all, I tried splitting but I
couldn't get to anything that made sense, so it's one big patch and a small
follow-up.

TL;DR of what I'd like to hear about:
o Is there interest in getting this in for !PREEMPT_RT reasons?
o Any ideas on how to make cgroup migration less horrible so we can fully pop
  out the throttled cfs_rq se's?

Survives a good hour of my testing below on a 4-CPU QEMU system, but I expect
the throttled clocks & PELT to be busted. 
  
Testing
=======

setup
+++++
mount -t cgroup -o cpu none /root/cpu

mkdir /root/cpu/cg0
echo 10000 >  /root/cpu/cg0/cpu.cfs_period_us
echo 1000 > /root/cpu/cg0/cpu.cfs_quota_us

mkdir /root/cpu/cg0/cg00
mkdir /root/cpu/cg0/cg01

mkdir /root/cpu/cg0/cg00/cg000
mkdir /root/cpu/cg0/cg00/cg001

read.sh
+++++++
while true; do cat /sys/devices/system/cpu/smt/active &>/dev/null; done

repro.sh
++++++++
spawn() {
    ./read.sh &
    PID=$!
    echo "Tracing PID${PID}"
    echo $PID > $1
}

spawn cpu/cg0/tasks
spawn cpu/cg0/tasks
spawn cpu/cg0/tasks
spawn cpu/cg0/tasks

spawn cpu/cg0/cg01/tasks

spawn cpu/cg0/cg00/cg000/tasks
spawn cpu/cg0/cg00/cg001/tasks

sleep 1

kill $(jobs -p)

Valentin Schneider (2):
  sched/fair: Only throttle CFS tasks on return to userspace
  sched/fair: Repurpose cfs_rq_throttled()

 include/linux/sched.h |   2 +
 kernel/sched/core.c   |   6 +-
 kernel/sched/debug.c  |   4 +-
 kernel/sched/fair.c   | 296 +++++++++++++++++++++++++++---------------
 kernel/sched/sched.h  |   8 +-
 5 files changed, 204 insertions(+), 112 deletions(-)

--
2.41.0


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

end of thread, other threads:[~2023-12-19 11:50 UTC | newest]

Thread overview: 10+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2023-11-30 16:12 [RFC PATCH 0/2] sched/fair: Delay throttling to kernel exit Valentin Schneider
2023-11-30 16:12 ` [RFC PATCH 1/2] sched/fair: Only throttle CFS tasks on return to userspace Valentin Schneider
2023-11-30 21:26   ` Benjamin Segall
2023-12-01 13:30     ` Valentin Schneider
2023-12-01 22:09       ` Benjamin Segall
2023-12-07 23:47       ` Benjamin Segall
2023-12-18 18:07         ` Valentin Schneider
2023-12-18 22:34           ` Benjamin Segall
2023-12-19 11:50             ` Valentin Schneider
2023-11-30 16:12 ` [RFC PATCH 2/2] sched/fair: Repurpose cfs_rq_throttled() Valentin Schneider

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