Re: [PATCH] Avoiding mmap fragmentation - clean rev

Ingo Molnar
2005-05-18T07:43:42Z

* Arjan van de Ven <arjanv@redhat.com> wrote:

> > Please note, this patch completely obsoletes previous patch that
> > Wolfgang posted and should completely retain the performance benefit
> > of free_area_cache and at the same time preserving fragmentation to
> > minimum.
>
> this has one downside (other than that I like it due to it's
> simplicity): we've seen situations where there was a 4Kb gap at the
> start of the mmaps, and then all future mmaps are bigger (say, stack
> sized). That 4Kb gap would entirely void the advantage of the cache if
> the cache stuck to that 4kb gap. (Personally I favor correctness above
> all but it does hurt performance really bad)

hm, does the cache get permanently stuck at a small hole with Ken's
patch? An unmap may reset the cache to the hole once, but subsequent
unmaps (or mmaps) ought to move it to a larger hole again.

Ingo