mirror of https://lore.kernel.org/lkml/
 help / color / mirror / Atom feed
* [PATCH] fork() failing
@ 2001-10-18 17:04 Marcelo Tosatti
  2001-10-18 19:25 ` David S. Miller
  0 siblings, 1 reply; 10+ messages in thread
From: Marcelo Tosatti @ 2001-10-18 17:04 UTC (permalink / raw)
  To: Linus Torvalds; +Cc: lkml


Linus,

As you know, we currently allow 1-order allocations to fail easily. 

However, there is one special case of 1-order allocations which cannot
fail: fork.

Here is the tested patch against pre4.

--- linux.orig/mm/page_alloc.c	Thu Oct 18 14:26:28 2001
+++ linux/mm/page_alloc.c	Thu Oct 18 16:23:15 2001
@@ -393,8 +393,13 @@
 		}
 	}
 
-	/* Don't let big-order allocations loop */
-	if (order)
+	/* We have one special 1-order alloc user: fork().
+	 * It obviously cannot fail easily like other 
+	 * high order allocations. This could also be fixed
+	 * by having a __GFP_LOOP flag to indicate that the 
+	 * high order allocation is "critical". 
+	 */
+	if (order > 1)
 		return NULL;
 
 	/* Yield for kswapd, and try again */


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

end of thread, other threads:[~2001-10-19  3:40 UTC | newest]

Thread overview: 10+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2001-10-18 17:04 [PATCH] fork() failing Marcelo Tosatti
2001-10-18 19:25 ` David S. Miller
2001-10-18 18:16   ` Marcelo Tosatti
2001-10-18 19:50   ` Linus Torvalds
2001-10-18 18:35     ` Marcelo Tosatti
2001-10-18 20:05       ` Rik van Riel
2001-10-18 18:48         ` Marcelo Tosatti
2001-10-18 20:15           ` Rik van Riel
2001-10-18 19:07             ` Marcelo Tosatti
2001-10-19  3:40               ` [RFC][PATCH] __GFP_FAIL (was: Re: [PATCH] fork() failing) Rik van Riel

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

all inboxes | Powered by JetHome®