Re: [RFC] memory defragmentation to satisfy high order allocations

From: Nick Piggin
Date: Fri Oct 01 2004 - 21:31:29 EST




Marcelo Tosatti wrote:


With such a thing in place we can build a mechanism for kswapd (or a separate kernel thread, if needed) to notice when we are low on high order pages, and use the coalescing algorithm instead blindly freeing unique pages from LRU in the hope to build large physically contiguous memory areas.

Comments appreciated.



Hi Marcelo,
Seems like a good idea... even with regular dumb kswapd "merging",
you may easily get stuck for example on systems without swap...

Anyway, I'd like to get those beat kswapd patches in first. Then
your mechanism just becomes something like:

if order-0 pages are low {
try to free memory
}
else if order-1 or higher pages are low {
try to coalesce_memory
if that fails, try to free memory
}

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