lkml.org 
[lkml]   [2005]   [Dec]   [8]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
/
Date
From
SubjectRe: [PATCH]: Making high and batch sizes of per_cpu_pagelists configurable
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.

> +}
> +
> +/*
> + * 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@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 04:23    [W:0.054 / U:0.800 seconds]
©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site