lce13: why all this sudden attention on the linux scheduler?

19
Amit Kucheria, PMWG Tech Lead & several people in the room Why all this sudden attention on the Linux scheduler?

Upload: linaro

Post on 13-Jun-2015

415 views

Category:

Technology


1 download

DESCRIPTION

Resource: LCE13 Name: Why all this sudden attention on the Linux Scheduler? Date: 08-07-2013 Speaker: Amit Kucheria Video: https://www.youtube.com/watch?v=NoeHIjqlriI

TRANSCRIPT

Page 1: LCE13: Why all this sudden attention on the Linux Scheduler?

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?

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?

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?

Problem

ThroughputDeterminism

Page 5: LCE13: Why all this sudden attention on the Linux Scheduler?

Solution

ThroughputDeterminism

Page 6: LCE13: Why all this sudden attention on the Linux Scheduler?

Solution

ThroughputDeterminism

Power-efficiency

Page 7: LCE13: Why all this sudden attention on the Linux Scheduler?

Determinism

Page 8: LCE13: Why all this sudden attention on the Linux Scheduler?

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?

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?

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?

Determinism

Requirements?

Page 12: LCE13: Why all this sudden attention on the Linux Scheduler?

Power-efficiency

Page 13: LCE13: Why all this sudden attention on the Linux Scheduler?

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?

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?

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?

Power-efficiency: Proposal

Separate process and power scheduler (ARM)

Page 17: LCE13: Why all this sudden attention on the Linux Scheduler?

Power-efficiency: Proposal

Separate process and power scheduler (ARM)

TopologyIdle + DVFS

Thermal

Page 18: LCE13: Why all this sudden attention on the Linux Scheduler?

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?