Skip to contentSkip to conversation

rcu: rcutorture suspend fix

PATCH In review Ingo Molnar 2 participants 2 messages Dec 22, 2006

lore
Share & tools
lore
#0 lore raw

PATCH 1/1 rcu: rcutorture suspend fix

Subject: [patch] rcu: rcutorture suspend fix
From: Ingo Molnar <[email protected]>

fix suspend hang: rcutorture threads need to be nofreeze.

---
 kernel/rcutorture.c |    3 +++
 1 file changed, 3 insertions(+)
kernel/rcutorture.c +3 -0
Index: linux/kernel/rcutorture.c
===================================================================
@@ -522,6 +522,7 @@ rcu_torture_writer(void *arg)
 
 	VERBOSE_PRINTK_STRING("rcu_torture_writer task started");
 	set_user_nice(current, 19);
+	current->flags |= PF_NOFREEZE;
 
 	do {
 		schedule_timeout_uninterruptible(1);
@@ -561,6 +562,7 @@ rcu_torture_fakewriter(void *arg)
 
 	VERBOSE_PRINTK_STRING("rcu_torture_fakewriter task started");
 	set_user_nice(current, 19);
+	current->flags |= PF_NOFREEZE;
 
 	do {
 		schedule_timeout_uninterruptible(1 + rcu_random(&rand)%10);
@@ -591,6 +593,7 @@ rcu_torture_reader(void *arg)
 
 	VERBOSE_PRINTK_STRING("rcu_torture_reader task started");
 	set_user_nice(current, 19);
+	current->flags |= PF_NOFREEZE;
 
 	do {
 		idx = cur_ops->readlock();
Acked-by on v1 1/1
#1 lore raw
Quoted 4 lines · Ingo Molnar

Subject: [patch] rcu: rcutorture suspend fix
From: Ingo Molnar <[email protected]>

fix suspend hang: rcutorture threads need to be nofreeze.

Looks straightforward enough -- I take it that rcutorture continues upon resume? So I have to ask... Would it make sense to simply unload the rcutorture module upon suspend?

But either way this is an improvement, so...

Quoted 33 lines
---
 kernel/rcutorture.c |    3 +++
 1 file changed, 3 insertions(+)

Index: linux/kernel/rcutorture.c
===================================================================

kernel/rcutorture.c +3 -0
@@ -522,6 +522,7 @@ rcu_torture_writer(void *arg)
 
 	VERBOSE_PRINTK_STRING("rcu_torture_writer task started");
 	set_user_nice(current, 19);
+	current->flags |= PF_NOFREEZE;
 
 	do {
 		schedule_timeout_uninterruptible(1);
@@ -561,6 +562,7 @@ rcu_torture_fakewriter(void *arg)
 
 	VERBOSE_PRINTK_STRING("rcu_torture_fakewriter task started");
 	set_user_nice(current, 19);
+	current->flags |= PF_NOFREEZE;
 
 	do {
 		schedule_timeout_uninterruptible(1 + rcu_random(&rand)%10);
@@ -591,6 +593,7 @@ rcu_torture_reader(void *arg)
 
 	VERBOSE_PRINTK_STRING("rcu_torture_reader task started");
 	set_user_nice(current, 19);
+	current->flags |= PF_NOFREEZE;
 
 	do {
 		idx = cur_ops->readlock();