xfs
[Top] [All Lists]

Re: %u-order allocation failed

To: Mikulas Patocka <mikulas@xxxxxxxxxxxxxxxxxxxxxxxx>
Subject: Re: %u-order allocation failed
From: Benjamin Herrenschmidt <benh@xxxxxxxxxxxxxxxxxxx>
Date: Sun, 7 Oct 2001 13:12:02 +0200
Cc: <linux-kernel@xxxxxxxxxxxxxxx>, <linux-xfs@xxxxxxxxxxx>
In-reply-to: <Pine.LNX.3.96.1011007003227.18004B-100000@xxxxxxxxxxxxxxxxxxxxxxxx>
References: <Pine.LNX.3.96.1011007003227.18004B-100000@xxxxxxxxxxxxxxxxxxxxxxxx>
Sender: owner-linux-xfs@xxxxxxxxxxx
>
>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.



<Prev in Thread] Current Thread [Next in Thread>