[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index] Re: [Xen-devel] [PATCH] Xen: Spread boot time page scrubbing across all available CPU's (v7)
. groan.. > + /* > + * Use CPUs from best node, and if there are no CPUs on the > + * first node (the default) use the BSP. > + */ > + if ( find_non_smt(best_node, &node_cpus) == 0 ) > + cpumask_set_cpu(smp_processor_id(), &node_cpus); > > - spin_unlock(&heap_lock); > + /* We already have the node information from round #0. */ > + region[i].rem = region[i].per_cpu_sz % cpumask_weight(&node_cpus); > + region[i].per_cpu_sz /= cpumask_weight(&node_cpus); And we can use 'cpus' here as well, like: diff --git a/xen/common/page_alloc.c b/xen/common/page_alloc.c index 5af1361..f1c0676 100644 --- a/xen/common/page_alloc.c +++ b/xen/common/page_alloc.c @@ -1451,12 +1451,15 @@ void __init scrub_heap_pages(void) * Use CPUs from best node, and if there are no CPUs on the * first node (the default) use the BSP. */ - if ( find_non_smt(best_node, &node_cpus) == 0 ) + cpus = find_non_smt(best_node, &node_cpus); + if ( cpus == 0 ) + { cpumask_set_cpu(smp_processor_id(), &node_cpus); - + cpus = 1; + } /* We already have the node information from round #0. */ - region[i].rem = region[i].per_cpu_sz % cpumask_weight(&node_cpus); - region[i].per_cpu_sz /= cpumask_weight(&node_cpus); + region[i].rem = region[i].per_cpu_sz % cpus; + region[i].per_cpu_sz /= cpus; max_per_cpu_sz = region[i].per_cpu_sz; cpumask_copy(®ion[i].cpus, &node_cpus); Will post another patch <sigh> _______________________________________________ Xen-devel mailing list Xen-devel@xxxxxxxxxxxxx http://lists.xen.org/xen-devel
|
Lists.xenproject.org is hosted with RackSpace, monitoring our |