Re: Page allocator: Single Zone optimizations

Christoph Lameter
2006-11-08T02:08:44Z

On Wed, 8 Nov 2006, KAMEZAWA Hiroyuki wrote:

> In these days, I've struggled with crashdump from a user to investigate the reason
> of oom-kill. At last, the reason was most of 2G bytes ZONE_DMA pages were
> mlocked(). Sigh....
> I wonder we can use migration of MOVABLE pages for zone balancing in future.
> (maybe complicated but...)

If we run out of ZONE_DMA memory in the page allocator then scan through
the LRU of ZONE_DMA for pages, call isolate_lru_page() for each page that
you find worthy of moving (all mlocked pages f.e.) and when you have
collected a sufficient quantity call migrate_pages() to get all that are
movable out of ZONE_DMA.

Note though that any writeback of the migrated pages to devices that
require pages <2G will then allocate a bounce buffer for the page.

Seems that you found another reason why it would be useful to get
rid of ZONE_DMA entirely.