From: Konrad Rzeszutek Wilk <konrad.wilk@oracle.com>
To: xen-devel@lists.xenproject.org, JBeulich@suse.com,
andrew.cooper3@citrix.com, tim@xen.org,
dario.faggioli@citrix.com, julien.grall@linaro.org
Cc: konrad@kernel.org, malcolm.crossley@citrix.com
Subject: Re: [PATCH] Xen: Spread boot time page scrubbing across all available CPU's (v7)
Date: Fri, 13 Jun 2014 15:45:01 -0400 [thread overview]
Message-ID: <20140613194501.GA29208@laptop.dumpdata.com> (raw)
In-Reply-To: <1402686657-28922-1-git-send-email-konrad.wilk@oracle.com>
. 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>
prev parent reply other threads:[~2014-06-13 19:45 UTC|newest]
Thread overview: 2+ messages / expand[flat|nested] mbox.gz Atom feed top
2014-06-13 19:10 [PATCH] Xen: Spread boot time page scrubbing across all available CPU's (v7) Konrad Rzeszutek Wilk
2014-06-13 19:45 ` Konrad Rzeszutek Wilk [this message]
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=20140613194501.GA29208@laptop.dumpdata.com \
--to=konrad.wilk@oracle.com \
--cc=JBeulich@suse.com \
--cc=andrew.cooper3@citrix.com \
--cc=dario.faggioli@citrix.com \
--cc=julien.grall@linaro.org \
--cc=konrad@kernel.org \
--cc=malcolm.crossley@citrix.com \
--cc=tim@xen.org \
--cc=xen-devel@lists.xenproject.org \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.