public inbox for linux-kernel@vger.kernel.org
 help / color / mirror / Atom feed
* [PATCH] Rt-tester makes freezing processes fail.
@ 2006-07-13 23:18 Nigel Cunningham
  2006-07-13 23:37 ` Andrew Morton
  0 siblings, 1 reply; 5+ messages in thread
From: Nigel Cunningham @ 2006-07-13 23:18 UTC (permalink / raw)
  To: Linus Torvalds
  Cc: Linux Kernel Mailing List, Thomas Gleixner, Linux-pm list,
	Andrew Morton

[-- Attachment #1: Type: text/plain, Size: 888 bytes --]

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.

Signed-off-by: Nigel Cunningham <nigel@suspend2.net>

 rtmutex-tester.c |    2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)
diff -ruNp 9971-rt-tester.patch-old/kernel/rtmutex-tester.c 9971-rt-tester.patch-new/kernel/rtmutex-tester.c
--- 9971-rt-tester.patch-old/kernel/rtmutex-tester.c	2006-07-07 10:27:46.000000000 +1000
+++ 9971-rt-tester.patch-new/kernel/rtmutex-tester.c	2006-07-14 07:48:01.000000000 +1000
@@ -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(;;) {


[-- Attachment #2: Type: application/pgp-signature, Size: 191 bytes --]

^ permalink raw reply	[flat|nested] 5+ messages in thread

* Re: [PATCH] Rt-tester makes freezing processes fail.
  2006-07-13 23:18 [PATCH] Rt-tester makes freezing processes fail Nigel Cunningham
@ 2006-07-13 23:37 ` Andrew Morton
  2006-07-14  8:17   ` Rafael J. Wysocki
  0 siblings, 1 reply; 5+ messages in thread
From: Andrew Morton @ 2006-07-13 23:37 UTC (permalink / raw)
  To: nigel; +Cc: torvalds, linux-kernel, tglx, linux-pm

On Fri, 14 Jul 2006 09:18:43 +1000
Nigel Cunningham <nigel@suspend2.net> 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_NOFREEZE to the flags set seems to be the
> right solution.
> 
> Signed-off-by: Nigel Cunningham <nigel@suspend2.net>
> 
>  rtmutex-tester.c |    2 +-
>  1 file changed, 1 insertion(+), 1 deletion(-)
> diff -ruNp 9971-rt-tester.patch-old/kernel/rtmutex-tester.c 9971-rt-tester.patch-new/kernel/rtmutex-tester.c
> --- 9971-rt-tester.patch-old/kernel/rtmutex-tester.c	2006-07-07 10:27:46.000000000 +1000
> +++ 9971-rt-tester.patch-new/kernel/rtmutex-tester.c	2006-07-14 07:48:01.000000000 +1000
> @@ -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 <kronos.it@gmail.com>

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.

Signed-off-by: Luca Tettamanti <kronos.it@gmail.com>
Cc: Ingo Molnar <mingo@redhat.com>
Acked-by: Thomas Gleixner <tglx@linutronix.de>
Signed-off-by: Andrew Morton <akpm@osdl.org>
---

 kernel/rtmutex-tester.c |    1 +
 1 files changed, 1 insertion(+)

diff -puN kernel/rtmutex-tester.c~add-try_to_freeze-to-rt-test-kthreads kernel/rtmutex-tester.c
--- a/kernel/rtmutex-tester.c~add-try_to_freeze-to-rt-test-kthreads
+++ a/kernel/rtmutex-tester.c
@@ -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);
_


^ permalink raw reply	[flat|nested] 5+ messages in thread

* Re: [PATCH] Rt-tester makes freezing processes fail.
  2006-07-13 23:37 ` Andrew Morton
