[libvirt] [PATCH v2] vcpupin: add clear feature

Peter Krempa pkrempa at redhat.com
Mon Feb 12 13:31:46 UTC 2018


On Mon, Feb 12, 2018 at 09:39:26 +0000, Daniel Berrange wrote:
> On Mon, Feb 12, 2018 at 03:54:21AM -0500, Yi Wang wrote:
> > We can't clear vcpupin settings of XML once we did vcpupin
> > command, this is not convenient under some condition such
> > as migration to a host with less CPUs.
> > 
> > This patch introduces clear feature, which can clear vcpuin
> > setting of XML using a 'c' option.
> > 
> > Signed-off-by: Yi Wang <wang.yi59 at zte.com.cn>
> > Signed-off-by: Xi Xu <xu.xi8 at zte.com.cn>
> > ---
> >  include/libvirt/libvirt-domain.h | 11 +++++++++++
> >  src/qemu/qemu_driver.c           | 32 ++++++++++++++++++++++++--------
> 
> I'm not seeing a good reason for these change. There's no concept of clearing
> CPU pinning - the default is simply "pinned" to all possible CPUs, and the
> callers should already be able to request all possile CPUs with the current
> API design.

Well, the thing is that in some cases the default is not pinned to all
pCPUs, but rather can be taken from other configuration points, e.g.
global VM pinning bitmap.

As of such the current code does not allow restoring such state since
pinning to all pCPUs might be a desired legitimate configuration so I've
removed the hack that deleted the pinning for such configuration a long
time ago. This means that an explicit removal of the pinning might be a
desired behaviour of the API, since abusing of any other value to
restore the default state is not a good idea.
-------------- next part --------------
A non-text attachment was scrubbed...
Name: signature.asc
Type: application/pgp-signature
Size: 833 bytes
Desc: not available
URL: <http://listman.redhat.com/archives/libvir-list/attachments/20180212/efd11fa4/attachment-0001.sig>


More information about the libvir-list mailing list