Re: Hot/cold allocation -- swsusp can not handle hot pages

From: Pavel Machek (pavel@ucw.cz)
Date: Sat Nov 02 2002 - 15:22:08 EST


Hi!

> > Swsusp counts free pages, and relies on fact that when it allocates
> > page there's one free page less. That is no longer true with hot
> > pages.
> > I attempted to work it around but it seems I am getting hot pages even
> > when I ask for cold one. This seems to fix it. Does it looks like
> > "possibly mergable" patch?
> > --- clean/mm/page_alloc.c 2002-11-01 00:37:44.000000000 +0100
> > +++ linux-swsusp/mm/page_alloc.c 2002-11-01 22:53:47.000000000 +0100
> > @@ -361,7 +361,7 @@
> > unsigned long flags;
> > struct page *page = NULL;
> >
> > - if (order == 0) {
> > + if ((order == 0) && !cold) {
> > struct per_cpu_pages *pcp;
> >
> > pcp = &zone->pageset[get_cpu()].pcp[cold];
> >
>
> This doesn't seem to be doing what you want, even if it seems to work.
> If you want there to be one free page less, then allocating it will
> work regardless. What are you looking for besides that? If it's not
> already working you want some additional semantics. Could this involve
> is_head_of_free_region()? That should be solvable with a per-cpu list
> shootdown algorithm to fully merge all the buddy bitmap things.

I need pages I allocate to disappear from "is_head_of_free_region()",
so my counts match.

                                                                Pavel

-- 
Casualities in World Trade Center: ~3k dead inside the building,
cryptography in U.S.A. and free speech in Czech Republic.
-
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@vger.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html
Please read the FAQ at  http://www.tux.org/lkml/



This archive was generated by hypermail 2b29 : Thu Nov 07 2002 - 22:00:26 EST