Re: USBFS Memory allocation Bug
From: Mel Gorman
Date: Mon Mar 15 2010 - 05:37:04 EST
On Sun, Mar 14, 2010 at 07:31:14PM -0400, Andrew Morton wrote:
> On Thu, 11 Mar 2010 11:56:22 -0500 (EST) Alan Stern <stern@xxxxxxxxxxxxxxxxxxx> wrote:
>
> > On Wed, 10 Mar 2010, Mel Gorman wrote:
> >
> > > > > Is there any means for the driver to take the large request, break it up
> > > > > into multiple smaller requests and submit them one at a time?
> > > >
> > > > In theory almost anything is possible. But it would be a big effort
> > > > and not consistent with the way the rest of the driver works.
> > > >
> > >
> > > Then about the only other suggestion would be a mempool containing a small
> > > number of largest-possible buffers that is enabled if there is no swap
> > > available.
> >
> > Considering that this is the first report I have heard about this sort
> > of problem, and that adding swap space would probably fix it, I'm not
> > inclined to make any changes.
>
> Adding swap space is unlikely to help here. For an order-6 allocation
> the page allocator will go into wtf-youre-kidding-me mode and won't
> even bother trying.
>
It will try and make the allocation and probably enter direct reclaim
and do a lumpy reclaim for contiguous blocks. What it won't do is retry
as many times as an allocation order <= PAGE_ALLOC_COSTLY_ORDER.
> Asking the allocator for 2^6 physically contiguous pages is terribly
> unreliable and shouldn't be done by any kernel code which wants to be
> useful.
>
This remains true. With swap, the high-order allocation attempt might succeed
many of the times but there will still be situations where it fails.
--
Mel Gorman
Part-time Phd Student Linux Technology Center
University of Limerick IBM Dublin Software Lab
--
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@xxxxxxxxxxxxxxx
More majordomo info at http://vger.kernel.org/majordomo-info.html
Please read the FAQ at http://www.tux.org/lkml/