Re: [PATCH 3/3] mm: page allocator: Drain per-cpu lists afterdirect reclaim allocation fails

From: Mel Gorman
Date: Thu Sep 09 2010 - 09:55:42 EST


On Thu, Sep 09, 2010 at 08:45:16AM -0500, Christoph Lameter wrote:
> On Thu, 9 Sep 2010, Mel Gorman wrote:
>
> > @@ -1876,10 +1890,13 @@ retry:
> > migratetype);
> >
> > /*
> > - * If an allocation failed after direct reclaim, it could be because
> > - * pages are pinned on the per-cpu lists. Drain them and try again
> > + * If a high-order allocation failed after direct reclaim, it could
> > + * be because pages are pinned on the per-cpu lists. However, only
> > + * do it for PAGE_ALLOC_COSTLY_ORDER as the cost of the IPI needed
> > + * to drain the pages is itself high. Assume that lower orders
> > + * will naturally free without draining.
> > */
> > - if (!page && !drained) {
> > + if (!page && !drained && order > PAGE_ALLOC_COSTLY_ORDER) {
> > drain_all_pages();
> > drained = true;
> > goto retry;
> >
>
> This will have the effect of never sending IPIs for slab allocations since
> they do not do allocations for orders > PAGE_ALLOC_COSTLY_ORDER.
>

The question is how severe is that? There is somewhat of an expectation
that the lower orders free naturally so it the IPI justified? That said,
our historical behaviour would have looked like

if (!page && !drained && order) {
drain_all_pages();
draiained = true;
goto retry;
}

Play it safe for now and go with that?

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