[libvirt] [PATCH 5/5] qemu: Fix condition for checking vcpu when pinning vcpus

Peter Krempa pkrempa at redhat.com
Tue Apr 14 07:39:26 UTC 2015


On Mon, Apr 13, 2015 at 21:43:22 -0400, John Ferlan wrote:
> 
> 
> On 04/07/2015 02:50 PM, Peter Krempa wrote:
> > Previously we checked that the vcpu we are trying to set is in range of
> > the number of threads presented by qemu. The problem is that if the VM
> > is offline the count is 0. Since the condition subtracted 1 from the
> > count the number would overflow and the check would never trigger.
> > 
> > Change the condition for more sensible ones with specific error
> > messages.
> > 
> > Resolves: https://bugzilla.redhat.com/show_bug.cgi?id=1208434
> > ---
> >  src/qemu/qemu_driver.c | 13 ++++++++++---
> >  1 file changed, 10 insertions(+), 3 deletions(-)
> > 
> 
> ah yes, I remember pondering this code while working through the
> IOThreads pinning code.
> 
> ACK

Thanks, I've fixed the function name and pushed the series.

> 
> John
> 
> BTW: As with the add/del IOThreads code - this is yet another one of
> those places where using [n]vcpupids caused me to make a [n]iothreadpids

Since I'm planning to add specific cpu hotplug code I'm going to get rid
of vcpupids probably.

Peter
-------------- next part --------------
A non-text attachment was scrubbed...
Name: signature.asc
Type: application/pgp-signature
Size: 819 bytes
Desc: Digital signature
URL: <http://listman.redhat.com/archives/libvir-list/attachments/20150414/fb8a4c44/attachment-0001.sig>


More information about the libvir-list mailing list