linux-mm.kvack.org archive mirror
 help / color / mirror / Atom feed
* [PATCH] Add freezer call in
@ 2005-03-15 22:21 Nigel Cunningham
  2005-03-15 23:37 ` Pavel Machek
  0 siblings, 1 reply; 3+ messages in thread
From: Nigel Cunningham @ 2005-03-15 22:21 UTC (permalink / raw)
  To: Andrew Morton, Pavel Machek
  Cc: Linux Memory Management, Linux Kernel Mailing List

This patch adds a freezer call to the slow path in __alloc_pages. It
thus avoids freezing failures in low memory situations. Like the other
patches, it has been in Suspend2 for longer than I can remember.

Signed-of-by: Nigel Cunningham <ncunningham@cyclades.com>

diff -ruNp 213-missing-refrigerator-calls-old/mm/page_alloc.c 213-missing-refrigerator-calls-new/mm/page_alloc.c
--- 213-missing-refrigerator-calls-old/mm/page_alloc.c	2005-02-03 22:33:50.000000000 +1100
+++ 213-missing-refrigerator-calls-new/mm/page_alloc.c	2005-03-16 09:01:28.000000000 +1100
@@ -838,6 +838,7 @@ rebalance:
 			do_retry = 1;
 	}
 	if (do_retry) {
+		try_to_freeze(0);
 		blk_congestion_wait(WRITE, HZ/50);
 		goto rebalance;
 	}
 

-- 
Nigel Cunningham
Software Engineer, Canberra, Australia
http://www.cyclades.com
Bus: +61 (2) 6291 9554; Hme: +61 (2) 6292 8028;  Mob: +61 (417) 100 574

Maintainer of Suspend2 Kernel Patches http://suspend2.net

--
To unsubscribe, send a message with 'unsubscribe linux-mm' in
the body to majordomo@kvack.org.  For more info on Linux MM,
see: http://www.linux-mm.org/ .
Don't email: <a href=mailto:"aart@kvack.org"> aart@kvack.org </a>

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

* Re: [PATCH] Add freezer call in
  2005-03-15 22:21 [PATCH] Add freezer call in Nigel Cunningham
@ 2005-03-15 23:37 ` Pavel Machek
  2005-03-16  1:09   ` Nigel Cunningham
  0 siblings, 1 reply; 3+ messages in thread
From: Pavel Machek @ 2005-03-15 23:37 UTC (permalink / raw)
  To: Nigel Cunningham
  Cc: Andrew Morton, Linux Memory Management, Linux Kernel Mailing List

Hi!

> This patch adds a freezer call to the slow path in __alloc_pages. It
> thus avoids freezing failures in low memory situations. Like the other
> patches, it has been in Suspend2 for longer than I can remember.

This one seems wrong.

What if someone does

	down(&some_lock_needed_during_suspend);
	kmalloc()

? If you freeze him during that allocation, you'll deadlock later...

								Pavel


> Signed-of-by: Nigel Cunningham <ncunningham@cyclades.com>
> 
> diff -ruNp 213-missing-refrigerator-calls-old/mm/page_alloc.c 213-missing-refrigerator-calls-new/mm/page_alloc.c
> --- 213-missing-refrigerator-calls-old/mm/page_alloc.c	2005-02-03 22:33:50.000000000 +1100
> +++ 213-missing-refrigerator-calls-new/mm/page_alloc.c	2005-03-16 09:01:28.000000000 +1100
> @@ -838,6 +838,7 @@ rebalance:
>  			do_retry = 1;
>  	}
>  	if (do_retry) {
> +		try_to_freeze(0);
>  		blk_congestion_wait(WRITE, HZ/50);
>  		goto rebalance;
>  	}


-- 
People were complaining that M$ turns users into beta-testers...
...jr ghea gurz vagb qrirybcref, naq gurl frrz gb yvxr vg gung jnl!
--
To unsubscribe, send a message with 'unsubscribe linux-mm' in
the body to majordomo@kvack.org.  For more info on Linux MM,
see: http://www.linux-mm.org/ .
Don't email: <a href=mailto:"aart@kvack.org"> aart@kvack.org </a>

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

* Re: [PATCH] Add freezer call in
  2005-03-15 23:37 ` Pavel Machek
@ 2005-03-16  1:09   ` Nigel Cunningham
  0 siblings, 0 replies; 3+ messages in thread
From: Nigel Cunningham @ 2005-03-16  1:09 UTC (permalink / raw)
  To: Pavel Machek
  Cc: Andrew Morton, Linux Memory Management, Linux Kernel Mailing List

Hi.

On Wed, 2005-03-16 at 10:37, Pavel Machek wrote:
> Hi!
> 
> > This patch adds a freezer call to the slow path in __alloc_pages. It
> > thus avoids freezing failures in low memory situations. Like the other
> > patches, it has been in Suspend2 for longer than I can remember.
> 
> This one seems wrong.
> 
> What if someone does
> 
> 	down(&some_lock_needed_during_suspend);
> 	kmalloc()
> 
> ? If you freeze him during that allocation, you'll deadlock later...

I suppose you're right. I'll see if I can look into this situation some
more. (Longer todo!).

Nigel

> > Signed-of-by: Nigel Cunningham <ncunningham@cyclades.com>
> > 
> > diff -ruNp 213-missing-refrigerator-calls-old/mm/page_alloc.c 213-missing-refrigerator-calls-new/mm/page_alloc.c
> > --- 213-missing-refrigerator-calls-old/mm/page_alloc.c	2005-02-03 22:33:50.000000000 +1100
> > +++ 213-missing-refrigerator-calls-new/mm/page_alloc.c	2005-03-16 09:01:28.000000000 +1100
> > @@ -838,6 +838,7 @@ rebalance:
> >  			do_retry = 1;
> >  	}
> >  	if (do_retry) {
> > +		try_to_freeze(0);
> >  		blk_congestion_wait(WRITE, HZ/50);
> >  		goto rebalance;
> >  	}
-- 
Nigel Cunningham
Software Engineer, Canberra, Australia
http://www.cyclades.com
Bus: +61 (2) 6291 9554; Hme: +61 (2) 6292 8028;  Mob: +61 (417) 100 574

Maintainer of Suspend2 Kernel Patches http://suspend2.net

--
To unsubscribe, send a message with 'unsubscribe linux-mm' in
the body to majordomo@kvack.org.  For more info on Linux MM,
see: http://www.linux-mm.org/ .
Don't email: <a href=mailto:"aart@kvack.org"> aart@kvack.org </a>

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

end of thread, other threads:[~2005-03-16  1:09 UTC | newest]

Thread overview: 3+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2005-03-15 22:21 [PATCH] Add freezer call in Nigel Cunningham
2005-03-15 23:37 ` Pavel Machek
2005-03-16  1:09   ` Nigel Cunningham

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