This series adds several new features to rt-app, e.g. signal, wait,
broadcast, run, sleep ...etc. and updates the example taskset.json file to
reflect those new features.
These patches are also found:
ssh://git@git.linaro.org/people/picheng.chen/rt-app.git features_series1
Sanjay Singh Rawat (1):
add delay param in thread parameters
Vincent Guittot (10):
Add new wait, signal, and broadcast resources
update the .json test file to reflect new capabilities
add loop feature
rt-app: make load frequency independent.
update example file with new loop capabilities
add sleep and run type of resources
update taskset.json example with run and sleep capabilities
make possible to remove the sleep step
modify stat to reflect new behavior
update example file with more capabilities
doc/taskset.json | 104 ++++++++++++----------
src/rt-app.c | 155 +++++++++++++++++++++++++++------
src/rt-app_parse_config.c | 214 +++++++++++++++++++++++++++++++++++++---------
src/rt-app_types.h | 35 +++++++-
src/rt-app_utils.c | 64 ++++++++++++++
src/rt-app_utils.h | 9 ++
6 files changed, 467 insertions(+), 114 deletions(-)
--
1.9.1
Now if don't set the option -S for buffer size, idlestat will init ftrace
buffer with below formula:
percpu_buffer_size =
((2 * TRACE_IDLE_LENGTH * TRACE_IDLE_NRHITS_PER_SEC) +
(TRACE_CPUFREQ_LENGTH * TRACE_CPUFREQ_NRHITS_PER_SEC)) * duration;
According to current macros' definition, if want to run the test case
for 40s, then idlestat will need the trace buffer for one CPU is:
(2*196*10000 + 196*100) Bytes/second x 40 seconds = 157584000 Bytes; So
need allocate 150MB for one CPU, if system have 8 CPUs, then totally need
allocate 150MB * 8 = 1.2GB; finally it reports the failure in kernel
if the system cannot allocate so much buffer size:
[ 42.562531] idlestat: page allocation failure: order:0, mode:0x10d0
[ 42.568817] CPU: 2 PID: 819 Comm: idlestat Not tainted 4.2.0-rc4+ #106
[ 42.575372] Hardware name: HiKey Development Board (DT)
[ 42.580610] Call trace:
[ 42.583067] [<ffffffc00008a624>] dump_backtrace+0x0/0x164
[ 42.588465] [<ffffffc00008a7a4>] show_stack+0x1c/0x28
[ 42.593535] [<ffffffc0006d3b4c>] dump_stack+0x80/0xc4
[ 42.598589] [<ffffffc00018a064>] warn_alloc_failed+0xe4/0x13c
[ 42.604355] [<ffffffc00018dac0>] __alloc_pages_nodemask+0x6a8/0x814
[ 42.610636] [<ffffffc000152774>] __rb_allocate_pages.isra.55+0x60/0x164
[ 42.617251] [<ffffffc000154718>] ring_buffer_resize+0x250/0x428
[ 42.623192] [<ffffffc000158808>] __tracing_resize_ring_buffer+0x54/0x17c
[ 42.629905] [<ffffffc0001589d8>] tracing_entries_write+0xa8/0x158
[ 42.636000] [<ffffffc0001f2fec>] __vfs_write+0x44/0x130
[ 42.641240] [<ffffffc0001f3a50>] vfs_write+0x98/0x1a0
[ 42.646291] [<ffffffc0001f4630>] SyS_write+0x50/0xb0
After review the macro definition, TRACE_IDLE_NRHITS_PER_SEC is 10000;
usually the CPU will enter/exit idle states much less than 1000 times per
second, so reduce it to 1000 which will be enough for profiling.
Signed-off-by: Leo Yan <leo.yan(a)linaro.org>
---
trace.h | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/trace.h b/trace.h
index a2f5867..863c248 100644
--- a/trace.h
+++ b/trace.h
@@ -34,7 +34,7 @@
#define TRACE_FREE TRACE_PATH "/free_buffer"
#define TRACE_FILE TRACE_PATH "/trace"
#define TRACE_STAT_FILE TRACE_PATH "/per_cpu/cpu0/stats"
-#define TRACE_IDLE_NRHITS_PER_SEC 10000
+#define TRACE_IDLE_NRHITS_PER_SEC 1000
#define TRACE_IDLE_LENGTH 196
#define TRACE_CPUFREQ_NRHITS_PER_SEC 100
#define TRACE_CPUFREQ_LENGTH 196
--
1.9.1
Replacing the list address with one specific for scheduler tools.
On Tue, Jul 14, 2015 at 12:27 PM, Leo Yan <leo.yan(a)linaro.org> wrote:
> Hi all,
>
> I saw the energy model related patches have been posted [1], so i'd
> like to ask some questions for the tool rt-app:
>
> - I downloaded rt-app from the address [2];
>
> - For the case "rt-app [4]: mp3 playback use-case model", is it the
> same one with doc/examples/mp3-long.json?
>
> - For the case "rt-app [4]: 5 ~[6,13,19,25,31,38,44,50]% periodic
> (2ms) tasks for 30s", i have not seen there have .json scripts for
> these cases; so could you help point where i can get related
> scripts?
>
> - i read the case doc/examples/tutorial/example3.json, its comments
> say "starts with a 10% load during 1sec (100 loops) and then
> increase 90% for the next sec (100 loops)".
>
> it's confused me due i cannot calculate the same workload with
> the comment clarified. For the phase "light", it only specifies the
> flow as run 1ms + timer 30ms, so the workload only have 1/30 =
> 3.33%; for the phase "heavy", it will get workload = 4/30 = 13.33%;
>
> Could you help confirm if i wrongly understand this case?
>
> {
> /*
> * Simple use case which starts with a 10% load during 1sec (100 loops)
> * and then increase to 90% for the next sec (100 loops)
> */
> "tasks" : {
> "thread0" : {
> "instance" : 12,
> "loop" : 1,
> "phases" : {
> "light" : {
> "loop" : 10,
> "run" : 1000,
> "timer" : { "ref" : "unique", "period" : 30000 }
> },
> "heavy" : {
> "loop" : 10,
> "run" : 4000,
> "timer" : { "ref" : "unique", "period" : 30000 }
> }
> }
> }
> },
> "global" : {
> "logdir" : "./",
> "log_basename" : "rt-app3",
> "ftrace" : true,
> "gnuplot" : true
> }
> }
>
> [1] http://thread.gmane.org/gmane.linux.power-management.general/62093
> [2] https://github.com/scheduler-tools/rt-app.git exp/eas_v5
>
> Thanks,
> Leo Yan
Align the comment and values of examples files
Signed-off-by: Vincent Guittot <vincent.guittot(a)linaro.org>
---
doc/examples/tutorial/example1.json | 2 +-
doc/examples/tutorial/example2.json | 2 +-
doc/examples/tutorial/example3.json | 4 ++--
doc/examples/tutorial/example5.json | 2 +-
4 files changed, 5 insertions(+), 5 deletions(-)
diff --git a/doc/examples/tutorial/example1.json b/doc/examples/tutorial/example1.json
index 4ae2914..48f4941 100644
--- a/doc/examples/tutorial/example1.json
+++ b/doc/examples/tutorial/example1.json
@@ -1,6 +1,6 @@
{
/*
- * Simple use case which creates a thread that run 1ms then sleep 9ms
+ * Simple use case which creates a thread that run 2ms then sleep 8ms
* until the use case is stopped with Ctrl+C
*/
"tasks" : {
diff --git a/doc/examples/tutorial/example2.json b/doc/examples/tutorial/example2.json
index 6bf8973..970a37a 100644
--- a/doc/examples/tutorial/example2.json
+++ b/doc/examples/tutorial/example2.json
@@ -7,7 +7,7 @@
"thread0" : {
"instance" : 1,
"loop" : -1,
- "run" : 20000,
+ "run" : 10000,
"timer" : { "ref" : "unique", "period" : 100000 }
}
},
diff --git a/doc/examples/tutorial/example3.json b/doc/examples/tutorial/example3.json
index 7dbd94c..a304d32 100644
--- a/doc/examples/tutorial/example3.json
+++ b/doc/examples/tutorial/example3.json
@@ -10,12 +10,12 @@
"phases" : {
"light" : {
"loop" : 10,
- "run" : 1000,
+ "run" : 3000,
"timer" : { "ref" : "unique", "period" : 30000 }
},
"heavy" : {
"loop" : 10,
- "run" : 4000,
+ "run" : 27000,
"timer" : { "ref" : "unique", "period" : 30000 }
}
}
diff --git a/doc/examples/tutorial/example5.json b/doc/examples/tutorial/example5.json
index 4ad421a..ab730a1 100644
--- a/doc/examples/tutorial/example5.json
+++ b/doc/examples/tutorial/example5.json
@@ -1,6 +1,6 @@
{
/* This example doesn't care of unique id constraint imposed for json
- * file and multiplies thge used of the same key id at same object's level.
+ * file and multiplies the used of the same key id at same object's level.
* Removing this constraint makes the json file more readable and easier
* to create. This file can't be used directly with rt-app but can be used
* with workgen which parses and modifies it to match with json requirement
--
1.9.1
Hi Linaro Dev team,
I am trying to debug some scheduler changes on my new QUalcomm snapdragon
development board. To debug it further, i have cross compiled the idlestat
and tried to run for collecting traces. But it shows segfault right after
starting it with `idlestat --trace -f /sdcard/mytrace -t 10 -p -c -w --
cyclictest
Pagefault logs can be found here [1] . Any suggestions will be much
appreciated.
[1] http://hastebin.com/efuximudum.xml
--
Thanks & Regards,
M.Srikanth Kumar.