lkml.org 
[lkml]   [2010]   [Mar]   [10]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
/
Date
From
SubjectRe: USBFS Memory allocation Bug
On Wed, 10 Mar 2010, Mel Gorman wrote:

> On Tue, Mar 09, 2010 at 10:09:57PM +0100, Markus Rechberger wrote:
> > Hi,
> >
> > I just stumbled around following issue:
> >
> > <SNIP to have one full message>
> >
> > [275835.491094] mediasrv: page allocation failure. order:6, mode:0x40d0
>
> This is massive. Why is usbdev_ioctl requiring an order-6 allocation?
> Does it have the option to fall back to vmalloc() for example?

We needed to implement an upper limit on the buffer size, and the value
chosen was sufficient for 8 ms of data. There is no fallback to
vmalloc().

Of course, the mediasrv program could always make multiple smaller
data submissions instead of a single big one.

> So, it's a high-order allocation but no swap is configured. As the
> system has a big mix of both anonymous and file memory, it is likely it
> was unable to find a large enough contiguous range of file-backed memory
> it could discard. There is pretty much nothing the memory manager could
> do here.
>
> FWIW, if swap was configured I'd think there was more the memory manager
> could have done.
>
> Is usb falling back to vmalloc() or order-0 pages possible?

No. It's not possible since the buffer has to be contiguous for DMA
purposes (this is a requirement of the driver interface).

Alan Stern



\
 
 \ /
  Last update: 2010-03-10 16:19    [W:0.101 / U:3.756 seconds]
©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site