Re: [PATCH 30/35] Skip the PCP list search by counting the orderand type of pages on list
From: Mel Gorman
Date: Mon Mar 16 2009 - 12:51:20 EST
On Mon, Mar 16, 2009 at 12:31:44PM -0400, Christoph Lameter wrote:
> On Mon, 16 Mar 2009, Mel Gorman wrote:
>
> >
> > struct per_cpu_pages {
> > - int count; /* number of pages in the list */
> > + /* The total number of pages on the PCP lists */
> > + int count;
> > +
> > + /* Count of each migratetype and order */
> > + u8 mocount[MIGRATE_PCPTYPES][PAGE_ALLOC_COSTLY_ORDER+1];
>
> What about overflow? You could have more than 255 pages of a given type in
> a pcp.
>
Are you sure? The maximum size I would expect is pcp->high which is
6 * pcp->batch which is limited in size. I might have missed something
though.
--
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/