lkml.org 
[lkml]   [2001]   [Oct]   [18]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
Patch in this message
/
Date
From
Subject[PATCH] fork() failing

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 */
-
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@vger.kernel.org
More majordomo info at http://vger.kernel.org/majordomo-info.html
Please read the FAQ at http://www.tux.org/lkml/

\
 
 \ /
  Last update: 2005-03-22 13:08    [W:0.053 / U:1.088 seconds]
©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site