SlideShare ist ein Scribd-Unternehmen logo
1 von 30
Downloaden Sie, um offline zu lesen
©ARM 2017
SCHED_DEADLINE
Ongoing development and new features
Juri Lelli
Linaro Connect BUD17, Budapest (Hungary)
ARM Ltd.
08/03/2017
©ARM 20172
Agenda
 Deadline scheduling (SCHED_DEADLINE)
 Why is development now happening (out of the blue?)
 Bandwidth reclaiming
 Frequency/CPU scaling of reservation parameters
 Coupling with frequency selection
 Group scheduling
 Future
©ARM 20173
CHAPER 1
What and Why
©ARM 20174
Agenda
 Deadline scheduling (SCHED_DEADLINE)
 Why is development now happening (out of the blue?)
 Bandwidth reclaiming
 Frequency/CPU scaling of reservation parameters
 Coupling with frequency selection
 Group scheduling
 Future
©ARM 20175
Deadline scheduling (previously on ...)
 mainline since v3.14
30 March 2014 (~3y ago)
 it’s not only about deadlines
 RT scheduling policy
 explicit per-task latency constraints
 avoids starvation
 enriches scheduler’s knowledge about
QoS requirements
 EDF + CBS
 resource reservation mechanism
 temporal isolation
 ELC16 presentation
https://goo.gl/OVspuI
Linux scheduler
deadline.c rt.c fair.c
SCHED_
DEADLINE
SCHED_RR
SCHED_FIFO
SCHED_
IDLE
SCHED_
BATCH
SCHED_
NORMAL
©ARM 20176
Agenda
 Deadline scheduling (SCHED_DEADLINE)
 Why is development now happening (out of the blue?)
 Bandwidth reclaiming
 Frequency/CPU scaling of reservation parameters
 Coupling with frequency selection
 Group scheduling
 Future
©ARM 20177
Why is development now happening
 Energy Aware Scheduling (EAS)
 extends the Linux kernel scheduler and power management to make it fully
