2.3.99pre8 RAID memory allocation

From: Andi Kleen (ak@suse.de)
Date: Sat May 13 2000 - 03:27:02 EST


While reading 2.3.99pre8:

static struct page * raid1_gfp (void)
+{
+ struct page *page;
+ /*
+ * now we are rather fault tolerant than nice, but
+ * there are a couple of places in the RAID code where we
+ * simply can not afford to fail an allocation because
+ * there is no failure return path (eg. make_request())
+ * FIXME: be nicer here.
+ */
+ while (!(page = (void*)alloc_page(GFP_KERNEL))) {
+ printk ("raid1: GFP out of memory, retrying...\n");
+ schedule_timeout(2);
+ }
+

Are you sure that you don't need a current->policy |= SCHED_YIELD
here ? Iirc the TCP code something did something very similar,
and the SCHED_YIELD had to be added to avoid mm deadlocks.

-Andi

-
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@vger.rutgers.edu
Please read the FAQ at http://www.tux.org/lkml/



This archive was generated by hypermail 2b29 : Mon May 15 2000 - 21:00:22 EST