Re: %u-order allocation failed

From: Mikulas Patocka (mikulas@artax.karlin.mff.cuni.cz)
Date: Sat Oct 06 2001 - 14:13:00 EST


> --On Saturday, 06 October, 2001 4:44 PM +0200 Mikulas Patocka
> <mikulas@artax.karlin.mff.cuni.cz> wrote:
>
> > Here goes the fix. (note that I didn't try to compile it so there may be
> > bugs, but you see the point).
>
> (seems to replace high order allocations by vmalloc)
>
> & how does vmalloc allocate physically (as opposed to virtually)
> contiguous memory; can't clearly recall it being IRQ safe either
> (for GFP_ATOMIC).

It uses vmalloc only when __GFP_VMALLOC flag is given - and so it is
expected to not use __GFP_VMALLOC flag in IRQ.

NOTE: no allocations in IRQ are safe. Not only high-order ones.
Allocation in IRQ may fail any time and you must recover without lost of
functionality (network can lose packets any time, if you are doing some
general device driver, you must preallocate all buffers in process
context).

Mikulas

-
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/



This archive was generated by hypermail 2b29 : Sun Oct 07 2001 - 21:00:42 EST