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

From: Andrew Morton
Date: Thu Dec 08 2005 - 22:21:11 EST


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.

> +}
> +
> +/*
> + * percpu_pagelist_fraction - changes the pcp->high for each zone on each
> + * cpu. It is the fraction of total pages in each zone that a hot per cpu pagelist
> + * can have before it gets flushed back to buddy allocator.
> + */
> +
> +int percpu_pagelist_fraction_sysctl_handler(ctl_table *table, int write,
> + struct file *file, void __user *buffer, size_t *length, loff_t *ppos)
> +{
> + struct zone *zone;
> + unsigned int cpu;
> + int ret;
> +
> + ret = proc_dointvec_minmax(table, write, file, buffer, length, ppos);
> + if (!write || (ret == -EINVAL))
> + return ret;
> + 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?
-
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/