Re: %u-order allocation failed

Benjamin Herrenschmidt (benh@kernel.crashing.org)
Sun, 7 Oct 2001 13:12:02 +0200


>
>You are right. Code that allocates more than page and expects it to be
>physicaly contignuous is broken by design. Even rewrite the driver or
>allocate memory on boot. It will be very hard to audit all drivers for it.

Well, the problem here is not code. Some piece of hardware just can't
scatter gather, or in some case, they can, but the scatter/gather list
itself has to be contiguous and can be larger than a page.

The fact that kmalloc returns physically contiguous memory is a feature
and can't be modified that easily. If you intend to do so, then you need
different GFP flags, for example a GFP_CONTIGUOUS flag, and then make
sure that drivers allocating DMA memory use that new flag.

Ben.

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