power/performance aware (https://goo.gl/vQbUOu)
 scheduler modifications pertain to SCHED_NORMAL (so far)
 Android Common Kernel
 EAS has been merged last year (https://goo.gl/FXCdAX)
 performance usually means meeting latency requirements
 considerable usage (and modifications) of SCHED_FIFO
 SCHED_DEADLINE seems to be a better fit
and mainline adoption of required changes should be less controversial
 Joint collaboration between ARM and Scuola Superiore Sant’Anna of Pisa
©ARM 20178
CHAPTER 2
Let’s reclaim!
©ARM 20179
Agenda
 Deadline scheduling (SCHED_DEADLINE)
 Why is development now happening (out of the blue?)
 Bandwidth reclaiming
 Frequency/CPU scaling of reservation parameters
 Coupling with frequency selection
 Group scheduling
 Future
©ARM 201710
Bandwidth Reclaiming
 PROBLEM
 tasks’ bandwidth is fixed (can only be changed with sched_setattr())
 what if tasks occasionally need more bandwidth?
e.g., occasional workload fluctuations (network traffic, rendering of particularly heavy frame,
etc)
 SOLUTION (proposed*)
 bandwidth reclaiming:allow tasks to consume more than allocated
 up to a certain maximum fraction of CPU time
 if this doesn’t break others’ guarantees
* https://lkml.org/lkml/2016/12/30/107
©ARM 201711
Bandwidth Reclaiming (cont.)
 Greedy Reclamation of Unused Bandwidth (GRUB)1
 3 components2
 tracking of active utilization
 modification of the accounting rule
 multiprocessor support (original algorithm was designed for UP)
 for more details you are very welcome to attend the hacking session!
1 - Greedy reclamation of unused bandwidth in constant-bandwidth servers - Giuseppe Lipari, Sanjoy K. Baruah (https://goo.gl/xl4CUk)
2 - Greedy CPU reclaiming for SCHED DEADLINE - Luca Abeni, Juri Lelli, Claudio Scordino, Luigi Palopoli (https://goo.gl/e8EC8q)
©ARM 201712
Bandwidth Reclaiming (results)
 Task1 (6ms, 20ms)
constant execution time
of 5ms
 Task2 (45ms, 260ms)
experiences occasional
variances (35ms-52ms)
CDF
Response time (ms) T2’s reservation period
©ARM 201713
Bandwidth Reclaiming (results)
 Task1 (6ms, 20ms)
constant execution time
of 5ms
 Task2 (45ms, 260ms)
experiences occasional
variances (35ms-52ms)
 Cumulative Distribution
Function (CDF)
probability that Response
time will be less or equal to
x ms
CDF
Response time (ms) T2’s reservation period
©ARM 201714
Bandwidth Reclaiming (results)
 Task1 (6ms, 20ms)
constant execution time
of 5ms
 Task2 (45ms, 260ms)
experiences occasional
variances (35ms-52ms)
 Plain CBS
T2’s response time bigger
then reservation period
(~25%)
CDF
Response time (ms) T2’s reservation period
©ARM 201715
Bandwidth Reclaiming (results)
 Task1 (6ms, 20ms)
constant execution time
of 5ms
 Task2 (45ms, 260ms)
experiences occasional
variances (35ms-52ms)
 GRUB
T2 always completes before
reservation period (using
bandwidth left by T1)
CDF
Response time (ms) T2’s reservation period
©ARM 201716
CHAPTER 3
Rock around the Clock (... and CPU)
©ARM 201717
Agenda
 Deadline scheduling (SCHED_DEADLINE)
 Why is development now happening (out of the blue?)
 Bandwidth reclaiming
 Frequency/CPU scaling of reservation parameters
 Coupling with frequency selection
 Group scheduling
 Future
©ARM 201718
Frequency/CPU scaling
 Reservation runtime needs scaling according to frequency and CPU max
capacity
 for frequency, use the ratio between max and current capacity to enlarge the
runtime granted to a task at admission control
 similarly for CPU, but using the ratio between biggest and current CPU capacity
 nice example running on HiKey will be presented during the hacking session
capacitycurr
capacitymax
runtimeoriginalruntimescaled
_
_
__ 
©ARM 201719
Agenda
 Deadline scheduling (SCHED_DEADLINE)
 Why is development now happening (out of the blue?)
 Bandwidth reclaiming
 Frequency/CPU scaling of reservation parameters
 Coupling with frequency selection
 Group scheduling
 Future
©ARM 201720
Driving frequency selection
 scaling clock frequency, while meeting tasks’ requirements (deadlines)
 scheduler driven CPU clock frequency selection
 schedutil cpufreq governor
SCHED_NORMAL – uses util_avg (PELT)
SCHED_FIFO/RR and SCHED_DEADLINE – go to max!
 once bandwidth reclaiming is in*
 start using SCHED_DEADLINE’s per-CPU utilization contribution (sum to others)
 move CPU frequency selection triggering points (where DL utilization changes)
 allow sugov kworker thread(s) to always preempt SCHED_DEADLINE tasks (and lower
priority) – for !fast_switch_enabled drivers
 and again attend the hacking session for more details/results/fun
* Claudio Scordino (Evidence Srl) is helping with this.
©ARM 201721
CHAPTER 4
Groupies
©ARM 201722
Agenda
 Deadline scheduling (SCHED_DEADLINE)
 Why is development now happening (out of the blue?)
 Bandwidth reclaiming
 Frequency/CPU scaling of reservation parameters
 Coupling with frequency selection
 Group scheduling
 Future
©ARM 201723
Group scheduling
 Currently, one to one association between tasks and reservations
 Sometime it might be better/easier to group a set of tasks into the same
reservation
 virtual machine threads
 rendering pipeline
 legacy application (that for example needs forking)
 high priority driver kthread(s)
 Hierarchical/Group scheduling1,2,3
 cgroups support
 temporal isolation between groups (and single entities)
1 - A Framework for Hierarchical Scheduling on Multiprocessors - Giuseppe Lipari, Enrico Bini (https://goo.gl/veKrJy)
2 - Hierarchical Multiprocessor CPU Reservations for the Linux Kernel - F. Checconi,T. Cucinotta, D. Faggioli, G. Lipari (https://goo.gl/PIJaQe)
3 - The IRMOS real-time scheduler - T. Cucinotta, F. Checconi (https://lwn.net/Articles/398470/)
©ARM 201724
Group scheduling
 Hierarchical means
 first level is EDF
 second level is RT (FIFO/RR)
 Should eventually supplant
RT-throttling
EDF
FIFO FIFO
T1 T2 T3 T4
©ARM 201725
Group scheduling
 On multiprocessors
 One DEADLINE group entity per CPU
 Coexists with single DEADLINE entities
T1 T2 T3 T4T5
T6 T7
©ARM 201726
Group scheduling
 On multiprocessors
 One DEADLINE group entity per CPU
 Coexists with single DEADLINE entities
 Sub RT entities get migrated according to G-FP (push/pull)
T1 T2 T3 T4T5
T6 T7
T5
©ARM 201727
CHAPTER 5
It IS bright!
©ARM 201728
Agenda
 Deadline scheduling (SCHED_DEADLINE)
 Why is development now happening (out of the blue?)
 Bandwidth reclaiming
 Frequency/CPU scaling of reservation parameters
 Coupling with frequency selection
 Group scheduling
 Future
©ARM 201729
Future
 NEAR
 experimenting with Android
 reclaiming by demotion towards lower priority class
 capacity awareness (for heterogeneous systems)
 energy awareness (Energy Aware Scheduling for DEADLINE)
 NEAR(...ISH)
 support single CPU affinity
 enhanced priority inheritance (M-BWI most probably)
 dynamic feedback mechanism (adapt reservation parameters to task’ needs)
The trademarks featured in this presentation are registered and/or unregistered trademarks of ARM Limited
(or its subsidiaries) in the EU and/or elsewhere. All rights reserved. All other marks featured may be
trademarks of their respective owners.
Copyright © 2017 ARM Limited
©ARM 2017
Get involved!
Shoot me an email <juri.lelli@arm.com>
Ask questions on LKML, linux-rt-users or eas-dev
Come join us @ OSPM-summit (https://goo.gl/ngTcgB)
... maybe remotely :-)
And don’t forget to collect your prizes!!!

Weitere ähnliche Inhalte

Mehr von Linaro

Deep Learning Neural Network Acceleration at the Edge - Andrea Gallo
Deep Learning Neural Network Acceleration at the Edge - Andrea GalloDeep Learning Neural Network Acceleration at the Edge - Andrea Gallo
Deep Learning Neural Network Acceleration at the Edge - Andrea GalloLinaro
 
Arm Architecture HPC Workshop Santa Clara 2018 - Kanta Vekaria
Arm Architecture HPC Workshop Santa Clara 2018 - Kanta VekariaArm Architecture HPC Workshop Santa Clara 2018 - Kanta Vekaria
Arm Architecture HPC Workshop Santa Clara 2018 - Kanta VekariaLinaro
 
Huawei’s requirements for the ARM based HPC solution readiness - Joshua Mora
Huawei’s requirements for the ARM based HPC solution readiness - Joshua MoraHuawei’s requirements for the ARM based HPC solution readiness - Joshua Mora
Huawei’s requirements for the ARM based HPC solution readiness - Joshua MoraLinaro
 
Bud17 113: distribution ci using qemu and open qa
Bud17 113: distribution ci using qemu and open qaBud17 113: distribution ci using qemu and open qa
Bud17 113: distribution ci using qemu and open qaLinaro
 
OpenHPC Automation with Ansible - Renato Golin - Linaro Arm HPC Workshop 2018
OpenHPC Automation with Ansible - Renato Golin - Linaro Arm HPC Workshop 2018OpenHPC Automation with Ansible - Renato Golin - Linaro Arm HPC Workshop 2018
OpenHPC Automation with Ansible - Renato Golin - Linaro Arm HPC Workshop 2018Linaro
 
HPC network stack on ARM - Linaro HPC Workshop 2018
HPC network stack on ARM - Linaro HPC Workshop 2018HPC network stack on ARM - Linaro HPC Workshop 2018
HPC network stack on ARM - Linaro HPC Workshop 2018Linaro
 
It just keeps getting better - SUSE enablement for Arm - Linaro HPC Workshop ...
It just keeps getting better - SUSE enablement for Arm - Linaro HPC Workshop ...It just keeps getting better - SUSE enablement for Arm - Linaro HPC Workshop ...
It just keeps getting better - SUSE enablement for Arm - Linaro HPC Workshop ...Linaro
 
Intelligent Interconnect Architecture to Enable Next Generation HPC - Linaro ...
Intelligent Interconnect Architecture to Enable Next Generation HPC - Linaro ...Intelligent Interconnect Architecture to Enable Next Generation HPC - Linaro ...
Intelligent Interconnect Architecture to Enable Next Generation HPC - Linaro ...Linaro
 
Yutaka Ishikawa - Post-K and Arm HPC Ecosystem - Linaro Arm HPC Workshop Sant...
Yutaka Ishikawa - Post-K and Arm HPC Ecosystem - Linaro Arm HPC Workshop Sant...Yutaka Ishikawa - Post-K and Arm HPC Ecosystem - Linaro Arm HPC Workshop Sant...
Yutaka Ishikawa - Post-K and Arm HPC Ecosystem - Linaro Arm HPC Workshop Sant...Linaro
 
Andrew J Younge - Vanguard Astra - Petascale Arm Platform for U.S. DOE/ASC Su...
Andrew J Younge - Vanguard Astra - Petascale Arm Platform for U.S. DOE/ASC Su...Andrew J Younge - Vanguard Astra - Petascale Arm Platform for U.S. DOE/ASC Su...
Andrew J Younge - Vanguard Astra - Petascale Arm Platform for U.S. DOE/ASC Su...Linaro
 
HKG18-501 - EAS on Common Kernel 4.14 and getting (much) closer to mainline
HKG18-501 - EAS on Common Kernel 4.14 and getting (much) closer to mainlineHKG18-501 - EAS on Common Kernel 4.14 and getting (much) closer to mainline
HKG18-501 - EAS on Common Kernel 4.14 and getting (much) closer to mainlineLinaro
 
HKG18-100K1 - George Grey: Opening Keynote
HKG18-100K1 - George Grey: Opening KeynoteHKG18-100K1 - George Grey: Opening Keynote
HKG18-100K1 - George Grey: Opening KeynoteLinaro
 
HKG18-318 - OpenAMP Workshop
HKG18-318 - OpenAMP WorkshopHKG18-318 - OpenAMP Workshop
HKG18-318 - OpenAMP WorkshopLinaro
 
HKG18-501 - EAS on Common Kernel 4.14 and getting (much) closer to mainline
HKG18-501 - EAS on Common Kernel 4.14 and getting (much) closer to mainlineHKG18-501 - EAS on Common Kernel 4.14 and getting (much) closer to mainline
HKG18-501 - EAS on Common Kernel 4.14 and getting (much) closer to mainlineLinaro
 
HKG18-315 - Why the ecosystem is a wonderful thing, warts and all
HKG18-315 - Why the ecosystem is a wonderful thing, warts and allHKG18-315 - Why the ecosystem is a wonderful thing, warts and all
HKG18-315 - Why the ecosystem is a wonderful thing, warts and allLinaro
 
HKG18- 115 - Partitioning ARM Systems with the Jailhouse Hypervisor
HKG18- 115 - Partitioning ARM Systems with the Jailhouse HypervisorHKG18- 115 - Partitioning ARM Systems with the Jailhouse Hypervisor
HKG18- 115 - Partitioning ARM Systems with the Jailhouse HypervisorLinaro
 
HKG18-TR08 - Upstreaming SVE in QEMU
HKG18-TR08 - Upstreaming SVE in QEMUHKG18-TR08 - Upstreaming SVE in QEMU
HKG18-TR08 - Upstreaming SVE in QEMULinaro
 
HKG18-113- Secure Data Path work with i.MX8M
HKG18-113- Secure Data Path work with i.MX8MHKG18-113- Secure Data Path work with i.MX8M
HKG18-113- Secure Data Path work with i.MX8MLinaro
 
HKG18-120 - Devicetree Schema Documentation and Validation
HKG18-120 - Devicetree Schema Documentation and Validation HKG18-120 - Devicetree Schema Documentation and Validation
HKG18-120 - Devicetree Schema Documentation and Validation Linaro
 
HKG18-223 - Trusted FirmwareM: Trusted boot
HKG18-223 - Trusted FirmwareM: Trusted bootHKG18-223 - Trusted FirmwareM: Trusted boot
HKG18-223 - Trusted FirmwareM: Trusted bootLinaro
 

Mehr von Linaro (20)

Deep Learning Neural Network Acceleration at the Edge - Andrea Gallo
Deep Learning Neural Network Acceleration at the Edge - Andrea GalloDeep Learning Neural Network Acceleration at the Edge - Andrea Gallo
Deep Learning Neural Network Acceleration at the Edge - Andrea Gallo
 
Arm Architecture HPC Workshop Santa Clara 2018 - Kanta Vekaria
Arm Architecture HPC Workshop Santa Clara 2018 - Kanta VekariaArm Architecture HPC Workshop Santa Clara 2018 - Kanta Vekaria
Arm Architecture HPC Workshop Santa Clara 2018 - Kanta Vekaria
 
Huawei’s requirements for the ARM based HPC solution readiness - Joshua Mora
Huawei’s requirements for the ARM based HPC solution readiness - Joshua MoraHuawei’s requirements for the ARM based HPC solution readiness - Joshua Mora
Huawei’s requirements for the ARM based HPC solution readiness - Joshua Mora
 
Bud17 113: distribution ci using qemu and open qa
Bud17 113: distribution ci using qemu and open qaBud17 113: distribution ci using qemu and open qa
Bud17 113: distribution ci using qemu and open qa
 
OpenHPC Automation with Ansible - Renato Golin - Linaro Arm HPC Workshop 2018
OpenHPC Automation with Ansible - Renato Golin - Linaro Arm HPC Workshop 2018OpenHPC Automation with Ansible - Renato Golin - Linaro Arm HPC Workshop 2018
OpenHPC Automation with Ansible - Renato Golin - Linaro Arm HPC Workshop 2018
 
HPC network stack on ARM - Linaro HPC Workshop 2018
HPC network stack on ARM - Linaro HPC Workshop 2018HPC network stack on ARM - Linaro HPC Workshop 2018
HPC network stack on ARM - Linaro HPC Workshop 2018
 
It just keeps getting better - SUSE enablement for Arm - Linaro HPC Workshop ...
It just keeps getting better - SUSE enablement for Arm - Linaro HPC Workshop ...It just keeps getting better - SUSE enablement for Arm - Linaro HPC Workshop ...
It just keeps getting better - SUSE enablement for Arm - Linaro HPC Workshop ...
 
Intelligent Interconnect Architecture to Enable Next Generation HPC - Linaro ...
Intelligent Interconnect Architecture to Enable Next Generation HPC - Linaro ...Intelligent Interconnect Architecture to Enable Next Generation HPC - Linaro ...
Intelligent Interconnect Architecture to Enable Next Generation HPC - Linaro ...
 
Yutaka Ishikawa - Post-K and Arm HPC Ecosystem - Linaro Arm HPC Workshop Sant...
Yutaka Ishikawa - Post-K and Arm HPC Ecosystem - Linaro Arm HPC Workshop Sant...Yutaka Ishikawa - Post-K and Arm HPC Ecosystem - Linaro Arm HPC Workshop Sant...
Yutaka Ishikawa - Post-K and Arm HPC Ecosystem - Linaro Arm HPC Workshop Sant...
 
Andrew J Younge - Vanguard Astra - Petascale Arm Platform for U.S. DOE/ASC Su...
Andrew J Younge - Vanguard Astra - Petascale Arm Platform for U.S. DOE/ASC Su...Andrew J Younge - Vanguard Astra - Petascale Arm Platform for U.S. DOE/ASC Su...
Andrew J Younge - Vanguard Astra - Petascale Arm Platform for U.S. DOE/ASC Su...
 
HKG18-501 - EAS on Common Kernel 4.14 and getting (much) closer to mainline
HKG18-501 - EAS on Common Kernel 4.14 and getting (much) closer to mainlineHKG18-501 - EAS on Common Kernel 4.14 and getting (much) closer to mainline
HKG18-501 - EAS on Common Kernel 4.14 and getting (much) closer to mainline
 
HKG18-100K1 - George Grey: Opening Keynote
HKG18-100K1 - George Grey: Opening KeynoteHKG18-100K1 - George Grey: Opening Keynote
HKG18-100K1 - George Grey: Opening Keynote
 
HKG18-318 - OpenAMP Workshop
HKG18-318 - OpenAMP WorkshopHKG18-318 - OpenAMP Workshop
HKG18-318 - OpenAMP Workshop
 
HKG18-501 - EAS on Common Kernel 4.14 and getting (much) closer to mainline
HKG18-501 - EAS on Common Kernel 4.14 and getting (much) closer to mainlineHKG18-501 - EAS on Common Kernel 4.14 and getting (much) closer to mainline
HKG18-501 - EAS on Common Kernel 4.14 and getting (much) closer to mainline
 
HKG18-315 - Why the ecosystem is a wonderful thing, warts and all
HKG18-315 - Why the ecosystem is a wonderful thing, warts and allHKG18-315 - Why the ecosystem is a wonderful thing, warts and all
HKG18-315 - Why the ecosystem is a wonderful thing, warts and all
 
HKG18- 115 - Partitioning ARM Systems with the Jailhouse Hypervisor
HKG18- 115 - Partitioning ARM Systems with the Jailhouse HypervisorHKG18- 115 - Partitioning ARM Systems with the Jailhouse Hypervisor
HKG18- 115 - Partitioning ARM Systems with the Jailhouse Hypervisor
 
HKG18-TR08 - Upstreaming SVE in QEMU
HKG18-TR08 - Upstreaming SVE in QEMUHKG18-TR08 - Upstreaming SVE in QEMU
HKG18-TR08 - Upstreaming SVE in QEMU
 
HKG18-113- Secure Data Path work with i.MX8M
HKG18-113- Secure Data Path work with i.MX8MHKG18-113- Secure Data Path work with i.MX8M
HKG18-113- Secure Data Path work with i.MX8M
 
HKG18-120 - Devicetree Schema Documentation and Validation
HKG18-120 - Devicetree Schema Documentation and Validation HKG18-120 - Devicetree Schema Documentation and Validation
HKG18-120 - Devicetree Schema Documentation and Validation
 
HKG18-223 - Trusted FirmwareM: Trusted boot
HKG18-223 - Trusted FirmwareM: Trusted bootHKG18-223 - Trusted FirmwareM: Trusted boot
HKG18-223 - Trusted FirmwareM: Trusted boot
 

Kürzlich hochgeladen

Scaling API-first – The story of a global engineering organization
Scaling API-first – The story of a global engineering organizationScaling API-first – The story of a global engineering organization
Scaling API-first – The story of a global engineering organizationRadu Cotescu
 
Presentation on how to chat with PDF using ChatGPT code interpreter
Presentation on how to chat with PDF using ChatGPT code interpreterPresentation on how to chat with PDF using ChatGPT code interpreter
Presentation on how to chat with PDF using ChatGPT code interpreternaman860154
 
Key Features Of Token Development (1).pptx
Key  Features Of Token  Development (1).pptxKey  Features Of Token  Development (1).pptx
Key Features Of Token Development (1).pptxLBM Solutions
 
My Hashitalk Indonesia April 2024 Presentation
My Hashitalk Indonesia April 2024 PresentationMy Hashitalk Indonesia April 2024 Presentation
My Hashitalk Indonesia April 2024 PresentationRidwan Fadjar
 
04-2024-HHUG-Sales-and-Marketing-Alignment.pptx
04-2024-HHUG-Sales-and-Marketing-Alignment.pptx04-2024-HHUG-Sales-and-Marketing-Alignment.pptx
04-2024-HHUG-Sales-and-Marketing-Alignment.pptxHampshireHUG
 
Neo4j - How KGs are shaping the future of Generative AI at AWS Summit London ...
Neo4j - How KGs are shaping the future of Generative AI at AWS Summit London ...Neo4j - How KGs are shaping the future of Generative AI at AWS Summit London ...
Neo4j - How KGs are shaping the future of Generative AI at AWS Summit London ...Neo4j
 
Kotlin Multiplatform & Compose Multiplatform - Starter kit for pragmatics
Kotlin Multiplatform & Compose Multiplatform - Starter kit for pragmaticsKotlin Multiplatform & Compose Multiplatform - Starter kit for pragmatics
Kotlin Multiplatform & Compose Multiplatform - Starter kit for pragmaticscarlostorres15106
 
How to Troubleshoot Apps for the Modern Connected Worker
How to Troubleshoot Apps for the Modern Connected WorkerHow to Troubleshoot Apps for the Modern Connected Worker
How to Troubleshoot Apps for the Modern Connected WorkerThousandEyes
 
Transforming Data Streams with Kafka Connect: An Introduction to Single Messa...
Transforming Data Streams with Kafka Connect: An Introduction to Single Messa...Transforming Data Streams with Kafka Connect: An Introduction to Single Messa...
Transforming Data Streams with Kafka Connect: An Introduction to Single Messa...HostedbyConfluent
 
Handwritten Text Recognition for manuscripts and early printed texts
Handwritten Text Recognition for manuscripts and early printed textsHandwritten Text Recognition for manuscripts and early printed texts
Handwritten Text Recognition for manuscripts and early printed textsMaria Levchenko
 
Tech-Forward - Achieving Business Readiness For Copilot in Microsoft 365
Tech-Forward - Achieving Business Readiness For Copilot in Microsoft 365Tech-Forward - Achieving Business Readiness For Copilot in Microsoft 365
Tech-Forward - Achieving Business Readiness For Copilot in Microsoft 3652toLead Limited
 
Pigging Solutions in Pet Food Manufacturing
Pigging Solutions in Pet Food ManufacturingPigging Solutions in Pet Food Manufacturing
Pigging Solutions in Pet Food ManufacturingPigging Solutions
 
The Codex of Business Writing Software for Real-World Solutions 2.pptx
The Codex of Business Writing Software for Real-World Solutions 2.pptxThe Codex of Business Writing Software for Real-World Solutions 2.pptx
The Codex of Business Writing Software for Real-World Solutions 2.pptxMalak Abu Hammad
 
Benefits Of Flutter Compared To Other Frameworks
Benefits Of Flutter Compared To Other FrameworksBenefits Of Flutter Compared To Other Frameworks
Benefits Of Flutter Compared To Other FrameworksSoftradix Technologies
 
SIEMENS: RAPUNZEL – A Tale About Knowledge Graph
SIEMENS: RAPUNZEL – A Tale About Knowledge GraphSIEMENS: RAPUNZEL – A Tale About Knowledge Graph
SIEMENS: RAPUNZEL – A Tale About Knowledge GraphNeo4j
 
Human Factors of XR: Using Human Factors to Design XR Systems
Human Factors of XR: Using Human Factors to Design XR SystemsHuman Factors of XR: Using Human Factors to Design XR Systems
Human Factors of XR: Using Human Factors to Design XR SystemsMark Billinghurst
 
Swan(sea) Song – personal research during my six years at Swansea ... and bey...
Swan(sea) Song – personal research during my six years at Swansea ... and bey...Swan(sea) Song – personal research during my six years at Swansea ... and bey...
Swan(sea) Song – personal research during my six years at Swansea ... and bey...Alan Dix
 
#StandardsGoals for 2024: What’s new for BISAC - Tech Forum 2024
#StandardsGoals for 2024: What’s new for BISAC - Tech Forum 2024#StandardsGoals for 2024: What’s new for BISAC - Tech Forum 2024
#StandardsGoals for 2024: What’s new for BISAC - Tech Forum 2024BookNet Canada
 
How to Remove Document Management Hurdles with X-Docs?
How to Remove Document Management Hurdles with X-Docs?How to Remove Document Management Hurdles with X-Docs?
How to Remove Document Management Hurdles with X-Docs?XfilesPro
 
Beyond Boundaries: Leveraging No-Code Solutions for Industry Innovation
Beyond Boundaries: Leveraging No-Code Solutions for Industry InnovationBeyond Boundaries: Leveraging No-Code Solutions for Industry Innovation
Beyond Boundaries: Leveraging No-Code Solutions for Industry InnovationSafe Software
 

Kürzlich hochgeladen (20)

Scaling API-first – The story of a global engineering organization
Scaling API-first – The story of a global engineering organizationScaling API-first – The story of a global engineering organization
Scaling API-first – The story of a global engineering organization
 
Presentation on how to chat with PDF using ChatGPT code interpreter
Presentation on how to chat with PDF using ChatGPT code interpreterPresentation on how to chat with PDF using ChatGPT code interpreter
Presentation on how to chat with PDF using ChatGPT code interpreter
 
Key Features Of Token Development (1).pptx
Key  Features Of Token  Development (1).pptxKey  Features Of Token  Development (1).pptx
Key Features Of Token Development (1).pptx
 
My Hashitalk Indonesia April 2024 Presentation
My Hashitalk Indonesia April 2024 PresentationMy Hashitalk Indonesia April 2024 Presentation
My Hashitalk Indonesia April 2024 Presentation
 
04-2024-HHUG-Sales-and-Marketing-Alignment.pptx
04-2024-HHUG-Sales-and-Marketing-Alignment.pptx04-2024-HHUG-Sales-and-Marketing-Alignment.pptx
04-2024-HHUG-Sales-and-Marketing-Alignment.pptx
 
Neo4j - How KGs are shaping the future of Generative AI at AWS Summit London ...
Neo4j - How KGs are shaping the future of Generative AI at AWS Summit London ...Neo4j - How KGs are shaping the future of Generative AI at AWS Summit London ...
Neo4j - How KGs are shaping the future of Generative AI at AWS Summit London ...
 
Kotlin Multiplatform & Compose Multiplatform - Starter kit for pragmatics
Kotlin Multiplatform & Compose Multiplatform - Starter kit for pragmaticsKotlin Multiplatform & Compose Multiplatform - Starter kit for pragmatics
Kotlin Multiplatform & Compose Multiplatform - Starter kit for pragmatics
 
How to Troubleshoot Apps for the Modern Connected Worker
How to Troubleshoot Apps for the Modern Connected WorkerHow to Troubleshoot Apps for the Modern Connected Worker
How to Troubleshoot Apps for the Modern Connected Worker
 
Transforming Data Streams with Kafka Connect: An Introduction to Single Messa...
Transforming Data Streams with Kafka Connect: An Introduction to Single Messa...Transforming Data Streams with Kafka Connect: An Introduction to Single Messa...
Transforming Data Streams with Kafka Connect: An Introduction to Single Messa...
 
Handwritten Text Recognition for manuscripts and early printed texts
Handwritten Text Recognition for manuscripts and early printed textsHandwritten Text Recognition for manuscripts and early printed texts
Handwritten Text Recognition for manuscripts and early printed texts
 
Tech-Forward - Achieving Business Readiness For Copilot in Microsoft 365
Tech-Forward - Achieving Business Readiness For Copilot in Microsoft 365Tech-Forward - Achieving Business Readiness For Copilot in Microsoft 365
Tech-Forward - Achieving Business Readiness For Copilot in Microsoft 365
 
Pigging Solutions in Pet Food Manufacturing
Pigging Solutions in Pet Food ManufacturingPigging Solutions in Pet Food Manufacturing
Pigging Solutions in Pet Food Manufacturing
 
The Codex of Business Writing Software for Real-World Solutions 2.pptx
The Codex of Business Writing Software for Real-World Solutions 2.pptxThe Codex of Business Writing Software for Real-World Solutions 2.pptx
The Codex of Business Writing Software for Real-World Solutions 2.pptx
 
Benefits Of Flutter Compared To Other Frameworks
Benefits Of Flutter Compared To Other FrameworksBenefits Of Flutter Compared To Other Frameworks
Benefits Of Flutter Compared To Other Frameworks
 
SIEMENS: RAPUNZEL – A Tale About Knowledge Graph
SIEMENS: RAPUNZEL – A Tale About Knowledge GraphSIEMENS: RAPUNZEL – A Tale About Knowledge Graph
SIEMENS: RAPUNZEL – A Tale About Knowledge Graph
 
Human Factors of XR: Using Human Factors to Design XR Systems
Human Factors of XR: Using Human Factors to Design XR SystemsHuman Factors of XR: Using Human Factors to Design XR Systems
Human Factors of XR: Using Human Factors to Design XR Systems
 
Swan(sea) Song – personal research during my six years at Swansea ... and bey...
Swan(sea) Song – personal research during my six years at Swansea ... and bey...Swan(sea) Song – personal research during my six years at Swansea ... and bey...
Swan(sea) Song – personal research during my six years at Swansea ... and bey...
 
#StandardsGoals for 2024: What’s new for BISAC - Tech Forum 2024
#StandardsGoals for 2024: What’s new for BISAC - Tech Forum 2024#StandardsGoals for 2024: What’s new for BISAC - Tech Forum 2024
#StandardsGoals for 2024: What’s new for BISAC - Tech Forum 2024
 
How to Remove Document Management Hurdles with X-Docs?
How to Remove Document Management Hurdles with X-Docs?How to Remove Document Management Hurdles with X-Docs?
How to Remove Document Management Hurdles with X-Docs?
 
Beyond Boundaries: Leveraging No-Code Solutions for Industry Innovation
Beyond Boundaries: Leveraging No-Code Solutions for Industry InnovationBeyond Boundaries: Leveraging No-Code Solutions for Industry Innovation
Beyond Boundaries: Leveraging No-Code Solutions for Industry Innovation
 

BUD17-307: SCHED_DEADLINE: ongoing development and new features

  • 1. ©ARM 2017 SCHED_DEADLINE Ongoing development and new features Juri Lelli Linaro Connect BUD17, Budapest (Hungary) ARM Ltd. 08/03/2017
  • 2. ©ARM 20172 Agenda  Deadline scheduling (SCHED_DEADLINE)  Why is development now happening (out of the blue?)  Bandwidth reclaiming  Frequency/CPU scaling of reservation parameters  Coupling with frequency selection  Group scheduling  Future
  • 4. ©ARM 20174 Agenda  Deadline scheduling (SCHED_DEADLINE)  Why is development now happening (out of the blue?)  Bandwidth reclaiming  Frequency/CPU scaling of reservation parameters  Coupling with frequency selection  Group scheduling  Future
  • 5. ©ARM 20175 Deadline scheduling (previously on ...)  mainline since v3.14 30 March 2014 (~3y ago)  it’s not only about deadlines  RT scheduling policy  explicit per-task latency constraints  avoids starvation  enriches scheduler’s knowledge about QoS requirements  EDF + CBS  resource reservation mechanism  temporal isolation  ELC16 presentation https://goo.gl/OVspuI Linux scheduler deadline.c rt.c fair.c SCHED_ DEADLINE SCHED_RR SCHED_FIFO SCHED_ IDLE SCHED_ BATCH SCHED_ NORMAL
  • 6. ©ARM 20176 Agenda  Deadline scheduling (SCHED_DEADLINE)  Why is development now happening (out of the blue?)  Bandwidth reclaiming  Frequency/CPU scaling of reservation parameters  Coupling with frequency selection  Group scheduling  Future
  • 7. ©ARM 20177 Why is development now happening  Energy Aware Scheduling (EAS)  extends the Linux kernel scheduler and power management to make it fully power/performance aware (https://goo.gl/vQbUOu)  scheduler modifications pertain to SCHED_NORMAL (so far)  Android Common Kernel  EAS has been merged last year (https://goo.gl/FXCdAX)  performance usually means meeting latency requirements  considerable usage (and modifications) of SCHED_FIFO  SCHED_DEADLINE seems to be a better fit and mainline adoption of required changes should be less controversial  Joint collaboration between ARM and Scuola Superiore Sant’Anna of Pisa
  • 9. ©ARM 20179 Agenda  Deadline scheduling (SCHED_DEADLINE)  Why is development now happening (out of the blue?)  Bandwidth reclaiming  Frequency/CPU scaling of reservation parameters  Coupling with frequency selection  Group scheduling  Future
  • 10. ©ARM 201710 Bandwidth Reclaiming  PROBLEM  tasks’ bandwidth is fixed (can only be changed with sched_setattr())  what if tasks occasionally need more bandwidth? e.g., occasional workload fluctuations (network traffic, rendering of particularly heavy frame, etc)  SOLUTION (proposed*)  bandwidth reclaiming:allow tasks to consume more than allocated  up to a certain maximum fraction of CPU time  if this doesn’t break others’ guarantees * https://lkml.org/lkml/2016/12/30/107
  • 11. ©ARM 201711 Bandwidth Reclaiming (cont.)  Greedy Reclamation of Unused Bandwidth (GRUB)1  3 components2  tracking of active utilization  modification of the accounting rule  multiprocessor support (original algorithm was designed for UP)  for more details you are very welcome to attend the hacking session! 1 - Greedy reclamation of unused bandwidth in constant-bandwidth servers - Giuseppe Lipari, Sanjoy K. Baruah (https://goo.gl/xl4CUk) 2 - Greedy CPU reclaiming for SCHED DEADLINE - Luca Abeni, Juri Lelli, Claudio Scordino, Luigi Palopoli (https://goo.gl/e8EC8q)
  • 12. ©ARM 201712 Bandwidth Reclaiming (results)  Task1 (6ms, 20ms) constant execution time of 5ms  Task2 (45ms, 260ms) experiences occasional variances (35ms-52ms) CDF Response time (ms) T2’s reservation period
  • 13. ©ARM 201713 Bandwidth Reclaiming (results)  Task1 (6ms, 20ms) constant execution time of 5ms  Task2 (45ms, 260ms) experiences occasional variances (35ms-52ms)  Cumulative Distribution Function (CDF) probability that Response time will be less or equal to x ms CDF Response time (ms) T2’s reservation period
  • 14. ©ARM 201714 Bandwidth Reclaiming (results)  Task1 (6ms, 20ms) constant execution time of 5ms  Task2 (45ms, 260ms) experiences occasional variances (35ms-52ms)  Plain CBS T2’s response time bigger then reservation period (~25%) CDF Response time (ms) T2’s reservation period
  • 15. ©ARM 201715 Bandwidth Reclaiming (results)  Task1 (6ms, 20ms) constant execution time of 5ms  Task2 (45ms, 260ms) experiences occasional variances (35ms-52ms)  GRUB T2 always completes before reservation period (using bandwidth left by T1) CDF Response time (ms) T2’s reservation period
  • 16. ©ARM 201716 CHAPTER 3 Rock around the Clock (... and CPU)
  • 17. ©ARM 201717 Agenda  Deadline scheduling (SCHED_DEADLINE)  Why is development now happening (out of the blue?)  Bandwidth reclaiming  Frequency/CPU scaling of reservation parameters  Coupling with frequency selection  Group scheduling  Future
  • 18. ©ARM 201718 Frequency/CPU scaling  Reservation runtime needs scaling according to frequency and CPU max capacity  for frequency, use the ratio between max and current capacity to enlarge the runtime granted to a task at admission control  similarly for CPU, but using the ratio between biggest and current CPU capacity  nice example running on HiKey will be presented during the hacking session capacitycurr capacitymax runtimeoriginalruntimescaled _ _ __ 
  • 19. ©ARM 201719 Agenda  Deadline scheduling (SCHED_DEADLINE)  Why is development now happening (out of the blue?)  Bandwidth reclaiming  Frequency/CPU scaling of reservation parameters  Coupling with frequency selection  Group scheduling  Future
  • 20. ©ARM 201720 Driving frequency selection  scaling clock frequency, while meeting tasks’ requirements (deadlines)  scheduler driven CPU clock frequency selection  schedutil cpufreq governor SCHED_NORMAL – uses util_avg (PELT) SCHED_FIFO/RR and SCHED_DEADLINE – go to max!  once bandwidth reclaiming is in*  start using SCHED_DEADLINE’s per-CPU utilization contribution (sum to others)  move CPU frequency selection triggering points (where DL utilization changes)  allow sugov kworker thread(s) to always preempt SCHED_DEADLINE tasks (and lower priority) – for !fast_switch_enabled drivers  and again attend the hacking session for more details/results/fun * Claudio Scordino (Evidence Srl) is helping with this.
  • 22. ©ARM 201722 Agenda  Deadline scheduling (SCHED_DEADLINE)  Why is development now happening (out of the blue?)  Bandwidth reclaiming  Frequency/CPU scaling of reservation parameters  Coupling with frequency selection  Group scheduling  Future
  • 23. ©ARM 201723 Group scheduling  Currently, one to one association between tasks and reservations  Sometime it might be better/easier to group a set of tasks into the same reservation  virtual machine threads  rendering pipeline  legacy application (that for example needs forking)  high priority driver kthread(s)  Hierarchical/Group scheduling1,2,3  cgroups support  temporal isolation between groups (and single entities) 1 - A Framework for Hierarchical Scheduling on Multiprocessors - Giuseppe Lipari, Enrico Bini (https://goo.gl/veKrJy) 2 - Hierarchical Multiprocessor CPU Reservations for the Linux Kernel - F. Checconi,T. Cucinotta, D. Faggioli, G. Lipari (https://goo.gl/PIJaQe) 3 - The IRMOS real-time scheduler - T. Cucinotta, F. Checconi (https://lwn.net/Articles/398470/)
  • 24. ©ARM 201724 Group scheduling  Hierarchical means  first level is EDF  second level is RT (FIFO/RR)  Should eventually supplant RT-throttling EDF FIFO FIFO T1 T2 T3 T4
  • 25. ©ARM 201725 Group scheduling  On multiprocessors  One DEADLINE group entity per CPU  Coexists with single DEADLINE entities T1 T2 T3 T4T5 T6 T7
  • 26. ©ARM 201726 Group scheduling  On multiprocessors  One DEADLINE group entity per CPU  Coexists with single DEADLINE entities  Sub RT entities get migrated according to G-FP (push/pull) T1 T2 T3 T4T5 T6 T7 T5
  • 28. ©ARM 201728 Agenda  Deadline scheduling (SCHED_DEADLINE)  Why is development now happening (out of the blue?)  Bandwidth reclaiming  Frequency/CPU scaling of reservation parameters  Coupling with frequency selection  Group scheduling  Future
  • 29. ©ARM 201729 Future  NEAR  experimenting with Android  reclaiming by demotion towards lower priority class  capacity awareness (for heterogeneous systems)  energy awareness (Energy Aware Scheduling for DEADLINE)  NEAR(...ISH)  support single CPU affinity  enhanced priority inheritance (M-BWI most probably)  dynamic feedback mechanism (adapt reservation parameters to task’ needs)
  • 30. The trademarks featured in this presentation are registered and/or unregistered trademarks of ARM Limited (or its subsidiaries) in the EU and/or elsewhere. All rights reserved. All other marks featured may be trademarks of their respective owners. Copyright © 2017 ARM Limited ©ARM 2017 Get involved! Shoot me an email <juri.lelli@arm.com> Ask questions on LKML, linux-rt-users or eas-dev Come join us @ OSPM-summit (https://goo.gl/ngTcgB) ... maybe remotely :-) And don’t forget to collect your prizes!!!