2.3.99pre8 RAID memory allocation

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

  • Next message: G. Hugh Song: "Re: Concern about 2.2.15 Adaptec 7xxx drivers"

    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 : Sat May 13 2000 - 04:29:09 EDT