lcu14 206- tools to analyse scheduling behaviour and its impact on power management

13
LCU14 BURLINGAME Amit Kucheria & Vincent Guittot, LCU14 LCU14-206: Tools to analyse scheduling behaviour and its impact on power management

Upload: linaro

Post on 13-Jun-2015

706 views

Category:

Technology


2 download

DESCRIPTION

LCU14 206- Tools to Analyse Scheduling Behaviour and Its Impact on Power Management --------------------------------------------------- Speaker: Amit Kucheria & Vincent Guittot Date: September 16, 2014 --------------------------------------------------- ★ Session Summary ★ Overview of rt-app and idlestat and how we use it --------------------------------------------------- ★ Resources ★ Zerista: http://lcu14.zerista.com/event/member/137732 Google Event: https://plus.google.com/u/0/events/cmibbrhsb9p4bu04e9q7lsbs85s Video: https://www.youtube.com/watch?v=83KNt2Ibxxg&list=UUIVqQKxCyQLJS6xvSmfndLA Etherpad: http://pad.linaro.org/p/lcu14-206 --------------------------------------------------- ★ Event Details ★ Linaro Connect USA - #LCU14 September 15-19th, 2014 Hyatt Regency San Francisco Airport --------------------------------------------------- http://www.linaro.org http://connect.linaro.org

TRANSCRIPT

Page 1: LCU14 206- Tools to Analyse Scheduling Behaviour and Its Impact on Power Management

LCU14 BURLINGAME

Amit Kucheria & Vincent Guittot, LCU14

LCU14-206: Tools to analyse scheduling behaviour and its impact on power management

Page 2: LCU14 206- Tools to Analyse Scheduling Behaviour and Its Impact on Power Management

● Workloads● Workload simulation (rt-app)● Scheduler traces (kernelshark)● Power Management connection (idlestat)● Limitations● Future● Resources

Introduction

Page 3: LCU14 206- Tools to Analyse Scheduling Behaviour and Its Impact on Power Management

● Improving scheduler energy efficiency● How to validate a change

● No simple tools to benchmark the change● Emulate mid/low load use case● Emulate streaming use case● Platform/distribution-agnostic Tool

Workloads

Page 4: LCU14 206- Tools to Analyse Scheduling Behaviour and Its Impact on Power Management

● Use json file● Emulate simple and complex workloads

● complex pattern● dependency between thread

● Global object● enable trace/statistic● set calibration CPU

● run time is translated in a number of loop● set duration● and others

Workload Simulation"global" : {

"default_policy" : "SCHED_OTHER","duration" : 5,"ftrace" : false,"gnuplot" : true,"logdir" : "./","log_basename" : "mp3","lock_pages" : true,"frag" : 1,"calibration" : "CPU0",

}

Page 5: LCU14 206- Tools to Analyse Scheduling Behaviour and Its Impact on Power Management

● define resources of the use case● describe a resource

● type● potential dependency

● run and sleep don’t need declaration● timer

● Not a simple sleep for a duration

● mutex● signal / wait

● Used to sync threads

● And others ...

Resources description"resources" : {

"tick" : { "type" : "timer" },"trig0_mutex" : { "type" : "mutex" },"wait0" : { "type" : "wait" },"trig0" : { "type" : "signal", "target" : "wait0"

},"trig1_mutex" : { "type" : "mutex" },"wait1" : { "type" : "wait" },"trig1" : { "type" : "signal", "target" : "wait1"

},"trig2_mutex" : { "type" : "mutex" },"wait2" : { "type" : "wait" },"trig2" : { "type" : "signal", "target" : "wait2"

},"trig3_mutex" : { "type" : "mutex" },"wait3" : { "type" : "wait" },"trig3" : { "type" : "signal", "target" : "wait3"

},},

Page 6: LCU14 206- Tools to Analyse Scheduling Behaviour and Its Impact on Power Management

● define threads● describe general characteristic

● priority and scheduling class ● cpu affinity

● describe behavior● ordered action in phases● unique key for each action

● script to handle that constraint● action must be prefixed

● with the type of action● lock/unlock/signal/wait/broad/timer

● number of loop

Tasks description"tasks" : {

"AudioTick" : { "priority" : -19,"loop" : -1,"phases" : {

"p1" : {"loop" : 1,"lock_azer" : "trig0_mutex","signal-Out" : "trig0","unlock0" : "trig0_mutex","timer" : { "ref" : "tick", "period": 6000 },

},"p2" : {

"loop" : 4,"timer" : { "ref" : "tick",

"period": 6000 },}

}},…

}

Page 7: LCU14 206- Tools to Analyse Scheduling Behaviour and Its Impact on Power Management

● Some “performance” figures● per thread figures● per loop figures

● Figures● load● run duration● period duration

Statistics

Page 8: LCU14 206- Tools to Analyse Scheduling Behaviour and Its Impact on Power Management

Scheduler traces

Page 9: LCU14 206- Tools to Analyse Scheduling Behaviour and Its Impact on Power Management

● idlestat● xxxxx:

Power Management Connection

Page 10: LCU14 206- Tools to Analyse Scheduling Behaviour and Its Impact on Power Management

● idlestat● “requested C-state” not the HW C-state● hard to compare two sets of results

● rt-app● cross compilation mess

● dependency on too much deb package for small rootfs● json limitation

● unique key needed for objects ● move to yaml?

● standalone interrupt emulation

Limitations

Page 11: LCU14 206- Tools to Analyse Scheduling Behaviour and Its Impact on Power Management

● idlestat● energy model● diff mode● arch-specific hooks to correlate HW state?

● rt-app● more workloads description● more load types (memory-bound)● instantiate task● monotonically increasing load

Future

Page 12: LCU14 206- Tools to Analyse Scheduling Behaviour and Its Impact on Power Management

● Git trees● idlestat: https://git.linaro.org/power/idlestat.git● rt-app: http://git.linaro.org/power/rt-app.git● kernelshark: https://git.kernel.org/cgit/linux/kernel/git/rostedt/trace-cmd.git/

Resources

Page 13: LCU14 206- Tools to Analyse Scheduling Behaviour and Its Impact on Power Management

More about Linaro Connect: connect.linaro.org Linaro members: www.linaro.org/membersMore about Linaro: www.linaro.org/about/