lkml.org 
[lkml]   [2005]   [Dec]   [9]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
/
SubjectRe: [PATCH]: Making high and batch sizes of per_cpu_pagelists configurable
From
Date
On Thu, 2005-12-08 at 19:20 -0800, Andrew Morton wrote:
> Rohit Seth <rohit.seth@intel.com> 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@vger.kernel.org
More majordomo info at http://vger.kernel.org/majordomo-info.html
Please read the FAQ at http://www.tux.org/lkml/

\
 
 \ /
  Last update: 2005-12-09 18:54    [W:0.053 / U:0.312 seconds]
©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site