aboutsummaryrefslogtreecommitdiffstats
path: root/kernel/trace
diff options
context:
space:
mode:
authorIngo Molnar <mingo@elte.hu>2009-11-23 02:03:09 -0500
committerIngo Molnar <mingo@elte.hu>2009-11-23 02:03:09 -0500
commit98e4833ba3c314c99dc364012fba6ac894230ad0 (patch)
tree0730af86569f560f7f4421a2d0f4bf9441df19c6 /kernel/trace
parent192dcf1d1775736627280a5dd4cb0f605b21857a (diff)
ring-buffer benchmark: Run producer/consumer threads at nice +19
The ring-buffer benchmark threads run on nice 0 by default, using up a lot of CPU time and slowing down the system: PID USER PR NI VIRT RES SHR S %CPU %MEM TIME+ COMMAND 1024 root 20 0 0 0 0 D 95.3 0.0 4:01.67 rb_producer 1023 root 20 0 0 0 0 R 93.5 0.0 2:54.33 rb_consumer 21569 mingo 40 0 14852 1048 772 R 3.6 0.1 0:00.05 top 1 root 40 0 4080 928 668 S 0.0 0.0 0:23.98 init Renice them to +19 to make them less intrusive. Cc: Steven Rostedt <rostedt@goodmis.org> Cc: Frederic Weisbecker <fweisbec@gmail.com> Cc: Peter Zijlstra <a.p.zijlstra@chello.nl> Cc: Mike Galbraith <efault@gmx.de> LKML-Reference: <new-submission> Signed-off-by: Ingo Molnar <mingo@elte.hu>
Diffstat (limited to 'kernel/trace')
-rw-r--r--kernel/trace/ring_buffer_benchmark.c6
1 files changed, 6 insertions, 0 deletions
diff --git a/kernel/trace/ring_buffer_benchmark.c b/kernel/trace/ring_buffer_benchmark.c
index 70df73e4ff21..3875d49da990 100644
--- a/kernel/trace/ring_buffer_benchmark.c
+++ b/kernel/trace/ring_buffer_benchmark.c
@@ -399,6 +399,12 @@ static int __init ring_buffer_benchmark_init(void)
399 if (IS_ERR(producer)) 399 if (IS_ERR(producer))
400 goto out_kill; 400 goto out_kill;
401 401
402 /*
403 * Run them as low-prio background tasks by default:
404 */
405 set_user_nice(consumer, 19);
406 set_user_nice(producer, 19);
407
402 return 0; 408 return 0;
403 409
404 out_kill: 410 out_kill: