Skip to contentSkip to conversation

xen: let vcpu_create() select processor

PATCH Jan Beulich 2 participants 2 messages Jul 2, 2019

lore
Share & tools
lore
#0 lore raw
Quoted 7 lines
Quoted 1 line
Quoted 1 line · On 28.05.19 at 12:32, <[email protected]> wrote:

Today there are two distinct scenarios for vcpu_create(): either for creation of idle-domain vcpus (vcpuid == processor) or for creation of "normal" domain vcpus (including dom0), where the caller selects the initial processor on a round-robin scheme of the allowed processors (allowed being based on cpupool and affinities).

Quoted 6 lines

Instead of passing the initial processor to vcpu_create() and passing on to sched_init_vcpu() let sched_init_vcpu() do the processor selection. For supporting dom0 vcpu creation use the node_affinity of the domain as a base for selecting the processors. User domains will have initially all nodes set, so this is no different behavior compared to today.

This last aspect is a result of how the tool stack currently works, but as long as there's a separate XEN_DOMCTL_max_vcpus there's no real guarantee that the domain affinity mask hasn't changed already, is there? I don't mind such a dependency, since XEN_DOMCTL_max_vcpus is scheduled to go away anyway, but I think this should be called out explicitly here.

Jan
_______________________________________________
Xen-devel mailing list
[email protected]
https://lists.xenproject.org/mailman/listinfo/xen-devel

#1 lore raw
Quoted 14 lines · Jan Beulich
Quoted 7 lines
Quoted 1 line
Quoted 1 line · On 28.05.19 at 12:32, <[email protected]> wrote:

Today there are two distinct scenarios for vcpu_create(): either for creation of idle-domain vcpus (vcpuid == processor) or for creation of "normal" domain vcpus (including dom0), where the caller selects the initial processor on a round-robin scheme of the allowed processors (allowed being based on cpupool and affinities).

Quoted 6 lines

Instead of passing the initial processor to vcpu_create() and passing on to sched_init_vcpu() let sched_init_vcpu() do the processor selection. For supporting dom0 vcpu creation use the node_affinity of the domain as a base for selecting the processors. User domains will have initially all nodes set, so this is no different behavior compared to today.

Quoted 6 lines

This last aspect is a result of how the tool stack currently works, but as long as there's a separate XEN_DOMCTL_max_vcpus there's no real guarantee that the domain affinity mask hasn't changed already, is there? I don't mind such a dependency, since XEN_DOMCTL_max_vcpus is scheduled to go away anyway, but I think this should be called out explicitly here.

Okay, I'll update the commit message.

Juergen

_______________________________________________
Xen-devel mailing list
[email protected]
https://lists.xenproject.org/mailman/listinfo/xen-devel