Skip to content

Commit

Permalink
xen/pvshim: identity pin shim vCPUs to pCPUs
Browse files Browse the repository at this point in the history
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é <[email protected]>
Reviewed-by: Wei Liu <[email protected]>
Acked-by: Jan Beulich <[email protected]>
  • Loading branch information
royger authored and Wei Liu committed Jan 18, 2018
1 parent a232346 commit c9c71e4
Showing 1 changed file with 2 additions and 3 deletions.
5 changes: 2 additions & 3 deletions xen/arch/x86/dom0_build.c
Original file line number Diff line number Diff line change
Expand Up @@ -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
{
Expand Down

0 comments on commit c9c71e4

Please sign in to comment.