Re: [PATCH 5/7] Add /proc trigger for memory compaction

From: David Rientjes
Date: Thu Jan 21 2010 - 18:34:54 EST

On Thu, 21 Jan 2010, Mel Gorman wrote:

> > It would be helpful to be able to determine what is "compactable" at the
> > same time by adding both global and per-node "compact_order" tunables that
> > would default to HUGETLB_PAGE_ORDER.
> Well, rather than having a separate tunable, writing a number to
> /proc/sys/vm/compact could indicate the order if that trigger is now
> working system-wide. Would that be suitable?

Do you think you'll eventually find a need to call try_to_compact_pages()
with a higher order than the one passed to the page allocator to limit
"compaction thrashing" from fragmented frees to a zone where we're
constantly compacting order-1 pages, for instance? I agree that memory
compaction should always be used before direct reclaim for higher order
allocations, but it may be more efficient to define a compact_min_order,
tunable from userspace, that would avoid the need for constant order-1
compactions from subsequent page allocations.

If that's a possibility, we may find a need for "compact_order", now
renamed "compact_min_order", outside of the explicit trigger.
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@xxxxxxxxxxxxxxx
More majordomo info at
Please read the FAQ at