Re: [PATCH 2/2] page-allocator: Maintain rolling count of pages tofree from the PCP

From: Mel Gorman
Date: Fri Aug 28 2009 - 09:36:54 EST


On Fri, Aug 28, 2009 at 04:02:44PM +0300, Pekka Enberg wrote:
> Hi Mel,
>
> On Fri, 2009-08-28 at 13:57 +0100, Mel Gorman wrote:
> > On Fri, Aug 28, 2009 at 03:16:34PM +0300, Pekka Enberg wrote:
> > > Hi Mel,
> > >
> > > On Fri, Aug 28, 2009 at 11:44 AM, Mel Gorman<mel@xxxxxxxxx> wrote:
> > > > - page = list_entry(list->prev, struct page, lru);
> > > > - /* have to delete it as __free_one_page list manipulates */
> > > > - list_del(&page->lru);
> > > > - trace_mm_page_pcpu_drain(page, 0, migratetype);
> > > > - __free_one_page(page, zone, 0, migratetype);
> > > > + do {
> > > > + page = list_entry(list->prev, struct page, lru);
> > > > + /* must delete as __free_one_page list manipulates */
> > > > + list_del(&page->lru);
> > > > + __free_one_page(page, zone, 0, migratetype);
> > > > + trace_mm_page_pcpu_drain(page, 0, migratetype);
> > >
> > > This calls trace_mm_page_pcpu_drain() *after* __free_one_page(). It's
> > > probably not a good idea as __free_one_page() can alter the struct
> > > page in various ways.
> > >
> >
> > While true, does it alter the struct page in any way that matters?
>
> Page flags and order are probably interesting for tracing?
>

This is PCPU draining. The flags are already clear of any values of interest
and the order is always 0. I can follow up a fix-patch that reverses it just
in case but I don't think it makes a major difference?

--
Mel Gorman
Part-time Phd Student Linux Technology Center
University of Limerick IBM Dublin Software Lab
--
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/