From mboxrd@z Thu Jan 1 00:00:00 1970 From: George Dunlap Subject: Re: [PATCH v4 10/15] xen: sched: DOMCTL_*vcpuaffinity works with hard and soft affinity Date: Wed, 27 Nov 2013 14:17:40 +0000 Message-ID: <5295FF04.9010003@eu.citrix.com> References: <20131122183332.11200.20231.stgit@Solace> <20131122185758.11200.44816.stgit@Solace> <5295FDA702000078001078EC@nat28.tlf.novell.com> Mime-Version: 1.0 Content-Type: text/plain; charset="us-ascii"; Format="flowed" Content-Transfer-Encoding: 7bit Return-path: Received: from mail6.bemta5.messagelabs.com ([195.245.231.135]) by lists.xen.org with esmtp (Exim 4.72) (envelope-from ) id 1Vlfw4-0005np-7E for xen-devel@lists.xenproject.org; Wed, 27 Nov 2013 14:17:48 +0000 In-Reply-To: <5295FDA702000078001078EC@nat28.tlf.novell.com> List-Unsubscribe: , List-Post: List-Help: List-Subscribe: , Sender: xen-devel-bounces@lists.xen.org Errors-To: xen-devel-bounces@lists.xen.org To: Jan Beulich , Dario Faggioli Cc: Marcus Granado , Justin Weaver , Ian Campbell , Li Yechen , Andrew Cooper , Juergen Gross , Ian Jackson , Matt Wilson , xen-devel , Keir Fraser , Elena Ufimtseva List-Id: xen-devel@lists.xenproject.org On 11/27/2013 01:11 PM, Jan Beulich wrote: >>>> On 22.11.13 at 19:57, Dario Faggioli wrote: >> + /* >> + * Report back to the caller what the "effective affinity", that >> + * is the intersection of cpupool's pcpus, the (new?) hard >> + * affinity and the (new?) soft-affinity. >> + */ >> + if ( !guest_handle_is_null(op->u.vcpuaffinity.eff_cpumap.bitmap) ) >> { >> - ret = vcpu_set_affinity(v, new_affinity); >> - free_cpumask_var(new_affinity); >> + online = cpupool_online_cpumask(v->domain->cpupool); >> + cpumask_and(new_affinity, online, v->cpu_hard_affinity); >> + if ( op->u.vcpuaffinity.flags & XEN_VCPUAFFINITY_SOFT) >> + cpumask_and(new_affinity, new_affinity, >> + v->cpu_soft_affinity); >> + >> + ret = cpumask_to_xenctl_bitmap( >> + &op->u.vcpuaffinity.eff_cpumap, new_affinity); > So with both flags set, how is the caller supposed to know what > hard affinity is now in effect? I said on the previous version already > that with you _having_ two CPU masks, you should return both. If I recall the timing correctly, I think this series was sent out before you guys had come to that conclusion on the other thread. -George