On Fri, Mar 06, 2015 at 06:06:49AM -0500, John Ferlan wrote: > > > On 03/06/2015 04:46 AM, Daniel P. Berrange wrote: > > On Thu, Mar 05, 2015 at 09:03:02PM -0500, John Ferlan wrote: > >> Add virDomainGetIOThreadPin to fetch the pinned CPU affinity map > >> for one IOThread. > >> > >> Add virDomainPinIOThread to allow setting the CPU affinity for a > >> specific IOThread. > >> > >> Signed-off-by: John Ferlan <jferlan@xxxxxxxxxx> > >> --- > >> include/libvirt/libvirt-domain.h | 10 +++ > >> src/driver-hypervisor.h | 16 +++++ > >> src/libvirt-domain.c | 152 +++++++++++++++++++++++++++++++++++++++ > >> src/libvirt_public.syms | 2 + > >> 4 files changed, 180 insertions(+) > >> > >> diff --git a/include/libvirt/libvirt-domain.h b/include/libvirt/libvirt-domain.h > >> index 9487b80..fc35cd2 100644 > >> --- a/include/libvirt/libvirt-domain.h > >> +++ b/include/libvirt/libvirt-domain.h > >> @@ -1609,6 +1609,16 @@ void virDomainIOThreadsInfoFree(virDomainIOThreadInfoPtr info); > >> int virDomainGetIOThreadsInfo(virDomainPtr domain, > >> virDomainIOThreadInfoPtr **info, > >> unsigned int flags); > >> +int virDomainGetIOThreadPin (virDomainPtr domain, > >> + unsigned int iothread_id, > >> + unsigned char *cpumap, > >> + int maplen, > >> + unsigned int flags); > > > > Isn't the GetIOThreadsInfo method & struct already reporting the pinning > > info for all current IO threads ? I'm not sure what the difference is > > between what GetIOThreadsInfo and GetIOThreadPin is ? > > > > +struct _virDomainIOThreadInfo { > > + unsigned int iothread_id; /* IOThread ID */ > > + unsigned char *cpumap; /* CPU map for thread. A pointer to an */ > > + /* array of real CPUs (in 8-bit bytes) */ > > + int cpumaplen; /* cpumap size */ > > +}; > > > > These fields match all the parameters in GetIOThreadPin, so it seems adding a > > GetIOThreadPin is redundant, > > > > > > Yes - although based on reviews from yesterday it wasn't totally clear > if having a GetIOThreadPin in addition to GetIOThreadsInfo was > requested, so I added it to be "safe", but can remove it. > > There is a GetVcpus and a GetVcpuPinInfo and the IOThreads code mirrors > that. Ah that's more of a historical accident :-) We added GetVcpus first to simply return the number of VCPUs and later added GetVcpuPinInfo to return pinning info. If we were doing it fresh, we'd only add the GetVcpuPinInfo since it offers the superset of features. If you repost without GetIOThreadPin, I'd ack the rest. BTW, no need to repost the first 3 I already acked. Regards, Daniel -- |: http://berrange.com -o- http://www.flickr.com/photos/dberrange/ :| |: http://libvirt.org -o- http://virt-manager.org :| |: http://autobuild.org -o- http://search.cpan.org/~danberr/ :| |: http://entangle-photo.org -o- http://live.gnome.org/gtk-vnc :| -- libvir-list mailing list libvir-list@xxxxxxxxxx https://www.redhat.com/mailman/listinfo/libvir-list