Re: RFC: preliminary patch for memory defragmentation

MOLNAR Ingo (mingo@valerie.inf.elte.hu)
Fri, 17 Jul 1998 04:41:32 +0200 (MET DST)


On Thu, 16 Jul 1998, Bill Hawes wrote:

> I've been experimenting with a simple but effective approach to memory
> defragmentation, and have attached a patch for comment and suggestions.

[cool :)]

what about the following additional logic: to allocate all subpages within
one given higher-order candidate page.

this way defragmentation has three steps:

- we notice in the candidate bitmap that a given 'bigpage' could
be freed

- allocate all free pages within that bigpage and start IO if
necessary

- do the freeing of the bigpage atomically when the last IO has
finished

Thus it's always guaranteed that we 'make progress', even if we have heavy
memory pressure and are doing nonatomic freeing like put_dirty_page().
Once all 'freeing' is finished, we can free the 'big page' at once, so it
atomically buddies up.

this way the defragmentor acts like an 'elevator', it moves smaller order
pages into big order pages.

-- mingo

-
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@vger.rutgers.edu
Please read the FAQ at http://www.altern.org/andrebalsa/doc/lkml-faq.html