Re: [PATCH] Prezeroing V8

From: Christoph Lameter
Date: Thu Mar 17 2005 - 19:03:21 EST


On Thu, 17 Mar 2005, Andrew Morton wrote:

> Christoph Lameter <clameter@xxxxxxx> wrote:
> >
> > > And given that we have separate buddy structures for zeroed and not-zeroed
> > > pages, why is this tagging needed at all?
> >
> > Because the buddy pointers may point to a page of the different kind. Then
> > a merge is not possible.
>
> In that case I still don't understand, sorry.
>
> If each zone has two buddy lists, one for zeroed and one for not-zeroed,
> how can we ever get known-to-be-zeroed pages on the not-known-to-be-zeroed
> list or vice versa?

The buddy is calculated based on the position in the page struct array not
based on the list.

> >
> > #define __free_page(page) __free_pages((page), 0)
> > #define free_page(addr) free_pages((addr),0)
> >
> > This is what you want right?
>
> Well, it was more a question that a request. If we do this, does it speed
> anything up?

It will be able to manage the quicklist effectively and you can avoid
having to zero a page for pte/pmd/pud/pgds.

The main benefit from prezeroing is gained for programs that do numerical
calculations based on sparse matrices or other extremely large programs
that typically also come with large sparse arrays. The optimization is
typical for operating systems in that area (even M$ does that...).

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