* [PATCH] xen: cpupools: update domU's node-affinity on the cpupool_unassign_cpu() path
@ 2013-09-27 15:46 Dario Faggioli
2013-09-30 5:38 ` Juergen Gross
0 siblings, 1 reply; 2+ messages in thread
From: Dario Faggioli @ 2013-09-27 15:46 UTC (permalink / raw)
To: xen-devel; +Cc: George Dunlap, Juergen Gross, Keir Fraser
that is, when a cpu is remove from a pool, as it is happening already
on the cpupool_assign_cpu_*() path (i.e., when a cpu is added to a
pool).
Signed-off-by: Dario Faggioli <dario.faggioli@citrix.com>
Cc: Juergen Gross <juergen.gross@ts.fujitsu.com>
Cc: George Dunlap <George.Dunlap@eu.citrix.com>
Cc: Keir Fraser <keir@xen.org>
---
This patch was originally an hunk of the first version of a patch I sent last
week as a bugfix for an ASSERT() triggering in the NUMA-aware scheduling code.
Truned out that the bug was better fixe in a completely different way, and
hence this part was killed from there... That's why I'm resending it now as a
separate patch.
Dario
---
xen/common/cpupool.c | 8 ++++++++
1 file changed, 8 insertions(+)
diff --git a/xen/common/cpupool.c b/xen/common/cpupool.c
index 2164a9f..23e461d 100644
--- a/xen/common/cpupool.c
+++ b/xen/common/cpupool.c
@@ -355,6 +355,14 @@ int cpupool_unassign_cpu(struct cpupool *c, unsigned int cpu)
atomic_inc(&c->refcnt);
cpupool_cpu_moving = c;
cpumask_clear_cpu(cpu, c->cpu_valid);
+
+ rcu_read_lock(&domlist_read_lock);
+ for_each_domain_in_cpupool(d, c)
+ {
+ domain_update_node_affinity(d);
+ }
+ rcu_read_unlock(&domlist_read_lock);
+
spin_unlock(&cpupool_lock);
work_cpu = smp_processor_id();
^ permalink raw reply related [flat|nested] 2+ messages in thread
* Re: [PATCH] xen: cpupools: update domU's node-affinity on the cpupool_unassign_cpu() path
2013-09-27 15:46 [PATCH] xen: cpupools: update domU's node-affinity on the cpupool_unassign_cpu() path Dario Faggioli
@ 2013-09-30 5:38 ` Juergen Gross
0 siblings, 0 replies; 2+ messages in thread
From: Juergen Gross @ 2013-09-30 5:38 UTC (permalink / raw)
To: Dario Faggioli; +Cc: George Dunlap, xen-devel, Keir Fraser
On 27.09.2013 17:46, Dario Faggioli wrote:
> that is, when a cpu is remove from a pool, as it is happening already
> on the cpupool_assign_cpu_*() path (i.e., when a cpu is added to a
> pool).
>
> Signed-off-by: Dario Faggioli <dario.faggioli@citrix.com>
> Cc: Juergen Gross <juergen.gross@ts.fujitsu.com>
> Cc: George Dunlap <George.Dunlap@eu.citrix.com>
> Cc: Keir Fraser <keir@xen.org>
Acked-by: Juergen Gross <juergen.gross@ts.fujitsu.com>
> ---
> This patch was originally an hunk of the first version of a patch I sent last
> week as a bugfix for an ASSERT() triggering in the NUMA-aware scheduling code.
>
> Truned out that the bug was better fixe in a completely different way, and
> hence this part was killed from there... That's why I'm resending it now as a
> separate patch.
>
> Dario
> ---
> xen/common/cpupool.c | 8 ++++++++
> 1 file changed, 8 insertions(+)
>
> diff --git a/xen/common/cpupool.c b/xen/common/cpupool.c
> index 2164a9f..23e461d 100644
> --- a/xen/common/cpupool.c
> +++ b/xen/common/cpupool.c
> @@ -355,6 +355,14 @@ int cpupool_unassign_cpu(struct cpupool *c, unsigned int cpu)
> atomic_inc(&c->refcnt);
> cpupool_cpu_moving = c;
> cpumask_clear_cpu(cpu, c->cpu_valid);
> +
> + rcu_read_lock(&domlist_read_lock);
> + for_each_domain_in_cpupool(d, c)
> + {
> + domain_update_node_affinity(d);
> + }
> + rcu_read_unlock(&domlist_read_lock);
> +
> spin_unlock(&cpupool_lock);
>
> work_cpu = smp_processor_id();
>
>
> _______________________________________________
> Xen-devel mailing list
> Xen-devel@lists.xen.org
> http://lists.xen.org/xen-devel
>
>
--
Juergen Gross Principal Developer Operating Systems
PBG PDG ES&S SWE OS6 Telephone: +49 (0) 89 3222 2967
Fujitsu Technology Solutions e-mail: juergen.gross@ts.fujitsu.com
Mies van der Rohe Str. 8 Internet: ts.fujitsu.com
D-80807 Muenchen Company details: ts.fujitsu.com/imprint.html
^ permalink raw reply [flat|nested] 2+ messages in thread
end of thread, other threads:[~2013-09-30 5:38 UTC | newest]
Thread overview: 2+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2013-09-27 15:46 [PATCH] xen: cpupools: update domU's node-affinity on the cpupool_unassign_cpu() path Dario Faggioli
2013-09-30 5:38 ` Juergen Gross
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).