Re: [PATCH]: Making high and batch sizes of per_cpu_pagelistsconfigurable

From: Rohit Seth
Date: Fri Dec 09 2005 - 12:50:56 EST


On Thu, 2005-12-08 at 19:20 -0800, Andrew Morton wrote:
> Rohit Seth <rohit.seth@xxxxxxxxx> wrote:
> >
> > + if ((high/4) > (PAGE_SHIFT * 8))
> > + pcp->batch = PAGE_SHIFT * 8;
>
> hm. What relationship is there between log2(PAGE_SIZE) and the batch
> quantity? I'd have thought that if anything, we'd want to make the
> batch sizes smaller for larger PAGE_SIZE. Or something.
>
There is really no relationship between batch with either
log2(PAGE_SIZE) or PAGE_SIZE. Larger page size machines typically go
with larger memory configs so it is okay to have bigger batch count for
those. But this can be worked either way. It is just a number of pages
that will get pulled (and in some cases pushed back) from buddy
allocator at any time. My initial attempts to make this some function
of power of 2 and such have not gone anywhere.

> > + for_each_zone(zone) {
> > + for_each_online_cpu(cpu) {
> > + unsigned long high;
> > + high = zone->present_pages /
> percpu_pagelist_fraction;
> > + setup_pagelist_highmark(zone_pcp(zone, cpu),
> high);
>
> What happens if a CPU comes online afterwards?
>
>

Good point. Right now the new cpu will use the original boot settings
for the pagelist. I will send you a smaller patch to correct that.
Basically check at the setup time if the percpu_pagelist_fraction is set
or not and build the pagelist accordingly.

Thanks,
-rohit

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