LCE13: Why all this sudden attention on the Linux Scheduler?
-
Upload
linaro -
Category
Technology
-
view
413 -
download
1
description
Transcript of LCE13: Why all this sudden attention on the Linux Scheduler?
![Page 1: LCE13: Why all this sudden attention on the Linux Scheduler?](https://reader036.fdocuments.in/reader036/viewer/2022081404/557b2bd1d8b42a726a8b552b/html5/thumbnails/1.jpg)
Amit Kucheria, PMWG Tech Lead&
several people in the room
Why all this sudden attention on the Linux scheduler?
![Page 2: LCE13: Why all this sudden attention on the Linux Scheduler?](https://reader036.fdocuments.in/reader036/viewer/2022081404/557b2bd1d8b42a726a8b552b/html5/thumbnails/2.jpg)
Code
(kernel/sched) $ wc -l core.c fair.c rt.c deadline.c idle_task.c stop_task.c
8755 core.c 6174 fair.c 2094 rt.c 1658 deadline.c 98 idle_task.c 128 stop_task.c 18907 total
![Page 3: LCE13: Why all this sudden attention on the Linux Scheduler?](https://reader036.fdocuments.in/reader036/viewer/2022081404/557b2bd1d8b42a726a8b552b/html5/thumbnails/3.jpg)
Which scheduler?
Completely Fair Scheduler (fair)Realtime (rt)Earliest deadline first (deadline)IDLE (idle_task)STOP (stop_task)
![Page 4: LCE13: Why all this sudden attention on the Linux Scheduler?](https://reader036.fdocuments.in/reader036/viewer/2022081404/557b2bd1d8b42a726a8b552b/html5/thumbnails/4.jpg)
Problem
ThroughputDeterminism
![Page 5: LCE13: Why all this sudden attention on the Linux Scheduler?](https://reader036.fdocuments.in/reader036/viewer/2022081404/557b2bd1d8b42a726a8b552b/html5/thumbnails/5.jpg)
Solution
ThroughputDeterminism
![Page 6: LCE13: Why all this sudden attention on the Linux Scheduler?](https://reader036.fdocuments.in/reader036/viewer/2022081404/557b2bd1d8b42a726a8b552b/html5/thumbnails/6.jpg)
Solution
ThroughputDeterminism
Power-efficiency
![Page 7: LCE13: Why all this sudden attention on the Linux Scheduler?](https://reader036.fdocuments.in/reader036/viewer/2022081404/557b2bd1d8b42a726a8b552b/html5/thumbnails/7.jpg)
Determinism
![Page 8: LCE13: Why all this sudden attention on the Linux Scheduler?](https://reader036.fdocuments.in/reader036/viewer/2022081404/557b2bd1d8b42a726a8b552b/html5/thumbnails/8.jpg)
Determinism: Problems
● Preemption: interrupts, locking● Latency (interrupt -> processing, time
between two consecutive runs of a task)● Scheduling overhead
![Page 9: LCE13: Why all this sudden attention on the Linux Scheduler?](https://reader036.fdocuments.in/reader036/viewer/2022081404/557b2bd1d8b42a726a8b552b/html5/thumbnails/9.jpg)
Determinism: Solutions
● Preemption: interrupts, locking● Latency (interrupt -> processing, time
between two consecutive runs of a task)● Scheduling overhead
PREEMPT RTADAPTIVE NO_HZ
DEADLINE
![Page 10: LCE13: Why all this sudden attention on the Linux Scheduler?](https://reader036.fdocuments.in/reader036/viewer/2022081404/557b2bd1d8b42a726a8b552b/html5/thumbnails/10.jpg)
Determinism: FeaturesFeature PREEMPT
RTADAPTIVE
NO_HZDEADLINE
Physical process isolation* No No No
Temporal Isolation Yes# Yes+ Yes
No scheduling overhead No Yes No
Firm/Hard Real-time Yes No No
Complexity High Low Low
* Use cgroups + cpusets# With some limitations+ Limitation of one task per core currently, else NO
![Page 11: LCE13: Why all this sudden attention on the Linux Scheduler?](https://reader036.fdocuments.in/reader036/viewer/2022081404/557b2bd1d8b42a726a8b552b/html5/thumbnails/11.jpg)
Determinism
Requirements?
![Page 12: LCE13: Why all this sudden attention on the Linux Scheduler?](https://reader036.fdocuments.in/reader036/viewer/2022081404/557b2bd1d8b42a726a8b552b/html5/thumbnails/12.jpg)
Power-efficiency
![Page 13: LCE13: Why all this sudden attention on the Linux Scheduler?](https://reader036.fdocuments.in/reader036/viewer/2022081404/557b2bd1d8b42a726a8b552b/html5/thumbnails/13.jpg)
Power-efficiency: History
● sched_mc● big.LITTLE GTS patches (ARM)● Packing Small Tasks (Linaro/ARM)● Power aware scheduling (Intel)
![Page 14: LCE13: Why all this sudden attention on the Linux Scheduler?](https://reader036.fdocuments.in/reader036/viewer/2022081404/557b2bd1d8b42a726a8b552b/html5/thumbnails/14.jpg)
Power-efficiency: History
● sched_mc● big.LITTLE GTS patches (ARM)● Packing Small Tasks (Linaro/ARM)● Power aware scheduling (Intel)
And then...
![Page 15: LCE13: Why all this sudden attention on the Linux Scheduler?](https://reader036.fdocuments.in/reader036/viewer/2022081404/557b2bd1d8b42a726a8b552b/html5/thumbnails/15.jpg)
Ingo strikes
31st May 2013, Ingo Molnar on LKML:
"Today the power saving landscape is fragmented and sad: we just randomly interface scheduler task packing changes with some idle policy (and cpufreq policy), which might or might not combine correctly."...."_All_ policy, all metrics, all averaging should happen at the scheduler power saving level, in a single place, and then the scheduler should directly drive the new low level idle state driver mechanism."..."This is a "line in the sand", a 'must have' design property for any scheduler power saving patches to be acceptable - and I'm NAK-ing incomplete approaches that don't solve the root design cause of our power saving troubles..."
![Page 16: LCE13: Why all this sudden attention on the Linux Scheduler?](https://reader036.fdocuments.in/reader036/viewer/2022081404/557b2bd1d8b42a726a8b552b/html5/thumbnails/16.jpg)
Power-efficiency: Proposal
Separate process and power scheduler (ARM)
![Page 17: LCE13: Why all this sudden attention on the Linux Scheduler?](https://reader036.fdocuments.in/reader036/viewer/2022081404/557b2bd1d8b42a726a8b552b/html5/thumbnails/17.jpg)
Power-efficiency: Proposal
Separate process and power scheduler (ARM)
TopologyIdle + DVFS
Thermal
![Page 18: LCE13: Why all this sudden attention on the Linux Scheduler?](https://reader036.fdocuments.in/reader036/viewer/2022081404/557b2bd1d8b42a726a8b552b/html5/thumbnails/18.jpg)
Acknowledgements
● LKML● Vincent Guittot (Linaro/ST Micro)● Morten Rasmussen (ARM)● Catalin Marinas (ARM)● James King (Linaro/Broadcom)● Tuukka Tikkanen (Linaro/HiSilicon)● Mike Holmes (Linaro/LSI)● Charles Garcia-Tobin (ARM)● Kevin Hilman (Linaro)● Viresh Kumar (Linaro/ARM)● Daniel Lezcano (Linaro)● Others I've forgotten (apologies)
![Page 19: LCE13: Why all this sudden attention on the Linux Scheduler?](https://reader036.fdocuments.in/reader036/viewer/2022081404/557b2bd1d8b42a726a8b552b/html5/thumbnails/19.jpg)