[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index] Re: [Xen-devel] [PATCH RESEND 05/12] xen: numa-sched: make space for per-vcpu node-affinity
On mar, 2013-11-05 at 15:11 +0000, George Dunlap wrote: > How about, "cpu_node_affinity"? > > Or, we could internally change the names to "cpu_hard_affinity" and > "cpu_soft_affinity", since that's effectively what the scheduler will > do. > And about naming, what about introducing 'cpu_soft_affinity' and sticking to just 'cpu_affinity' for the hard one? That way we could leave XEN_DOMCTL_{set,get}vcpuaffinity alone an introduce XEN_DOMCTL_{set,get}vcpusoftaffinity. It's not super pretty, but it looks better than anything else I can think of. In fact, I can of course rename 'cpu_affinity' to 'cpu_hard_affinity' too, but that would mean having the following: case XEN_DOMCTL_setvcpuaffinity: case XEN_DOMCTL_getvcpuaffinity: ... if ( op->cmd == XEN_DOMCTL_setvcpuaffinity ) xenctl_bitmap_to_cpumask(&new_affinity, &op->u.vcpuaffinity.cpumap); vcpu_set_hard_affinity(v, new_affinity); else cpumask_to_xenctl_bitmap(&op->u.vcpuaffinity.cpumap, v->cpu_hard_affinity); ... case XEN_DOMCTL_setvcpusoftaffinity: case XEN_DOMCTL_getvcpusoftaffinity: ... if ( op->cmd == XEN_DOMCTL_setvcpusoftaffinity ) xenctl_bitmap_to_cpumask(&new_affinity, &op->u.vcpuaffinity.cpumap); vcpu_set_soft_affinity(v, new_affinity); else cpumask_to_xenctl_bitmap(&op->u.vcpuaffinity.cpumap, v->cpu_soft_affinity); ... I.e., *vcpusoftaffinity manipulates cpu_soft_affinity while *vcpuaffinity manipulates cpu_hard_affinity, which looks asymmetrical, in addition to not being pretty. And, of course, the same will also happen at the higher (libxc and libxl) levels. There's of course the option of renaming XEN_DOMCTL_setvcpuaffinity to XEN_DOMCTL_setvcpuhardaffinity (and, while there, put some '_' in it! )... But is that really an option? And even if it is an option for the hypervisor, and perhaps, libxc, I'm quite sure it's not for libxl... Am I wrong? Thanks and Regards, Dario -- <<This happens because I choose it to happen!>> (Raistlin Majere) ----------------------------------------------------------------- Dario Faggioli, Ph.D, http://about.me/dario.faggioli Senior Software Engineer, Citrix Systems R&D Ltd., Cambridge (UK) Attachment:
signature.asc _______________________________________________ Xen-devel mailing list Xen-devel@xxxxxxxxxxxxx http://lists.xen.org/xen-devel
|
Lists.xenproject.org is hosted with RackSpace, monitoring our |