All of lore.kernel.org
 help / color / mirror / Atom feed
From: Roger Pau Monne <roger.pau@citrix.com>
To: xen-devel@lists.xenproject.org
Cc: Andrew Cooper <andrew.cooper3@citrix.com>,
	Wei Liu <wei.liu2@citrix.com>,
	Ian Jackson <ian.jackson@eu.citrix.com>,
	Jan Beulich <jbeulich@suse.com>,
	Roger Pau Monne <roger.pau@citrix.com>
Subject: [PATCH v2 3/6] xen/pvshim: identity pin shim vCPUs to pCPUs
Date: Wed, 17 Jan 2018 16:29:07 +0000	[thread overview]
Message-ID: <20180117162907.37974-1-roger.pau@citrix.com> (raw)
In-Reply-To: <20180117111609.hlur2q5r34ld6ujf@citrix.com>

Since VCPUOP_{up/down} already identity maps vCPU hotplug to pCPU
hotplug also identity pin the vCPUs to the pCPUs in the scheduler.
This prevents vCPU migration and should improve performance.

While there also use __cpumask_set_cpu instead of cpumask_set_cpu,
there's no need to use the locked variant.

Signed-off-by: Roger Pau Monné <roger.pau@citrix.com>
Reviewed-by: Wei Liu <wei.liu2@citrix.com>
---
Cc: Jan Beulich <jbeulich@suse.com>
Cc: Andrew Cooper <andrew.cooper3@citrix.com>
Cc: Wei Liu <wei.liu2@citrix.com>
Cc: Ian Jackson <ian.jackson@eu.citrix.com>
---
Changes since v1:
 - Clarify commit message.
---
Should be backported to the 4.10.0-shim-comet branch.
---
 xen/arch/x86/dom0_build.c | 5 ++---
 1 file changed, 2 insertions(+), 3 deletions(-)

diff --git a/xen/arch/x86/dom0_build.c b/xen/arch/x86/dom0_build.c
index 17cb1272c1..555660b853 100644
--- a/xen/arch/x86/dom0_build.c
+++ b/xen/arch/x86/dom0_build.c
@@ -140,9 +140,8 @@ struct vcpu *__init dom0_setup_vcpu(struct domain *d,
     {
         if ( pv_shim )
         {
-
-            cpumask_setall(v->cpu_hard_affinity);
-            cpumask_setall(v->cpu_soft_affinity);
+            __cpumask_set_cpu(vcpu_id, v->cpu_hard_affinity);
+            __cpumask_set_cpu(vcpu_id, v->cpu_soft_affinity);
         }
         else
         {
-- 
2.15.1


_______________________________________________
Xen-devel mailing list
Xen-devel@lists.xenproject.org
https://lists.xenproject.org/mailman/listinfo/xen-devel

  reply	other threads:[~2018-01-17 16:29 UTC|newest]

Thread overview: 40+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2018-01-17  9:48 [PATCH 0/6] xen/pvshim: fix for staging Roger Pau Monne
2018-01-17  9:48 ` [PATCH 1/6] xen/pvshim: map vcpu_info earlier for APs Roger Pau Monne
2018-01-17 10:50   ` Wei Liu
2018-01-18  8:35     ` Jan Beulich
2018-01-17  9:48 ` [PATCH 2/6] xen/pvh: place the trampoline at page 0x1 Roger Pau Monne
2018-01-17 10:55   ` Wei Liu
2018-01-17 11:35     ` Roger Pau Monné
2018-01-17 11:37       ` Wei Liu
2018-01-17 12:00         ` [PATCH v2 " Roger Pau Monne
2018-01-17 12:06           ` Wei Liu
2018-01-18  8:39           ` Jan Beulich
2018-01-17  9:48 ` [PATCH 3/6] xen/pvshim: identity pin shim vCPUs to pCPUs Roger Pau Monne
2018-01-17 11:16   ` Wei Liu
2018-01-17 16:29     ` Roger Pau Monne [this message]
     [not found]       ` <5A5F79EC020000E70331C076@prv-mh.provo.novell.com>
2018-01-18  8:48         ` [PATCH v2 " Jan Beulich
2018-01-18 11:11           ` Ian Jackson
2018-01-18 11:22             ` Jan Beulich
2018-01-18 11:25               ` Roger Pau Monné
2018-01-24 18:03   ` [PATCH " George Dunlap
2018-01-25  9:14     ` Roger Pau Monné
2018-01-25 14:03       ` George Dunlap
2018-01-25 15:38         ` Roger Pau Monné
2018-01-17  9:48 ` [PATCH 4/6] xen/pvshim: simplify replace_va_mapping code Roger Pau Monne
2018-01-17 10:47   ` Wei Liu
2018-01-18  8:50   ` Jan Beulich
2018-01-18  8:56   ` Andrew Cooper
2018-01-17  9:48 ` [PATCH 5/6] xen/pvshim: fix coding style issues Roger Pau Monne
2018-01-17 10:48   ` Wei Liu
2018-01-18  8:53   ` Jan Beulich
2018-01-17  9:48 ` [PATCH 6/6] firmware/shim: fix build process to use POSIX find options Roger Pau Monne
2018-01-17 10:56   ` Wei Liu
2018-01-17 16:24   ` Ian Jackson
2018-01-17 16:28     ` Wei Liu
2018-01-17 16:55       ` Ian Jackson
2018-01-17 16:57         ` Wei Liu
2018-01-17 17:03           ` Ian Jackson
2018-01-17 17:32     ` Roger Pau Monné
2018-01-17 17:58       ` Andrew Cooper
2018-01-18 10:14         ` Roger Pau Monné
2018-01-18 11:12           ` Ian Jackson

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=20180117162907.37974-1-roger.pau@citrix.com \
    --to=roger.pau@citrix.com \
    --cc=andrew.cooper3@citrix.com \
    --cc=ian.jackson@eu.citrix.com \
    --cc=jbeulich@suse.com \
    --cc=wei.liu2@citrix.com \
    --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.