[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: [Xen-devel] [PATCH 3/6] xen/pvshim: identity pin shim vCPUs to pCPUs



On Wed, Jan 24, 2018 at 06:03:28PM +0000, George Dunlap wrote:
> On Wed, Jan 17, 2018 at 9:48 AM, Roger Pau Monne <roger.pau@xxxxxxxxxx> wrote:
> > Since VCPUOP_{up/down} already identity pins vCPU hotplug to pCPU
> > hotplug also pin the vCPUs to the pCPUs in the scheduler. This prevent
> > 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@xxxxxxxxxx>
> 
> Sorry, I just realized this -- we already have a way to pin a VM 1:1
> -- d->is_pinned should do what you want here without having to
> special-case the pvshim.
> 
> It seems like something like the attached might be better (compile-tested 
> only).

I haven't tested the proposed patch, but there's a peculiarity of the
shim that I think makes this approach invalid.

When Xen is booted in shim mode the APs are never started, which means
that dom0_cpus only contains the BSP, and that alloc_vcpu is always
going to be called with cpu == 0. This in turn means that
sched_init_vcpu is also always called with cpu_id == 0, and if
is_pinned is set it would force all vCPUs to be pinned to the BSP
AFAICT.

Thanks, Roger.

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

 


Rackspace

Lists.xenproject.org is hosted with RackSpace, monitoring our
servers 24x7x365 and backed by RackSpace's Fanatical Support®.