Rt-tester makes freezing processes fail.
PATCH 1/1 Rt-tester makes freezing processes fail.
Hi.
Compiling in the rt-tester currently makes freezing processes fail. I don't think there's anything wrong with it running during suspending, so adding PF_NOFREEZE to the flags set seems to be the right solution.
rtmutex-tester.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-)
kernel/rtmutex-tester.c +1 -1
@@ -259,7 +259,7 @@ static int test_func(void *data)struct test_thread_data *td = data;int ret; - current->flags |=PF_MUTEX_TESTER ; + current->flags |=PF_MUTEX_TESTER |PF_NOFREEZE ;allow_signal (SIGHUP );for (;;) {
Quoted 13 lines · On Fri, 14 Jul 2006 09:18:43 +1000 Nigel Cunningham <[email protected]> wrote:
Compiling in the rt-tester currently makes freezing processes fail. I don't think there's anything wrong with it running during suspending, so adding
PF_NOFREEZEto the flags set seems to be the right solution.Signed-off-by Nigel Cunningham <[email protected]>rtmutex-tester.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-)diff -ruNp
9971-rt-tester.patch-old/kernel/rtmutex-tester.c9971-rt-tester.patch-new/kernel/rtmutex-tester.c
kernel/rtmutex-tester.c static int test_func(void *data) · line 265
Quoted 8 lines
kernel/rtmutex-tester.c +1
-1@@ -259,7 +259,7 @@ static int test_func(void *data)struct test_thread_data *td = data;int ret; - current->flags |=PF_MUTEX_TESTER ; + current->flags |=PF_MUTEX_TESTER |PF_NOFREEZE ;allow_signal (SIGHUP );for (;;) {
I yesterday queued up the below patch. Which approach is most appropriate?
From: Luca Tettamanti <[email protected]>
When CONFIG_RT_MUTEX_TESTER is enabled kernel refuses to suspend the machine because it's unable to freeze the rt-test-* threads.
Add try_to_freeze() after schedule() so that the threads will be freezed correctly; I've tested the patch and it lets the notebook suspends and resumes nicely.
---
kernel/rtmutex-tester.c | 1 + 1 files changed, 1 insertion(+)
kernel/rtmutex-tester.c renamed from kernel/rtmutex-tester.c~add-try_to_freeze-to-rt-test-kthreads +1 -0
@@ -275,6 +275,7 @@ static int test_func(void *data)/* Wait for the next command to be executed */ schedule (); +try_to_freeze ();if (signal_pending (current))flush_signals (current);
_
Quoted 19 lines · Andrew Morton
Quoted 16 lines · On Fri, 14 Jul 2006 09:18:43 +1000 Nigel Cunningham <[email protected]> wrote:
Compiling in the rt-tester currently makes freezing processes fail. I don't think there's anything wrong with it running during suspending, so adding
PF_NOFREEZEto the flags set seems to be the right solution.Signed-off-by Nigel Cunningham <[email protected]>rtmutex-tester.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-)diff -ruNp
9971-rt-tester.patch-old/kernel/rtmutex-tester.c9971-rt-tester.patch-new/kernel/rtmutex-tester.ckernel/rtmutex-tester.c +0
-0@@ -259,7 +259,7 @@ static int test_func(void *data)struct test_thread_data *td = data;int ret;
Quoted 8 lines
kernel/rtmutex-tester.c static int test_func(void *data) · line 265
Quoted 5 lines
kernel/rtmutex-tester.c +1
-1- current->flags |=PF_MUTEX_TESTER ; + current->flags |=PF_MUTEX_TESTER |PF_NOFREEZE ;allow_signal (SIGHUP );for (;;) {I yesterday queued up the below patch. Which approach is most appropriate?
I prefer the one that makes these threads freeze (ie. the Luca's patch).
Greetings,
Rafael
Hi!
Quoted 3 lines
Quoted 1 line
I yesterday queued up the below patch. Which approach is most appropriate?
I prefer the one that makes these threads freeze (ie. the Luca's patch).
Agreed. We definitely do not want unneccessary stuff to run during suspend.
Pavel
Signature · 1 line
Thanks for all the (sleeping) penguins.
Hi.
Quoted 27 lines · Rafael J. Wysocki
Quoted 26 lines · Andrew Morton
On Fri, 14 Jul 2006 09:18:43 +1000
Quoted 23 lines · Nigel Cunningham
Compiling in the rt-tester currently makes freezing processes fail. I don't think there's anything wrong with it running during suspending, so adding
PF_NOFREEZEto the flags set seems to be the right solution.Signed-off-by Nigel Cunningham <[email protected]>rtmutex-tester.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-)diff -ruNp
9971-rt-tester.patch-old/kernel/rtmutex-tester.c9971-rt-tester.patch-new/kernel/rtmutex-tester.c---9971-rt-tester.patch-old/kernel/rtmutex-tester.c2006-07-07
10:27:46.000000000 +1000 +++9971-rt-tester.patch-new/kernel/rtmutex-tester.c2006-07-14
07:48:01.000000000 +1000 @@ -259,7 +259,7 @@ static inttest_func(void *data)(quoted diff) +1
-1struct test_thread_data *td = data; int ret; - current->flags |= PF_MUTEX_TESTER; + current->flags |= PF_MUTEX_TESTER | PF_NOFREEZE; allow_signal(SIGHUP);
Quoted 6 lines
Quoted 4 lines
Quoted 1 line
for(;;) {
I yesterday queued up the below patch. Which approach is most appropriate?
I prefer the one that makes these threads freeze (ie. the Luca's patch).
Ok.
Nigel
Signature · 2 lines
See http://www.suspend2.net for Howtos, FAQs, mailing lists, wiki and bugzilla info.