]> err.no Git - linux-2.6/commitdiff
[PATCH] rcutorture: renice to low priority
authorIngo Molnar <mingo@elte.hu>
Mon, 14 Nov 2005 00:07:22 +0000 (16:07 -0800)
committerLinus Torvalds <torvalds@g5.osdl.org>
Mon, 14 Nov 2005 02:14:15 +0000 (18:14 -0800)
Make the box usable for interactive work when running the RCU torture test,
by renicing the RCU torture-test threads to +19 by default.  Kthreads run
at nice -5 by default.

Signed-off-by: Ingo Molnar <mingo@elte.hu>
Acked-by: Paul E. McKenney" <paulmck@us.ibm.com>
Signed-off-by: Andrew Morton <akpm@osdl.org>
Signed-off-by: Linus Torvalds <torvalds@osdl.org>
kernel/rcutorture.c

index 9b58f1eff3ca8990d29f4e4f9b9ad52a621babd4..eb6719c50b4e0deb4546e7479a42bb82a9db90e4 100644 (file)
@@ -195,6 +195,8 @@ rcu_torture_writer(void *arg)
        static DEFINE_RCU_RANDOM(rand);
 
        VERBOSE_PRINTK_STRING("rcu_torture_writer task started");
+       set_user_nice(current, 19);
+
        do {
                schedule_timeout_uninterruptible(1);
                if (rcu_batches_completed() == oldbatch)
@@ -238,6 +240,8 @@ rcu_torture_reader(void *arg)
        int pipe_count;
 
        VERBOSE_PRINTK_STRING("rcu_torture_reader task started");
+       set_user_nice(current, 19);
+
        do {
                rcu_read_lock();
                completed = rcu_batches_completed();