[lkml]   [1999]   [Nov]   [3]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
Messages in this thread
    Patch in this message
    Subject[patch] bigmem fix for random out of memory (for 2.3.25)
    Leonard spotted a bug in the bigmem initialization code. I couldn't debug
    it as it can't trigger with the bigmem emulation.

    Actually GFP will return NULL if RMQUEUE grabbed the physical page at
    address -PAGE_OFFSET. Lenonard fixed this to just avoid to put the
    bigmem in the freelist and I would do the same too as one page is not a
    big deal with real bigmem hardware.

    I merged his plain fix in my 2.2.13 bigmem and I reworked it for 2.3.25.

    The other cleaner way to fix this bug is to change GFP to return a `struct
    page *' or the `pfn' and the other way is definitely not a one-liner ;).
    Even if we want to fix it properly in the other way we can go with this
    trick today (it will be trivial to remove the check later).

    --- 2.3.25-i386/arch/i386/mm/init.c.~1~ Tue Oct 26 21:30:50 1999
    +++ 2.3.25-i386/arch/i386/mm/init.c Wed Nov 3 16:52:30 1999
    @@ -526,6 +526,12 @@
    + /* GFP in page_alloc.c would return zero for the
    + bigmem page located at physical address -PAGE_OFFSET.
    + We cannot allow GFP to return 0 since the callers of
    + treat 0 as an allocation failure. */
    + if (!((tmp << PAGE_SHIFT) + PAGE_OFFSET))
    + continue;
    set_bit(PG_highmem, &page->flags);
    atomic_set(&page->count, 1);

    To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
    the body of a message to
    Please read the FAQ at

     \ /
      Last update: 2005-03-22 13:54    [W:0.019 / U:4.220 seconds]
    ©2003-2017 Jasper Spaans. hosted at Digital OceanAdvertise on this site