[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: [Xen-devel] [PATCH v4 10/15] xen: sched: DOMCTL_*vcpuaffinity works with hard and soft affinity
- To: Jan Beulich <JBeulich@xxxxxxxx>, Dario Faggioli <dario.faggioli@xxxxxxxxxx>
- From: George Dunlap <george.dunlap@xxxxxxxxxxxxx>
- Date: Wed, 27 Nov 2013 14:17:40 +0000
- Cc: Marcus Granado <Marcus.Granado@xxxxxxxxxxxxx>, Justin Weaver <jtweaver@xxxxxxxxxx>, Ian Campbell <Ian.Campbell@xxxxxxxxxx>, Li Yechen <lccycc123@xxxxxxxxx>, Andrew Cooper <Andrew.Cooper3@xxxxxxxxxx>, Juergen Gross <juergen.gross@xxxxxxxxxxxxxx>, Ian Jackson <Ian.Jackson@xxxxxxxxxxxxx>, Matt Wilson <msw@xxxxxxxxxx>, xen-devel <xen-devel@xxxxxxxxxxxxxxxxxxxx>, Keir Fraser <keir@xxxxxxx>, Elena Ufimtseva <ufimtseva@xxxxxxxxx>
- Delivery-date: Wed, 27 Nov 2013 14:17:54 +0000
- List-id: Xen developer discussion <xen-devel.lists.xen.org>
On 11/27/2013 01:11 PM, Jan Beulich wrote:
On 22.11.13 at 19:57, Dario Faggioli <dario.faggioli@xxxxxxxxxx> 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
_______________________________________________
Xen-devel mailing list
Xen-devel@xxxxxxxxxxxxx
http://lists.xen.org/xen-devel
|