@ 2006-07-14  8:17   ` Rafael J. Wysocki
  2006-07-14 20:33     ` [linux-pm] " Pavel Machek
  2006-07-14 22:38     ` Nigel Cunningham
  0 siblings, 2 replies; 5+ messages in thread
From: Rafael J. Wysocki @ 2006-07-14  8:17 UTC (permalink / raw)
  To: Andrew Morton; +Cc: nigel, torvalds, linux-kernel, tglx, linux-pm, Pavel Machek

On Friday 14 July 2006 01:37, Andrew Morton wrote:
> On Fri, 14 Jul 2006 09:18:43 +1000
> Nigel Cunningham <nigel@suspend2.net> 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_NOFREEZE to the flags set seems to be the
> > right solution.
> > 
> > Signed-off-by: Nigel Cunningham <nigel@suspend2.net>
> > 
> >  rtmutex-tester.c |    2 +-
> >  1 file changed, 1 insertion(+), 1 deletion(-)
> > diff -ruNp 9971-rt-tester.patch-old/kernel/rtmutex-tester.c 9971-rt-tester.patch-new/kernel/rtmutex-tester.c
> > --- 9971-rt-tester.patch-old/kernel/rtmutex-tester.c	2006-07-07 10:27:46.000000000 +1000
> > +++ 9971-rt-tester.patch-new/kernel/rtmutex-tester.c	2006-07-14 07:48:01.000000000 +1000
> > @@ -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?

I prefer the one that makes these threads freeze (ie. the Luca's patch).

Greetings,
Rafael

^ permalink raw reply	[flat|nested] 5+ messages in thread

* Re: [linux-pm] [PATCH] Rt-tester makes freezing processes fail.
  2006-07-14  8:17   ` Rafael J. Wysocki
@ 2006-07-14 20:33     ` Pavel Machek
  2006-07-14 22:38     ` Nigel Cunningham
  1 sibling, 0 replies; 5+ messages in thread
From: Pavel Machek @ 2006-07-14 20:33 UTC (permalink / raw)
  To: Rafael J. Wysocki; +Cc: Andrew Morton, torvalds, tglx, linux-pm, linux-kernel

Hi!

> > 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
-- 
Thanks for all the (sleeping) penguins.

^ permalink raw reply	[flat|nested] 5+ messages in thread

* Re: [PATCH] Rt-tester makes freezing processes fail.
  2006-07-14  8:17   ` Rafael J. Wysocki
  2006-07-14 20:33     ` [linux-pm] " Pavel Machek
@ 2006-07-14 22:38     ` Nigel Cunningham
  1 sibling, 0 replies; 5+ messages in thread
From: Nigel Cunningham @ 2006-07-14 22:38 UTC (permalink / raw)
  To: Rafael J. Wysocki
  Cc: Andrew Morton, torvalds, linux-kernel, tglx, linux-pm,
	Pavel Machek

[-- Attachment #1: Type: text/plain, Size: 1510 bytes --]

Hi.

On Friday 14 July 2006 18:17, Rafael J. Wysocki wrote:
> On Friday 14 July 2006 01:37, Andrew Morton wrote:
> > On Fri, 14 Jul 2006 09:18:43 +1000
> >
> > Nigel Cunningham <nigel@suspend2.net> 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_NOFREEZE to the flags set seems to be the
> > > right solution.
> > >
> > > Signed-off-by: Nigel Cunningham <nigel@suspend2.net>
> > >
> > >  rtmutex-tester.c |    2 +-
> > >  1 file changed, 1 insertion(+), 1 deletion(-)
> > > diff -ruNp 9971-rt-tester.patch-old/kernel/rtmutex-tester.c
> > > 9971-rt-tester.patch-new/kernel/rtmutex-tester.c ---
> > > 9971-rt-tester.patch-old/kernel/rtmutex-tester.c	2006-07-07
> > > 10:27:46.000000000 +1000 +++
> > > 9971-rt-tester.patch-new/kernel/rtmutex-tester.c	2006-07-14
> > > 07:48:01.000000000 +1000 @@ -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?
>
> I prefer the one that makes these threads freeze (ie. the Luca's patch).

Ok.

Nigel
-- 
See http://www.suspend2.net for Howtos, FAQs, mailing
lists, wiki and bugzilla info.

[-- Attachment #2: Type: application/pgp-signature, Size: 191 bytes --]

^ permalink raw reply	[flat|nested] 5+ messages in thread

end of thread, other threads:[~2006-07-14 22:38 UTC | newest]

Thread overview: 5+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2006-07-13 23:18 [PATCH] Rt-tester makes freezing processes fail Nigel Cunningham
2006-07-13 23:37 ` Andrew Morton
2006-07-14  8:17   ` Rafael J. Wysocki
2006-07-14 20:33     ` [linux-pm] " Pavel Machek
2006-07-14 22:38     ` Nigel Cunningham

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox