diff options
author | Juri Lelli <juri.lelli@arm.com> | 2014-09-09 05:57:15 -0400 |
---|---|---|
committer | Ingo Molnar <mingo@kernel.org> | 2014-09-16 04:23:02 -0400 |
commit | f5801933ce595ba6eb77d170ab0dfbcd5c894e11 (patch) | |
tree | 4e8adbacf50851191cb779a7493ce06738160920 | |
parent | b56bfc6cd13c25264f614320de9183a5dbcab6ca (diff) |
Documentation/scheduler/sched-deadline.txt: Add tests suite appendix
Add an appendix briefly describing tools that can be used to
test SCHED_DEADLINE (and the scheduler in general). Links to
where source code of the tools is hosted are also provided.
Signed-off-by: Juri Lelli <juri.lelli@arm.com>
Reviewed-by: Henrik Austad <henrik@austad.us>
Cc: Randy Dunlap <rdunlap@infradead.org>
Cc: Peter Zijlstra <peterz@infradead.org>
Cc: Dario Faggioli <raistlin@linux.it>
Cc: Juri Lelli <juri.lelli@gmail.com>
Cc: Linus Torvalds <torvalds@linux-foundation.org>
Link: http://lkml.kernel.org/r/1410256636-26171-5-git-send-email-juri.lelli@arm.com
Signed-off-by: Ingo Molnar <mingo@kernel.org>
-rw-r--r-- | Documentation/scheduler/sched-deadline.txt | 52 |
1 files changed, 52 insertions, 0 deletions
diff --git a/Documentation/scheduler/sched-deadline.txt b/Documentation/scheduler/sched-deadline.txt index 0ce5e2c9ab7c..b4aad31cf3be 100644 --- a/Documentation/scheduler/sched-deadline.txt +++ b/Documentation/scheduler/sched-deadline.txt | |||
@@ -15,6 +15,7 @@ CONTENTS | |||
15 | 5. Tasks CPU affinity | 15 | 5. Tasks CPU affinity |
16 | 5.1 SCHED_DEADLINE and cpusets HOWTO | 16 | 5.1 SCHED_DEADLINE and cpusets HOWTO |
17 | 6. Future plans | 17 | 6. Future plans |
18 | A. Test suite | ||
18 | 19 | ||
19 | 20 | ||
20 | 0. WARNING | 21 | 0. WARNING |
@@ -345,3 +346,54 @@ CONTENTS | |||
345 | throttling patches [https://lkml.org/lkml/2010/2/23/239] but we still are in | 346 | throttling patches [https://lkml.org/lkml/2010/2/23/239] but we still are in |
346 | the preliminary phases of the merge and we really seek feedback that would | 347 | the preliminary phases of the merge and we really seek feedback that would |
347 | help us decide on the direction it should take. | 348 | help us decide on the direction it should take. |
349 | |||
350 | Appendix A. Test suite | ||
351 | ====================== | ||
352 | |||
353 | The SCHED_DEADLINE policy can be easily tested using two applications that | ||
354 | are part of a wider Linux Scheduler validation suite. The suite is | ||
355 | available as a GitHub repository: https://github.com/scheduler-tools. | ||
356 | |||
357 | The first testing application is called rt-app and can be used to | ||
358 | start multiple threads with specific parameters. rt-app supports | ||
359 | SCHED_{OTHER,FIFO,RR,DEADLINE} scheduling policies and their related | ||
360 | parameters (e.g., niceness, priority, runtime/deadline/period). rt-app | ||
361 | is a valuable tool, as it can be used to synthetically recreate certain | ||
362 | workloads (maybe mimicking real use-cases) and evaluate how the scheduler | ||
363 | behaves under such workloads. In this way, results are easily reproducible. | ||
364 | rt-app is available at: https://github.com/scheduler-tools/rt-app. | ||
365 | |||
366 | Thread parameters can be specified from the command line, with something like | ||
367 | this: | ||
368 | |||
369 | # rt-app -t 100000:10000:d -t 150000:20000:f:10 -D5 | ||
370 | |||
371 | The above creates 2 threads. The first one, scheduled by SCHED_DEADLINE, | ||
372 | executes for 10ms every 100ms. The second one, scheduled at SCHED_FIFO | ||
373 | priority 10, executes for 20ms every 150ms. The test will run for a total | ||
374 | of 5 seconds. | ||
375 | |||
376 | More interestingly, configurations can be described with a json file that | ||
377 | can be passed as input to rt-app with something like this: | ||
378 | |||
379 | # rt-app my_config.json | ||
380 | |||
381 | The parameters that can be specified with the second method are a superset | ||
382 | of the command line options. Please refer to rt-app documentation for more | ||
383 | details (<rt-app-sources>/doc/*.json). | ||
384 | |||
385 | The second testing application is a modification of schedtool, called | ||
386 | schedtool-dl, which can be used to setup SCHED_DEADLINE parameters for a | ||
387 | certain pid/application. schedtool-dl is available at: | ||
388 | https://github.com/scheduler-tools/schedtool-dl.git. | ||
389 | |||
390 | The usage is straightforward: | ||
391 | |||
392 | # schedtool -E -t 10000000:100000000 -e ./my_cpuhog_app | ||
393 | |||
394 | With this, my_cpuhog_app is put to run inside a SCHED_DEADLINE reservation | ||
395 | of 10ms every 100ms (note that parameters are expressed in microseconds). | ||
396 | You can also use schedtool to create a reservation for an already running | ||
397 | application, given that you know its pid: | ||
398 | |||
399 | # schedtool -E -t 10000000:100000000 my_app_pid | ||