xen/sched: move some per-vcpu items to struct sched_unit
Review static void nmi_mce_softirq(void) · line 160
Quoted 9 lines
Quoted 1 line
Quoted 1 line · On 28.05.19 at 12:32, <[email protected]> wrote:
(quoted diff) +2
-2@@ -155,8 +156,8 @@ static void nmi_mce_softirq(void) * Set the tmp value unconditionally, so that the check in the iret * hypercall works. */ - cpumask_copy(st->vcpu->cpu_hard_affinity_tmp, - st->vcpu->cpu_hard_affinity); + cpumask_copy(st->vcpu->sched_unit->cpu_hard_affinity_tmp, + st->vcpu->sched_unit->cpu_hard_affinity);
Aiui this affects all vCPU-s in the unit, which is unlikely to be what we want here: There's now only one cpu_hard_affinity_tmp for all vCPU-s in the unit, yet every vCPU in there may want to make use of the field in parallel.
I also wonder how the code further down in this function fits with the scheduler unit concept. But perhaps that's going to be dealt with by later patches...
Quoted 15 lines
xen/common/domain.c +0
-5@@ -125,11 +125,6 @@ static void vcpu_info_reset(struct vcpu *v)static void vcpu_destroy (struct vcpu *v) { -free_cpumask_var (v->cpu_hard_affinity); -free_cpumask_var (v->cpu_hard_affinity_tmp); -free_cpumask_var (v->cpu_hard_affinity_saved); -free_cpumask_var (v->cpu_soft_affinity); -free_vcpu_struct (v); }
xen/common/domain.c struct vcpu *vcpu_create( · line 160
Quoted 8 lines
xen/common/domain.c +0
-5@@ -153,12 +148,6 @@ struct vcpu *vcpu_create(grant_table_init_vcpu (v); -if ( !zalloc_cpumask_var (&v->cpu_hard_affinity) || - !zalloc_cpumask_var (&v->cpu_hard_affinity_tmp) || - !zalloc_cpumask_var (&v->cpu_hard_affinity_saved) || - !zalloc_cpumask_var (&v->cpu_soft_affinity) ) - goto fail;
Seeing these, I'm actually having trouble understanding how you mean to retain the user visible interface behavior here: If you only store an affinity per sched unit, then how are you meaning to honor the vCPU granular requests coming in?
xen/common/domain.c void domain_update_node_affinity(struct domain *d) · line 552
Quoted 11 lines
xen/common/domain.c +3
-2@@ -557,9 +545,10 @@ void domain_update_node_affinity(struct domain *d)*/ for_each_vcpu ( d, v ) { -cpumask_or (dom_cpumask, dom_cpumask, v->cpu_hard_affinity); +cpumask_or (dom_cpumask, dom_cpumask, + v->sched_unit->cpu_hard_affinity);cpumask_or (dom_cpumask_soft, dom_cpumask_soft, - v->cpu_soft_affinity); + v->sched_unit->cpu_soft_affinity); }
There's not going to be a for_each_sched_unit(), is there? It would mean less iterations here, and less redundant CPU mask operations. Ah, that's the subject of patch 30.
xen/common/domain.c int vcpu_reset(struct vcpu *v) · line 1218
Quoted 6 lines
xen/common/domain.c +1
-1@@ -1226,7 +1215,7 @@ int vcpu_reset(struct vcpu *v) v->async_exception_mask =0 ;memset (v->async_exception_state,0 ,sizeof (v->async_exception_state));#endif -cpumask_clear (v->cpu_hard_affinity_tmp); +cpumask_clear (v->sched_unit->cpu_hard_affinity_tmp);
Same issue as above - you're affecting other vCPU-s here.
xen/common/domctl.c long do_domctl(XEN_GUEST_HANDLE_PARAM(xen_domctl_t) u_domctl) · line 617
Quoted 7 lines
xen/common/domctl.c +1
-0@@ -614,6 +614,7 @@ long do_domctl(XEN_GUEST_HANDLE_PARAM(xen_domctl_t) u_domctl)case XEN_DOMCTL_getvcpuaffinity: {struct vcpu *v; +struct sched_unit *unit;
const?
xen/common/keyhandler.c static void dump_domains(unsigned char key) · line 316
Quoted 10 lines
xen/common/keyhandler.c +2
-2@@ -312,8 +312,8 @@ static void dump_domains(unsigned char key)printk ("dirty_cpu=%u" , v->dirty_cpu);printk ("\n" );printk (" cpu_hard_affinity={%*pbl} cpu_soft_affinity={%*pbl}\n" , - nr_cpu_ids,cpumask_bits (v->cpu_hard_affinity), - nr_cpu_ids,cpumask_bits (v->cpu_soft_affinity)); + nr_cpu_ids,cpumask_bits (v->sched_unit->cpu_hard_affinity), + nr_cpu_ids,cpumask_bits (v->sched_unit->cpu_soft_affinity));
I don't see the value of logging the same information multiple times (for each vCPU in a sched unit). I think you want to split this up.
Quoted 12 lines
xen/common/wait.c +1
-1@@ -132,7 +132,7 @@ static void __prepare_to_wait(struct waitqueue_vcpu *wqv)/* Save current VCPU affinity; force wakeup on *this* CPU only. */ wqv->wakeup_cpu =smp_processor_id (); -cpumask_copy (&wqv->saved_affinity, curr->cpu_hard_affinity); +cpumask_copy (&wqv->saved_affinity, curr->sched_unit->cpu_hard_affinity);if (vcpu_set_hard_affinity (curr,cpumask_of (wqv->wakeup_cpu)) ) {gdprintk (XENLOG_ERR ,"Unable to set vcpu affinity\n" );
xen/common/wait.c void check_wakeup_from_wait(void) · line 205
Quoted 8 lines
xen/common/wait.c +1
-1@@ -199,7 +199,7 @@ void check_wakeup_from_wait(void) {/* Re-set VCPU affinity and re-enter the scheduler. */ struct vcpu *curr = current; -cpumask_copy (&wqv->saved_affinity, curr->cpu_hard_affinity); +cpumask_copy (&wqv->saved_affinity, curr->sched_unit->cpu_hard_affinity);if (vcpu_set_hard_affinity (curr,cpumask_of (wqv->wakeup_cpu)) ) {gdprintk (XENLOG_ERR ,"Unable to set vcpu affinity\n" );
Same problem as above - the consumer of ->saved_affinity will affect vCPU-s other than the subject one.
Quoted 6 lines
xen/include/xen/sched-if.h +0
-0@@ -438,11 +438,11 @@ static inline cpumask_t* cpupool_domain_cpumask(struct domain *d)* * The hard affinity is not a subset of soft affinity * * There is an overlap between the soft and hard affinity masks */
xen/include/xen/sched-if.h static inline cpumask_t* cpupool_domain_cpumask(struct domain *d) · line 446
Quoted 10 lines
xen/include/xen/sched-if.h +4
-4-static inline int has_soft_affinity (const struct vcpu *v) +static inline int has_soft_affinity (const struct sched_unit *unit) { -return v->soft_aff_effective && - !cpumask_subset (cpupool_domain_cpumask (v->domain), - v->cpu_soft_affinity); +return unit->soft_aff_effective && + !cpumask_subset (cpupool_domain_cpumask (unit->vcpu->domain), + unit->cpu_soft_affinity); }
Okay, at the moment there looks to be a 1:1 relationship between sched units and vCPU-s. This would - at this point of the series - invalidate most my earlier comments. However, in patch 57 I don't see how this unit->vcpu mapping would get broken, and I can't seem to identify any other patch where this might be happening. Looking at the github branch I also get the impression that the struct vcpu * pointer out of struct sched_unit survives until the end of the series, which doesn't seem right to me.
In any event, for the purpose here, I think there should be a backlink to struct domain in struct sched_unit right away, and it should get used here.
Quoted 11 lines
xen/include/xen/sched-if.h +7
-0@@ -283,6 +265,22 @@ struct sched_unit {void *priv;/* scheduler private data */ struct sched_unit *next_in_list;struct sched_resource *res; + +/* Last time when unit has been scheduled out. */ +uint64_t last_run_time; + +/* Item needs affinity restored. */ +bool affinity_broken; +/* Does soft affinity actually play a role (given hard affinity)? */
xen/include/xen/sched-if.h struct sched_unit { · line 284
Quoted 10 lines
xen/include/xen/sched-if.h +9
-0+bool soft_aff_effective; +/* Bitmask of CPUs on which this VCPU may run. */ +cpumask_var_t cpu_hard_affinity; +/* Used to change affinity temporarily. */ +cpumask_var_t cpu_hard_affinity_tmp; +/* Used to restore affinity across S3. */ +cpumask_var_t cpu_hard_affinity_saved; +/* Bitmask of CPUs on which this VCPU prefers to run. */ +cpumask_var_t cpu_soft_affinity; };
The mentions of "VCPU" in the comments here also survive till the end of the series, which I also don't think is quite right.
xen/include/xen/sched-if.h static inline bool is_hvm_vcpu(const struct vcpu *v) · line 982
Quoted 7 lines
xen/include/xen/sched-if.h +1
-1@@ -980,7 +978,7 @@ static inline bool is_hvm_vcpu(const struct vcpu *v)static inline bool is_hwdom_pinned_vcpu (const struct vcpu *v) {return (is_hardware_domain (v->domain) && -cpumask_weight (v->cpu_hard_affinity) ==1 ); +cpumask_weight (v->sched_unit->cpu_hard_affinity) ==1 ); }
Seeing this - how is pinning (by command line option or by Dom0 doing this on itself transiently) going to work with core scheduling?
Jan
_______________________________________________
Xen-devel mailing list
[email protected]
https://lists.xenproject.org/mailman/listinfo/xen-devel
Quoted 14 lines · Jan Beulich
Review static void nmi_mce_softirq(void) · line 160
Quoted 9 lines
Quoted 1 line
Quoted 1 line · On 28.05.19 at 12:32, <[email protected]> wrote:
(quoted diff) +2
-2@@ -155,8 +156,8 @@ static void nmi_mce_softirq(void) * Set the tmp value unconditionally, so that the check in the iret * hypercall works. */ - cpumask_copy(st->vcpu->cpu_hard_affinity_tmp, - st->vcpu->cpu_hard_affinity); + cpumask_copy(st->vcpu->sched_unit->cpu_hard_affinity_tmp, + st->vcpu->sched_unit->cpu_hard_affinity);Aiui this affects all vCPU-s in the unit, which is unlikely to be what we want here: There's now only one
cpu_hard_affinity_tmpfor all vCPU-s in the unit, yet every vCPU in there may want to make use of the field in parallel.
Hmm, yes, we'll need a usage bitmask.
Please note that affecting all vcpus in the unit is per design. With multiple vcpus of a unit needing this feature in parallel there is no way they can have different needs regarding temporary affinity.
Quoted 23 lines
I also wonder how the code further down in this function fits with the scheduler unit concept. But perhaps that's going to be dealt with by later patches...
Quoted 18 lines
xen/common/domain.c +0
-5@@ -125,11 +125,6 @@ static void vcpu_info_reset(struct vcpu *v)static void vcpu_destroy (struct vcpu *v) { -free_cpumask_var (v->cpu_hard_affinity); -free_cpumask_var (v->cpu_hard_affinity_tmp); -free_cpumask_var (v->cpu_hard_affinity_saved); -free_cpumask_var (v->cpu_soft_affinity); -free_vcpu_struct (v); }@@ -153,12 +148,6 @@ struct vcpu *vcpu_create(grant_table_init_vcpu (v);
Quoted 10 lines
xen/common/domain.c struct vcpu *vcpu_create( · line 160
Quoted 5 lines
xen/common/domain.c +0
-5-if ( !zalloc_cpumask_var (&v->cpu_hard_affinity) || - !zalloc_cpumask_var (&v->cpu_hard_affinity_tmp) || - !zalloc_cpumask_var (&v->cpu_hard_affinity_saved) || - !zalloc_cpumask_var (&v->cpu_soft_affinity) ) - goto fail;Seeing these, I'm actually having trouble understanding how you mean to retain the user visible interface behavior here: If you only store an affinity per sched unit, then how are you meaning to honor the vCPU granular requests coming in?
With core scheduling it is only possible to set (virtual) core affinities. Whenever an affinity of a vcpu is being set it will set the affinity of the whole unit.
Quoted 16 lines
xen/common/domain.c void domain_update_node_affinity(struct domain *d) · line 552
Quoted 12 lines
xen/common/domain.c +3
-2@@ -557,9 +545,10 @@ void domain_update_node_affinity(struct domain *d)*/ for_each_vcpu ( d, v ) { -cpumask_or (dom_cpumask, dom_cpumask, v->cpu_hard_affinity); +cpumask_or (dom_cpumask, dom_cpumask, + v->sched_unit->cpu_hard_affinity);cpumask_or (dom_cpumask_soft, dom_cpumask_soft, - v->cpu_soft_affinity); + v->sched_unit->cpu_soft_affinity); }There's not going to be a
for_each_sched_unit(), is there? It would mean less iterations here, and less redundant CPU mask operations. Ah, that's the subject of patch 30.
Right.
Quoted 9 lines
xen/common/domain.c int vcpu_reset(struct vcpu *v) · line 1218
Quoted 7 lines
xen/common/domain.c +1
-1@@ -1226,7 +1215,7 @@ int vcpu_reset(struct vcpu *v) v->async_exception_mask =0 ;memset (v->async_exception_state,0 ,sizeof (v->async_exception_state));#endif -cpumask_clear (v->cpu_hard_affinity_tmp); +cpumask_clear (v->sched_unit->cpu_hard_affinity_tmp);Same issue as above - you're affecting other vCPU-s here.
Yes, we'll need a usage bitmask to be tested here.
Quoted 11 lines
xen/common/domctl.c long do_domctl(XEN_GUEST_HANDLE_PARAM(xen_domctl_t) u_domctl) · line 617
Quoted 8 lines
xen/common/domctl.c +1
-0@@ -614,6 +614,7 @@ long do_domctl(XEN_GUEST_HANDLE_PARAM(xen_domctl_t) u_domctl)case XEN_DOMCTL_getvcpuaffinity: {struct vcpu *v; +struct sched_unit *unit;const?
Quoted 13 lines
xen/common/keyhandler.c static void dump_domains(unsigned char key) · line 316
Quoted 10 lines
xen/common/keyhandler.c +2
-2@@ -312,8 +312,8 @@ static void dump_domains(unsigned char key)printk ("dirty_cpu=%u" , v->dirty_cpu);printk ("\n" );printk (" cpu_hard_affinity={%*pbl} cpu_soft_affinity={%*pbl}\n" , - nr_cpu_ids,cpumask_bits (v->cpu_hard_affinity), - nr_cpu_ids,cpumask_bits (v->cpu_soft_affinity)); + nr_cpu_ids,cpumask_bits (v->sched_unit->cpu_hard_affinity), + nr_cpu_ids,cpumask_bits (v->sched_unit->cpu_soft_affinity));I don't see the value of logging the same information multiple times (for each vCPU in a sched unit). I think you want to split this up.
Yes, true.
Quoted 16 lines
Quoted 16 lines
xen/common/wait.c +1
-1@@ -132,7 +132,7 @@ static void __prepare_to_wait(struct waitqueue_vcpu *wqv)/* Save current VCPU affinity; force wakeup on *this* CPU only. */ wqv->wakeup_cpu =smp_processor_id (); -cpumask_copy (&wqv->saved_affinity, curr->cpu_hard_affinity); +cpumask_copy (&wqv->saved_affinity, curr->sched_unit->cpu_hard_affinity);if (vcpu_set_hard_affinity (curr,cpumask_of (wqv->wakeup_cpu)) ) {gdprintk (XENLOG_ERR ,"Unable to set vcpu affinity\n" );@@ -199,7 +199,7 @@ void check_wakeup_from_wait(void) {/* Re-set VCPU affinity and re-enter the scheduler. */ struct vcpu *curr = current;
Quoted 8 lines
xen/common/wait.c void check_wakeup_from_wait(void) · line 205
Quoted 5 lines
xen/common/wait.c +1
-1-cpumask_copy (&wqv->saved_affinity, curr->cpu_hard_affinity); +cpumask_copy (&wqv->saved_affinity, curr->sched_unit->cpu_hard_affinity);if (vcpu_set_hard_affinity (curr,cpumask_of (wqv->wakeup_cpu)) ) {gdprintk (XENLOG_ERR ,"Unable to set vcpu affinity\n" );Same problem as above - the consumer of ->saved_affinity will affect vCPU-s other than the subject one.
Yes.
Quoted 18 lines
Quoted 7 lines
xen/include/xen/sched-if.h +0
-0@@ -438,11 +438,11 @@ static inline cpumask_t* cpupool_domain_cpumask(struct domain *d)* * The hard affinity is not a subset of soft affinity * * There is an overlap between the soft and hard affinity masks */ xen/include/xen/sched-if.h static inline cpumask_t* cpupool_domain_cpumask(struct domain *d) · line 446
Quoted 10 lines
xen/include/xen/sched-if.h +4
-4-static inline int has_soft_affinity (const struct vcpu *v) +static inline int has_soft_affinity (const struct sched_unit *unit) { -return v->soft_aff_effective && - !cpumask_subset (cpupool_domain_cpumask (v->domain), - v->cpu_soft_affinity); +return unit->soft_aff_effective && + !cpumask_subset (cpupool_domain_cpumask (unit->vcpu->domain), + unit->cpu_soft_affinity); }
Quoted 7 lines
Okay, at the moment there looks to be a 1:1 relationship between sched units and vCPU-s. This would - at this point of the series - invalidate most my earlier comments. However, in patch 57 I don't see how this
unit->vcpumapping would get broken, and I can't seem to identify any other patch where this might be happening. Looking at the github branch I also get the impression that the struct vcpu * pointer out of structsched_unitsurvives until the end of the series, which doesn't seem right to me.
It is right. The vcpu pointer in the sched_unit is pointing to the first vcpu of the unit at the end of the series. Further vcpus are found via v->next_in_list.
Quoted 2 lines
In any event, for the purpose here, I think there should be a backlink to struct domain in struct
sched_unitright away, and it should get used here.
See patch 15.
Quoted 17 lines
Quoted 17 lines
xen/include/xen/sched-if.h +12
-0@@ -283,6 +265,22 @@ struct sched_unit {void *priv;/* scheduler private data */ struct sched_unit *next_in_list;struct sched_resource *res; + +/* Last time when unit has been scheduled out. */ +uint64_t last_run_time; + +/* Item needs affinity restored. */ +bool affinity_broken; +/* Does soft affinity actually play a role (given hard affinity)? */ +bool soft_aff_effective; +/* Bitmask of CPUs on which this VCPU may run. */ +cpumask_var_t cpu_hard_affinity; +/* Used to change affinity temporarily. */ +cpumask_var_t cpu_hard_affinity_tmp;
Quoted 8 lines
xen/include/xen/sched-if.h struct sched_unit { · line 284
Quoted 5 lines
xen/include/xen/sched-if.h +4
-0+/* Used to restore affinity across S3. */ +cpumask_var_t cpu_hard_affinity_saved; +/* Bitmask of CPUs on which this VCPU prefers to run. */ +cpumask_var_t cpu_soft_affinity; };The mentions of "VCPU" in the comments here also survive till the end of the series, which I also don't think is quite right.
Will modify.
Quoted 11 lines
xen/include/xen/sched-if.h static inline bool is_hvm_vcpu(const struct vcpu *v) · line 982
Quoted 8 lines
xen/include/xen/sched-if.h +1
-1@@ -980,7 +978,7 @@ static inline bool is_hvm_vcpu(const struct vcpu *v)static inline bool is_hwdom_pinned_vcpu (const struct vcpu *v) {return (is_hardware_domain (v->domain) && -cpumask_weight (v->cpu_hard_affinity) ==1 ); +cpumask_weight (v->sched_unit->cpu_hard_affinity) ==1 ); }Seeing this - how is pinning (by command line option or by Dom0 doing this on itself transiently) going to work with core scheduling?
In the end only the bit of the first vcpu of a unit will be set in the affinity masks, affecting all vcpus of the unit.
Juergen
_______________________________________________
Xen-devel mailing list
[email protected]
https://lists.xenproject.org/mailman/listinfo/xen-devel
Quoted 16 lines · Juergen Gross
Quoted 14 lines · Jan Beulich
Review static void nmi_mce_softirq(void) · line 160
Quoted 9 lines
Quoted 1 line
Quoted 1 line · On 28.05.19 at 12:32, <[email protected]> wrote:
(quoted diff) +2
-2@@ -155,8 +156,8 @@ static void nmi_mce_softirq(void) * Set the tmp value unconditionally, so that the check in the iret * hypercall works. */ - cpumask_copy(st->vcpu->cpu_hard_affinity_tmp, - st->vcpu->cpu_hard_affinity); + cpumask_copy(st->vcpu->sched_unit->cpu_hard_affinity_tmp, + st->vcpu->sched_unit->cpu_hard_affinity);Aiui this affects all vCPU-s in the unit, which is unlikely to be what we want here: There's now only one
cpu_hard_affinity_tmpfor all vCPU-s in the unit, yet every vCPU in there may want to make use of the field in parallel.
Quoted 5 lines
Hmm, yes, we'll need a usage bitmask.
Please note that affecting all vcpus in the unit is per design. With multiple vcpus of a unit needing this feature in parallel there is no way they can have different needs regarding temporary affinity.
But how will this work? I.e. how will all vCPU-s in a unit get their temporary affinity pointing to the one specific pCPU in question? It's not just the "all at the same time" that I don't see working here, I'm also having trouble seeing how the potential cross-core or cross- node movement that's apparently needed here would end up working. I'm not going to exclude that the set of possible pCPU-s a vCPU needs to move to here is still within the unit, but then I'd expect assertions to that effect to be added.
Quoted 25 lines
Quoted 16 lines
Quoted 16 lines
xen/common/domain.c +0
-7@@ -125,11 +125,6 @@ static void vcpu_info_reset(struct vcpu *v) static void vcpu_destroy(struct vcpu *v) { - free_cpumask_var(v->cpu_hard_affinity); - free_cpumask_var(v->cpu_hard_affinity_tmp); - free_cpumask_var(v->cpu_hard_affinity_saved); - free_cpumask_var(v->cpu_soft_affinity); - free_vcpu_struct(v); }@@ -153,12 +148,6 @@ struct vcpu *vcpu_create( grant_table_init_vcpu(v); - if ( !zalloc_cpumask_var(&v->cpu_hard_affinity) || - !zalloc_cpumask_var(&v->cpu_hard_affinity_tmp) ||Quoted 8 lines
xen/common/domain.c struct vcpu *vcpu_create( · line 158
Quoted 3 lines
xen/common/domain.c +0
-3- !zalloc_cpumask_var(&v->cpu_hard_affinity_saved) || - !zalloc_cpumask_var(&v->cpu_soft_affinity) ) - goto fail;Seeing these, I'm actually having trouble understanding how you mean to retain the user visible interface behavior here: If you only store an affinity per sched unit, then how are you meaning to honor the vCPU granular requests coming in?
Quoted 3 lines
With core scheduling it is only possible to set (virtual) core affinities. Whenever an affinity of a vcpu is being set it will set the affinity of the whole unit.
Hmm, that's indeed what I was deducing, but how will we sell this to people actually fiddling with vCPU affinities? I foresee getting bug reports that the respective xl command(s) do(es)n't do anymore what it used to do.
Quoted 25 lines
Quoted 17 lines
Quoted 6 lines
xen/include/xen/sched-if.h +0
-0@@ -438,11 +438,11 @@ static inline cpumask_t* cpupool_domain_cpumask(struct domain *d)* * The hard affinity is not a subset of soft affinity * * There is an overlap between the soft and hard affinity masks */ xen/include/xen/sched-if.h static inline cpumask_t* cpupool_domain_cpumask(struct domain *d) · line 446
Quoted 10 lines
xen/include/xen/sched-if.h +4
-4-static inline int has_soft_affinity (const struct vcpu *v) +static inline int has_soft_affinity (const struct sched_unit *unit) { - return v->soft_aff_effective && - !cpumask_subset(cpupool_domain_cpumask(v->domain), - v->cpu_soft_affinity); + return unit->soft_aff_effective && + !cpumask_subset(cpupool_domain_cpumask(unit->vcpu->domain), + unit->cpu_soft_affinity); }Quoted 7 lines
Okay, at the moment there looks to be a 1:1 relationship between sched units and vCPU-s. This would - at this point of the series - invalidate most my earlier comments. However, in patch 57 I don't see how this
unit->vcpumapping would get broken, and I can't seem to identify any other patch where this might be happening. Looking at the github branch I also get the impression that the struct vcpu * pointer out of structsched_unitsurvives until the end of the series, which doesn't seem right to me.
Quoted 3 lines
It is right. The vcpu pointer in the
sched_unitis pointing to the first vcpu of the unit at the end of the series. Further vcpus are found viav->next_in_list.
I'm afraid this sets us up for misunderstanding and misuse. I don't think there should be a straight struct vcpu * out of struct sched_unit.
Quoted 11 lines
Quoted 10 lines
Quoted 7 lines
xen/include/xen/sched-if.h +0
-0@@ -980,7 +978,7 @@ static inline bool is_hvm_vcpu(const struct vcpu *v) static inline bool is_hwdom_pinned_vcpu(const struct vcpu *v) {return (
is_hardware_domain(v->domain)&&
-cpumask_weight(v->cpu_hard_affinity)== 1); +cpumask_weight(v->sched_unit->cpu_hard_affinity)== 1); }Seeing this - how is pinning (by command line option or by Dom0 doing this on itself transiently) going to work with core scheduling?
Quoted 2 lines
In the end only the bit of the first vcpu of a unit will be set in the affinity masks, affecting all vcpus of the unit.
I'm confused - what "bit of the first vcpu of a unit" are you referring to?
To give an example of what I meant with my earlier reply: How is Dom0 requesting its vCPU 5 to be pinned to pCPU 3 going to be satisfied, independent of the sched unit that vCPU 5 is associated with? Is the whole sched unit getting moved over then? If so, what if another vCPU in the same sched unit at the same time requests to be pinned to pCPU 17, on a different node/socket?
Jan
_______________________________________________
Xen-devel mailing list
[email protected]
https://lists.xenproject.org/mailman/listinfo/xen-devel
Quoted 17 lines · Jan Beulich
Quoted 16 lines · Juergen Gross
Quoted 14 lines · Jan Beulich
Review static void nmi_mce_softirq(void) · line 160
Quoted 9 lines
Quoted 1 line
Quoted 1 line · On 28.05.19 at 12:32, <[email protected]> wrote:
(quoted diff) +2
-2@@ -155,8 +156,8 @@ static void nmi_mce_softirq(void) * Set the tmp value unconditionally, so that the check in the iret * hypercall works. */ - cpumask_copy(st->vcpu->cpu_hard_affinity_tmp, - st->vcpu->cpu_hard_affinity); + cpumask_copy(st->vcpu->sched_unit->cpu_hard_affinity_tmp, + st->vcpu->sched_unit->cpu_hard_affinity);Aiui this affects all vCPU-s in the unit, which is unlikely to be what we want here: There's now only one
cpu_hard_affinity_tmpfor all vCPU-s in the unit, yet every vCPU in there may want to make use of the field in parallel.
Quoted 8 lines
Quoted 5 lines
Hmm, yes, we'll need a usage bitmask.
Please note that affecting all vcpus in the unit is per design. With multiple vcpus of a unit needing this feature in parallel there is no way they can have different needs regarding temporary affinity.
But how will this work? I.e. how will all vCPU-s in a unit get their temporary affinity pointing to the one specific pCPU in question?
The _unit_ is pinned, so all the vcpus in that unit are pinned, too.
Quoted 3 lines
It's not just the "all at the same time" that I don't see working here, I'm also having trouble seeing how the potential cross-core or cross- node movement that's apparently needed here would end up working. I'm
The unit is moved to another core via normal scheduling mechanisms. As switching context is synchronized (see patch 35) all vcpus of a unit are moved together.
Quoted 3 lines
not going to exclude that the set of possible pCPU-s a vCPU needs to move to here is still within the unit, but then I'd expect assertions to that effect to be added.
Okay, will do.
Quoted 26 lines
Quoted 26 lines
Quoted 25 lines
Quoted 14 lines
xen/common/domain.c +0
-5@@ -125,11 +125,6 @@ static void vcpu_info_reset(struct vcpu *v) static void vcpu_destroy(struct vcpu *v) { - free_cpumask_var(v->cpu_hard_affinity); - free_cpumask_var(v->cpu_hard_affinity_tmp); - free_cpumask_var(v->cpu_hard_affinity_saved); - free_cpumask_var(v->cpu_soft_affinity); - free_vcpu_struct(v); }xen/common/domain.c struct vcpu *vcpu_create( · line 158
Quoted 6 lines
xen/common/domain.c +0
-5@@ -153,12 +148,6 @@ struct vcpu *vcpu_create( grant_table_init_vcpu(v); - if ( !zalloc_cpumask_var(&v->cpu_hard_affinity) || - !zalloc_cpumask_var(&v->cpu_hard_affinity_tmp) || - !zalloc_cpumask_var(&v->cpu_hard_affinity_saved) || - !zalloc_cpumask_var(&v->cpu_soft_affinity) ) - goto fail;Seeing these, I'm actually having trouble understanding how you mean to retain the user visible interface behavior here: If you only store an affinity per sched unit, then how are you meaning to honor the vCPU granular requests coming in?
Quoted 8 lines
Quoted 3 lines
With core scheduling it is only possible to set (virtual) core affinities. Whenever an affinity of a vcpu is being set it will set the affinity of the whole unit.
Hmm, that's indeed what I was deducing, but how will we sell this to people actually fiddling with vCPU affinities? I foresee getting bug reports that the respective xl command(s) do(es)n't do anymore what it used to do.
The new behavior must be documented, sure.
Quoted 26 lines
Quoted 26 lines
Quoted 25 lines
Quoted 7 lines
xen/include/xen/sched-if.h +0
-0@@ -438,11 +438,11 @@ static inline cpumask_t* cpupool_domain_cpumask(struct domain *d)* * The hard affinity is not a subset of soft affinity * * There is an overlap between the soft and hard affinity masks */ xen/include/xen/sched-if.h static inline cpumask_t* cpupool_domain_cpumask(struct domain *d) · line 446
Quoted 10 lines
xen/include/xen/sched-if.h +4
-4-static inline int has_soft_affinity (const struct vcpu *v) +static inline int has_soft_affinity (const struct sched_unit *unit) { - return v->soft_aff_effective && - !cpumask_subset(cpupool_domain_cpumask(v->domain), - v->cpu_soft_affinity); + return unit->soft_aff_effective && + !cpumask_subset(cpupool_domain_cpumask(unit->vcpu->domain), + unit->cpu_soft_affinity); }Okay, at the moment there looks to be a 1:1 relationship between sched units and vCPU-s. This would - at this point of the series - invalidate most my earlier comments. However, in patch 57 I don't see how this
unit->vcpumapping would get broken, and I can't seem to identify any other patch where this might be happening. Looking at the github branch I also get the impression that the struct vcpu * pointer out of structsched_unitsurvives until the end of the series, which doesn't seem right to me.
Quoted 6 lines
Quoted 3 lines
It is right. The vcpu pointer in the
sched_unitis pointing to the first vcpu of the unit at the end of the series. Further vcpus are found viav->next_in_list.I'm afraid this sets us up for misunderstanding and misuse. I don't think there should be a straight struct vcpu * out of struct
sched_unit.
That was the most effective way to do it. What are you suggesting?
Quoted 12 lines
Quoted 12 lines
Quoted 11 lines
xen/include/xen/sched-if.h static inline bool is_hvm_vcpu(const struct vcpu *v) · line 982
Quoted 8 lines
xen/include/xen/sched-if.h +1
-1@@ -980,7 +978,7 @@ static inline bool is_hvm_vcpu(const struct vcpu *v) static inline bool is_hwdom_pinned_vcpu(const struct vcpu *v) { return (is_hardware_domain(v->domain) && - cpumask_weight(v->cpu_hard_affinity) == 1); + cpumask_weight(v->sched_unit->cpu_hard_affinity) == 1); }Seeing this - how is pinning (by command line option or by Dom0 doing this on itself transiently) going to work with core scheduling?
Quoted 5 lines
Quoted 2 lines
In the end only the bit of the first vcpu of a unit will be set in the affinity masks, affecting all vcpus of the unit.
I'm confused - what "bit of the first vcpu of a unit" are you referring to?
Sorry, I meant to rewrite this sentence and forgot before sending.
But I think below explanation is making it rather clear.
Quoted 6 lines
To give an example of what I meant with my earlier reply: How is Dom0 requesting its vCPU 5 to be pinned to pCPU 3 going to be satisfied, independent of the sched unit that vCPU 5 is associated with? Is the whole sched unit getting moved over then? If so, what if another vCPU in the same sched unit at the same time requests to be pinned to pCPU 17, on a different node/socket?
Yes, the whole sched unit will be moved.
And in case a unit is already pinned and a conflicting request is made the new request will either override the old pinning (in case that was a "normal" pinning via xl command) or it will be rejected (in case the old pinning was done via SCHEDOP_pin_override).
Juergen
_______________________________________________
Xen-devel mailing list
[email protected]
https://lists.xenproject.org/mailman/listinfo/xen-devel
Quoted 20 lines · Juergen Gross
Quoted 19 lines · Jan Beulich
Quoted 18 lines · Juergen Gross
Quoted 14 lines · Jan Beulich
Review static void nmi_mce_softirq(void) · line 160
Quoted 9 lines
Quoted 1 line
Quoted 1 line · On 28.05.19 at 12:32, <[email protected]> wrote:
(quoted diff) +2
-2@@ -155,8 +156,8 @@ static void nmi_mce_softirq(void) * Set the tmp value unconditionally, so that the check in the iret * hypercall works. */ - cpumask_copy(st->vcpu->cpu_hard_affinity_tmp, - st->vcpu->cpu_hard_affinity); + cpumask_copy(st->vcpu->sched_unit->cpu_hard_affinity_tmp, + st->vcpu->sched_unit->cpu_hard_affinity);Aiui this affects all vCPU-s in the unit, which is unlikely to be what we want here: There's now only one
cpu_hard_affinity_tmpfor all vCPU-s in the unit, yet every vCPU in there may want to make use of the field in parallel.Hmm, yes, we'll need a usage bitmask.
Quoted 8 lines
Quoted 6 lines
Quoted 3 lines
Please note that affecting all vcpus in the unit is per design. With multiple vcpus of a unit needing this feature in parallel there is no way they can have different needs regarding temporary affinity.
But how will this work? I.e. how will all vCPU-s in a unit get their temporary affinity pointing to the one specific pCPU in question?
The _unit_ is pinned, so all the vcpus in that unit are pinned, too.
Yes, but ...
Quoted 7 lines
Quoted 3 lines
It's not just the "all at the same time" that I don't see working here, I'm also having trouble seeing how the potential cross-core or cross- node movement that's apparently needed here would end up working. I'm
The unit is moved to another core via normal scheduling mechanisms. As switching context is synchronized (see patch 35) all vcpus of a unit are moved together.
... they may get pinned to different pCPU-s or all the same pCPU here. Both cases need to work, and I'm currently not seeing how that would be achieved.
Quoted 29 lines
Quoted 29 lines
Quoted 28 lines
Quoted 16 lines
Quoted 16 lines
xen/common/domain.c +0
-7@@ -125,11 +125,6 @@ static void vcpu_info_reset(struct vcpu *v) static void vcpu_destroy(struct vcpu *v) { - free_cpumask_var(v->cpu_hard_affinity); - free_cpumask_var(v->cpu_hard_affinity_tmp); - free_cpumask_var(v->cpu_hard_affinity_saved); - free_cpumask_var(v->cpu_soft_affinity); - free_vcpu_struct(v); }@@ -153,12 +148,6 @@ struct vcpu *vcpu_create( grant_table_init_vcpu(v); - if ( !zalloc_cpumask_var(&v->cpu_hard_affinity) || - !zalloc_cpumask_var(&v->cpu_hard_affinity_tmp) ||Quoted 8 lines
xen/common/domain.c struct vcpu *vcpu_create( · line 158
Quoted 3 lines
xen/common/domain.c +0
-3- !zalloc_cpumask_var(&v->cpu_hard_affinity_saved) || - !zalloc_cpumask_var(&v->cpu_soft_affinity) ) - goto fail;Seeing these, I'm actually having trouble understanding how you mean to retain the user visible interface behavior here: If you only store an affinity per sched unit, then how are you meaning to honor the vCPU granular requests coming in?
With core scheduling it is only possible to set (virtual) core affinities. Whenever an affinity of a vcpu is being set it will set the affinity of the whole unit.
Quoted 6 lines
Quoted 4 lines
Hmm, that's indeed what I was deducing, but how will we sell this to people actually fiddling with vCPU affinities? I foresee getting bug reports that the respective xl command(s) do(es)n't do anymore what it used to do.
The new behavior must be documented, sure.
Documentation is just one aspect. Often enough people only read docs when wanting to introduce new functionality, which I consider a fair model. Such people will be caught by surprise that the pinning behavior does not work the same way anymore.
And again - if someone pins every vCPU to a single pCPU, that last such pinning operation will be what takes long term effect. Aiui all vCPU-s in the unit will then be pinned to that one pCPU, i.e. they'll either all compete for the one pCPU's time, or only one of them will ever get scheduled.
Quoted 25 lines
Quoted 25 lines
Quoted 25 lines
Quoted 24 lines
Quoted 6 lines
xen/include/xen/sched-if.h +0
-0@@ -438,11 +438,11 @@ static inline cpumask_t* cpupool_domain_cpumask(struct domain *d)* * The hard affinity is not a subset of soft affinity * * There is an overlap between the soft and hard affinity masks */ xen/include/xen/sched-if.h static inline cpumask_t* cpupool_domain_cpumask(struct domain *d) · line 446
Quoted 10 lines
xen/include/xen/sched-if.h +4
-4-static inline int has_soft_affinity (const struct vcpu *v) +static inline int has_soft_affinity (const struct sched_unit *unit) { - return v->soft_aff_effective && - !cpumask_subset(cpupool_domain_cpumask(v->domain), - v->cpu_soft_affinity); + return unit->soft_aff_effective && + !cpumask_subset(cpupool_domain_cpumask(unit->vcpu->domain), + unit->cpu_soft_affinity); }Okay, at the moment there looks to be a 1:1 relationship between sched units and vCPU-s. This would - at this point of the series - invalidate most my earlier comments. However, in patch 57 I don't see how this
unit->vcpumapping would get broken, and I can't seem to identify any other patch where this might be happening. Looking at the github branch I also get the impression that the struct vcpu * pointer out of structsched_unitsurvives until the end of the series, which doesn't seem right to me.
Quoted 8 lines
Quoted 6 lines
Quoted 3 lines
It is right. The vcpu pointer in the
sched_unitis pointing to the first vcpu of the unit at the end of the series. Further vcpus are found viav->next_in_list.I'm afraid this sets us up for misunderstanding and misuse. I don't think there should be a straight struct vcpu * out of struct
sched_unit.That was the most effective way to do it. What are you suggesting?
An actual list, i.e. with a struct list_head. That'll make obvious that more than one vCPU might be associated with a unit. That's even more so that the ability to associate more than one appears only quite late in the series, i.e. there may be further instances like the code above, and it would require a careful audit (rather than the compiler finding such instance) to determine all places where using the first vCPU in a unit isn't really what was meant.
Once the list approach was enforced, in a second step we might then discuss whether the list management is too much overhead, and hence whether perhaps to switch to the simpler model you're using right now.
Jan
_______________________________________________
Xen-devel mailing list
[email protected]
https://lists.xenproject.org/mailman/listinfo/xen-devel
Quoted 85 lines · Jan Beulich
Quoted 20 lines · Juergen Gross
Quoted 19 lines · Jan Beulich
Quoted 18 lines · Juergen Gross
Quoted 14 lines · Jan Beulich
Review static void nmi_mce_softirq(void) · line 160
Quoted 9 lines
Quoted 1 line
Quoted 1 line · On 28.05.19 at 12:32, <[email protected]> wrote:
(quoted diff) +2
-2@@ -155,8 +156,8 @@ static void nmi_mce_softirq(void) * Set the tmp value unconditionally, so that the check in the iret * hypercall works. */ - cpumask_copy(st->vcpu->cpu_hard_affinity_tmp, - st->vcpu->cpu_hard_affinity); + cpumask_copy(st->vcpu->sched_unit->cpu_hard_affinity_tmp, + st->vcpu->sched_unit->cpu_hard_affinity);Aiui this affects all vCPU-s in the unit, which is unlikely to be what we want here: There's now only one
cpu_hard_affinity_tmpfor all vCPU-s in the unit, yet every vCPU in there may want to make use of the field in parallel.Hmm, yes, we'll need a usage bitmask.
Quoted 8 lines
Quoted 6 lines
Quoted 3 lines
Please note that affecting all vcpus in the unit is per design. With multiple vcpus of a unit needing this feature in parallel there is no way they can have different needs regarding temporary affinity.
But how will this work? I.e. how will all vCPU-s in a unit get their temporary affinity pointing to the one specific pCPU in question?
The _unit_ is pinned, so all the vcpus in that unit are pinned, too.
Yes, but ...
Quoted 7 lines
Quoted 3 lines
It's not just the "all at the same time" that I don't see working here, I'm also having trouble seeing how the potential cross-core or cross- node movement that's apparently needed here would end up working. I'm
The unit is moved to another core via normal scheduling mechanisms. As switching context is synchronized (see patch 35) all vcpus of a unit are moved together.
... they may get pinned to different pCPU-s or all the same pCPU here. Both cases need to work, and I'm currently not seeing how that would be achieved.
Quoted 29 lines
Quoted 29 lines
Quoted 28 lines
Quoted 16 lines
Quoted 16 lines
xen/common/domain.c +0
-7@@ -125,11 +125,6 @@ static void vcpu_info_reset(struct vcpu *v) static void vcpu_destroy(struct vcpu *v) { - free_cpumask_var(v->cpu_hard_affinity); - free_cpumask_var(v->cpu_hard_affinity_tmp); - free_cpumask_var(v->cpu_hard_affinity_saved); - free_cpumask_var(v->cpu_soft_affinity); - free_vcpu_struct(v); }@@ -153,12 +148,6 @@ struct vcpu *vcpu_create( grant_table_init_vcpu(v); - if ( !zalloc_cpumask_var(&v->cpu_hard_affinity) || - !zalloc_cpumask_var(&v->cpu_hard_affinity_tmp) ||Quoted 8 lines
xen/common/domain.c struct vcpu *vcpu_create( · line 158
Quoted 3 lines
xen/common/domain.c +0
-3- !zalloc_cpumask_var(&v->cpu_hard_affinity_saved) || - !zalloc_cpumask_var(&v->cpu_soft_affinity) ) - goto fail;Seeing these, I'm actually having trouble understanding how you mean to retain the user visible interface behavior here: If you only store an affinity per sched unit, then how are you meaning to honor the vCPU granular requests coming in?
With core scheduling it is only possible to set (virtual) core affinities. Whenever an affinity of a vcpu is being set it will set the affinity of the whole unit.
Quoted 6 lines
Quoted 4 lines
Hmm, that's indeed what I was deducing, but how will we sell this to people actually fiddling with vCPU affinities? I foresee getting bug reports that the respective xl command(s) do(es)n't do anymore what it used to do.
The new behavior must be documented, sure.
Documentation is just one aspect. Often enough people only read docs when wanting to introduce new functionality, which I consider a fair model. Such people will be caught by surprise that the pinning behavior does not work the same way anymore.
Quoted 5 lines
And again - if someone pins every vCPU to a single pCPU, that last such pinning operation will be what takes long term effect. Aiui all vCPU-s in the unit will then be pinned to that one pCPU, i.e. they'll either all compete for the one pCPU's time, or only one of them will ever get scheduled.
No, that's not how it works. Lets say we have a system with the following topology and core scheduling active:
cpu0: core 0, thread 0
cpu1: core 0, thread 1
cpu2: core 1, thread 0
cpu3: core 1, thread 1
Then any even numbered vcpu will only ever be scheduled on cpu0 or cpu2, while any odd numbered vcpu will only run on cpu1 or cpu3.
So virtual cores get scheduled on physical cores. Virtual thread 0 will only run on physical thread 0 and the associated virtual thread 1 will run on the associated physical thread 1 of the same physical core.
Pinning a virtual thread 1 to a physical thread 0 is not possible (in reality only the virtual core is being pinned to the physical core).
Juergen
Quoted 35 lines
Quoted 26 lines
Quoted 26 lines
Quoted 26 lines
Quoted 25 lines
Quoted 7 lines
xen/include/xen/sched-if.h +0
-0@@ -438,11 +438,11 @@ static inline cpumask_t* cpupool_domain_cpumask(struct domain *d)* * The hard affinity is not a subset of soft affinity * * There is an overlap between the soft and hard affinity masks */ xen/include/xen/sched-if.h static inline cpumask_t* cpupool_domain_cpumask(struct domain *d) · line 446
Quoted 10 lines
xen/include/xen/sched-if.h +4
-4-static inline int has_soft_affinity (const struct vcpu *v) +static inline int has_soft_affinity (const struct sched_unit *unit) { - return v->soft_aff_effective && - !cpumask_subset(cpupool_domain_cpumask(v->domain), - v->cpu_soft_affinity); + return unit->soft_aff_effective && + !cpumask_subset(cpupool_domain_cpumask(unit->vcpu->domain), + unit->cpu_soft_affinity); }Okay, at the moment there looks to be a 1:1 relationship between sched units and vCPU-s. This would - at this point of the series - invalidate most my earlier comments. However, in patch 57 I don't see how this
unit->vcpumapping would get broken, and I can't seem to identify any other patch where this might be happening. Looking at the github branch I also get the impression that the struct vcpu * pointer out of structsched_unitsurvives until the end of the series, which doesn't seem right to me.Quoted 8 lines
Quoted 6 lines
Quoted 3 lines
It is right. The vcpu pointer in the
sched_unitis pointing to the first vcpu of the unit at the end of the series. Further vcpus are found viav->next_in_list.I'm afraid this sets us up for misunderstanding and misuse. I don't think there should be a straight struct vcpu * out of struct
sched_unit.That was the most effective way to do it. What are you suggesting?
Quoted 7 lines
An actual list, i.e. with a struct
list_head. That'll make obvious that more than one vCPU might be associated with a unit. That's even more so that the ability to associate more than one appears only quite late in the series, i.e. there may be further instances like the code above, and it would require a careful audit (rather than the compiler finding such instance) to determine all places where using the first vCPU in a unit isn't really what was meant.
TBH I don't see how this would help at all.
Instead of using the vcpu pointer I'd had to use the list head instead. Why is that different to a plain pointer regarding finding the places where using the first vcpu was wrong?
Juergen
_______________________________________________
Xen-devel mailing list
[email protected]
https://lists.xenproject.org/mailman/listinfo/xen-devel
Quoted 18 lines · Juergen Gross
Quoted 5 lines · Jan Beulich
And again - if someone pins every vCPU to a single pCPU, that last such pinning operation will be what takes long term effect. Aiui all vCPU-s in the unit will then be pinned to that one pCPU, i.e. they'll either all compete for the one pCPU's time, or only one of them will ever get scheduled.
No, that's not how it works. Lets say we have a system with the following topology and core scheduling active:
cpu0: core 0, thread 0
cpu1: core 0, thread 1
cpu2: core 1, thread 0
cpu3: core 1, thread 1Then any even numbered vcpu will only ever be scheduled on cpu0 or cpu2, while any odd numbered vcpu will only run on cpu1 or cpu3.
Quoted 6 lines
So virtual cores get scheduled on physical cores. Virtual thread 0 will only run on physical thread 0 and the associated virtual thread 1 will run on the associated physical thread 1 of the same physical core.
Pinning a virtual thread 1 to a physical thread 0 is not possible (in reality only the virtual core is being pinned to the physical core).
But that's what existing guests may be doing. You may want to take a look at our old, non-pvops kernels, in particular the functionality provided by their drivers/xen/core/domctl.c. Yes, {sys,dom}ctl-s aren't supposed to be used by the kernel, but to achieve the intended effects I saw no way around (ab)using them. (I mean this to be taken as an example only - I realize that the code there wouldn't work on modern Xen without updating, due to the sysctl/domctl interface version that needs setting.)
Quoted 42 lines
Quoted 34 lines
Quoted 25 lines
Quoted 25 lines
Quoted 25 lines
Quoted 24 lines
Quoted 6 lines
xen/include/xen/sched-if.h +0
-0@@ -438,11 +438,11 @@ static inline cpumask_t* cpupool_domain_cpumask(struct domain *d)* * The hard affinity is not a subset of soft affinity * * There is an overlap between the soft and hard affinity masks */ xen/include/xen/sched-if.h static inline cpumask_t* cpupool_domain_cpumask(struct domain *d) · line 446
Quoted 10 lines
xen/include/xen/sched-if.h +4
-4-static inline int has_soft_affinity (const struct vcpu *v) +static inline int has_soft_affinity (const struct sched_unit *unit) { - return v->soft_aff_effective && - !cpumask_subset(cpupool_domain_cpumask(v->domain), - v->cpu_soft_affinity); + return unit->soft_aff_effective && + !cpumask_subset(cpupool_domain_cpumask(unit->vcpu->domain), + unit->cpu_soft_affinity); }Okay, at the moment there looks to be a 1:1 relationship between sched units and vCPU-s. This would - at this point of the series - invalidate most my earlier comments. However, in patch 57 I don't see how this
unit->vcpumapping would get broken, and I can't seem to identify any other patch where this might be happening. Looking at the github branch I also get the impression that the struct vcpu * pointer out of structsched_unitsurvives until the end of the series, which doesn't seem right to me.Quoted 8 lines
Quoted 6 lines
Quoted 3 lines
It is right. The vcpu pointer in the
sched_unitis pointing to the first vcpu of the unit at the end of the series. Further vcpus are found viav->next_in_list.I'm afraid this sets us up for misunderstanding and misuse. I don't think there should be a straight struct vcpu * out of struct
sched_unit.That was the most effective way to do it. What are you suggesting?
Quoted 7 lines
An actual list, i.e. with a struct
list_head. That'll make obvious that more than one vCPU might be associated with a unit. That's even more so that the ability to associate more than one appears only quite late in the series, i.e. there may be further instances like the code above, and it would require a careful audit (rather than the compiler finding such instance) to determine all places where using the first vCPU in a unit isn't really what was meant.
Quoted 5 lines
TBH I don't see how this would help at all.
Instead of using the vcpu pointer I'd had to use the list head instead. Why is that different to a plain pointer regarding finding the places where using the first vcpu was wrong?
Take the example above: Is it correct to act on just the first vCPU? I guess _here_ it is, but the same pattern could be found elsewhere. If, from the beginning, you use a clearly identifiable list construct, then it'll be obvious to you as the writer and to reviewers that by the end of the series there may be multiple entities that need dealing with - we'd see list_first*() or for_each*() constructs right away (and you wouldn't be able to circumvent their use in a way that wouldn't trigger "don't open-code" comments).
Jan
_______________________________________________
Xen-devel mailing list
[email protected]
https://lists.xenproject.org/mailman/listinfo/xen-devel
Quoted 26 lines · Jan Beulich
Quoted 18 lines · Juergen Gross
Quoted 5 lines · Jan Beulich
And again - if someone pins every vCPU to a single pCPU, that last such pinning operation will be what takes long term effect. Aiui all vCPU-s in the unit will then be pinned to that one pCPU, i.e. they'll either all compete for the one pCPU's time, or only one of them will ever get scheduled.
No, that's not how it works. Lets say we have a system with the following topology and core scheduling active:
cpu0: core 0, thread 0
cpu1: core 0, thread 1
cpu2: core 1, thread 0
cpu3: core 1, thread 1Then any even numbered vcpu will only ever be scheduled on cpu0 or cpu2, while any odd numbered vcpu will only run on cpu1 or cpu3.
Quoted 6 lines
So virtual cores get scheduled on physical cores. Virtual thread 0 will only run on physical thread 0 and the associated virtual thread 1 will run on the associated physical thread 1 of the same physical core.
Pinning a virtual thread 1 to a physical thread 0 is not possible (in reality only the virtual core is being pinned to the physical core).
Quoted 8 lines
But that's what existing guests may be doing. You may want to take a look at our old, non-pvops kernels, in particular the functionality provided by their
drivers/xen/core/domctl.c. Yes, {sys,dom}ctl-s aren't supposed to be used by the kernel, but to achieve the intended effects I saw no way around (ab)using them. (I mean this to be taken as an example only - I realize that the code there wouldn't work on modern Xen without updating, due to the sysctl/domctl interface version that needs setting.)
First - speaking of "guests" is a little bit misleading here. This is restricted to dom0.
So when you want to use such a dom0 kernel with Xen 4.13 or later you'd need to stay with cpu scheduling. Any recent kernel will run just fine as dom0 with core scheduling active.
Quoted 49 lines
Quoted 43 lines
Quoted 35 lines
Quoted 26 lines
Quoted 26 lines
Quoted 26 lines
Quoted 25 lines
Quoted 7 lines
xen/include/xen/sched-if.h +0
-0@@ -438,11 +438,11 @@ static inline cpumask_t* cpupool_domain_cpumask(struct domain *d)* * The hard affinity is not a subset of soft affinity * * There is an overlap between the soft and hard affinity masks */ xen/include/xen/sched-if.h static inline cpumask_t* cpupool_domain_cpumask(struct domain *d) · line 446
Quoted 10 lines
xen/include/xen/sched-if.h +4
-4-static inline int has_soft_affinity (const struct vcpu *v) +static inline int has_soft_affinity (const struct sched_unit *unit) { - return v->soft_aff_effective && - !cpumask_subset(cpupool_domain_cpumask(v->domain), - v->cpu_soft_affinity); + return unit->soft_aff_effective && + !cpumask_subset(cpupool_domain_cpumask(unit->vcpu->domain), + unit->cpu_soft_affinity); }Okay, at the moment there looks to be a 1:1 relationship between sched units and vCPU-s. This would - at this point of the series - invalidate most my earlier comments. However, in patch 57 I don't see how this
unit->vcpumapping would get broken, and I can't seem to identify any other patch where this might be happening. Looking at the github branch I also get the impression that the struct vcpu * pointer out of structsched_unitsurvives until the end of the series, which doesn't seem right to me.Quoted 8 lines
Quoted 6 lines
Quoted 3 lines
It is right. The vcpu pointer in the
sched_unitis pointing to the first vcpu of the unit at the end of the series. Further vcpus are found viav->next_in_list.I'm afraid this sets us up for misunderstanding and misuse. I don't think there should be a straight struct vcpu * out of struct
sched_unit.That was the most effective way to do it. What are you suggesting?
Quoted 7 lines
An actual list, i.e. with a struct
list_head. That'll make obvious that more than one vCPU might be associated with a unit. That's even more so that the ability to associate more than one appears only quite late in the series, i.e. there may be further instances like the code above, and it would require a careful audit (rather than the compiler finding such instance) to determine all places where using the first vCPU in a unit isn't really what was meant.Quoted 5 lines
TBH I don't see how this would help at all.
Instead of using the vcpu pointer I'd had to use the list head instead. Why is that different to a plain pointer regarding finding the places where using the first vcpu was wrong?
Quoted 8 lines
Take the example above: Is it correct to act on just the first vCPU? I guess _here_ it is, but the same pattern could be found elsewhere. If, from the beginning, you use a clearly identifiable list construct, then it'll be obvious to you as the writer and to reviewers that by the end of the series there may be multiple entities that need dealing with - we'd see list_first*() or for_each*() constructs right away (and you wouldn't be able to circumvent their use in a way that wouldn't trigger "don't open-code" comments).
Would you be fine with just renaming the pointer to "vcpu_list"? This would avoid the need to introduce another vcpu list in struct vcpu and I could re-use the already existing list as today.
It should be noted that I named the pointer just "vcpu" in order to avoid lots of reformatting due to longer lines, though.
Juergen
_______________________________________________
Xen-devel mailing list
[email protected]
https://lists.xenproject.org/mailman/listinfo/xen-devel
Quoted 36 lines · Juergen Gross
Quoted 26 lines · Jan Beulich
Quoted 18 lines · Juergen Gross
Quoted 5 lines · Jan Beulich
And again - if someone pins every vCPU to a single pCPU, that last such pinning operation will be what takes long term effect. Aiui all vCPU-s in the unit will then be pinned to that one pCPU, i.e. they'll either all compete for the one pCPU's time, or only one of them will ever get scheduled.
No, that's not how it works. Lets say we have a system with the following topology and core scheduling active:
cpu0: core 0, thread 0
cpu1: core 0, thread 1
cpu2: core 1, thread 0
cpu3: core 1, thread 1Then any even numbered vcpu will only ever be scheduled on cpu0 or cpu2, while any odd numbered vcpu will only run on cpu1 or cpu3.
Quoted 6 lines
So virtual cores get scheduled on physical cores. Virtual thread 0 will only run on physical thread 0 and the associated virtual thread 1 will run on the associated physical thread 1 of the same physical core.
Pinning a virtual thread 1 to a physical thread 0 is not possible (in reality only the virtual core is being pinned to the physical core).
Quoted 8 lines
But that's what existing guests may be doing. You may want to take a look at our old, non-pvops kernels, in particular the functionality provided by their
drivers/xen/core/domctl.c. Yes, {sys,dom}ctl-s aren't supposed to be used by the kernel, but to achieve the intended effects I saw no way around (ab)using them. (I mean this to be taken as an example only - I realize that the code there wouldn't work on modern Xen without updating, due to the sysctl/domctl interface version that needs setting.)
Quoted 6 lines
First - speaking of "guests" is a little bit misleading here. This is restricted to dom0.
So when you want to use such a dom0 kernel with Xen 4.13 or later you'd need to stay with cpu scheduling. Any recent kernel will run just fine as dom0 with core scheduling active.
Right, but such recent kernels have (afaict) no solution to some of the problems that the (ab)use of the {sys,dom}ctl-s were meant to address.
Quoted 57 lines
Quoted 48 lines
Quoted 42 lines
Quoted 34 lines
Quoted 25 lines
Quoted 25 lines
Quoted 25 lines
Quoted 24 lines
Quoted 6 lines
xen/include/xen/sched-if.h +0
-0@@ -438,11 +438,11 @@ static inline cpumask_t* cpupool_domain_cpumask(struct domain *d)* * The hard affinity is not a subset of soft affinity * * There is an overlap between the soft and hard affinity masks */ xen/include/xen/sched-if.h static inline cpumask_t* cpupool_domain_cpumask(struct domain *d) · line 446
Quoted 10 lines
xen/include/xen/sched-if.h +4
-4-static inline int has_soft_affinity (const struct vcpu *v) +static inline int has_soft_affinity (const struct sched_unit *unit) { - return v->soft_aff_effective && - !cpumask_subset(cpupool_domain_cpumask(v->domain), - v->cpu_soft_affinity); + return unit->soft_aff_effective && + !cpumask_subset(cpupool_domain_cpumask(unit->vcpu->domain), + unit->cpu_soft_affinity); }Okay, at the moment there looks to be a 1:1 relationship between sched units and vCPU-s. This would - at this point of the series - invalidate most my earlier comments. However, in patch 57 I don't see how this
unit->vcpumapping would get broken, and I can't seem to identify any other patch where this might be happening. Looking at the github branch I also get the impression that the struct vcpu * pointer out of structsched_unitsurvives until the end of the series, which doesn't seem right to me.Quoted 8 lines
Quoted 6 lines
Quoted 3 lines
It is right. The vcpu pointer in the
sched_unitis pointing to the first vcpu of the unit at the end of the series. Further vcpus are found viav->next_in_list.I'm afraid this sets us up for misunderstanding and misuse. I don't think there should be a straight struct vcpu * out of struct
sched_unit.That was the most effective way to do it. What are you suggesting?
Quoted 7 lines
An actual list, i.e. with a struct
list_head. That'll make obvious that more than one vCPU might be associated with a unit. That's even more so that the ability to associate more than one appears only quite late in the series, i.e. there may be further instances like the code above, and it would require a careful audit (rather than the compiler finding such instance) to determine all places where using the first vCPU in a unit isn't really what was meant.Quoted 5 lines
TBH I don't see how this would help at all.
Instead of using the vcpu pointer I'd had to use the list head instead. Why is that different to a plain pointer regarding finding the places where using the first vcpu was wrong?
Quoted 8 lines
Take the example above: Is it correct to act on just the first vCPU? I guess _here_ it is, but the same pattern could be found elsewhere. If, from the beginning, you use a clearly identifiable list construct, then it'll be obvious to you as the writer and to reviewers that by the end of the series there may be multiple entities that need dealing with - we'd see list_first*() or for_each*() constructs right away (and you wouldn't be able to circumvent their use in a way that wouldn't trigger "don't open-code" comments).
Quoted 3 lines
Would you be fine with just renaming the pointer to "
vcpu_list"? This would avoid the need to introduce another vcpu list in struct vcpu and I could re-use the already existing list as today.
Well, yes, this would at least make obvious at use sites that there may be more than one of them.
Quoted 2 lines
It should be noted that I named the pointer just "vcpu" in order to avoid lots of reformatting due to longer lines, though.
I can appreciate this aspect, but as said I'm afraid it would be misleading (and potentially inviting for mis-use).
Jan
_______________________________________________
Xen-devel mailing list
[email protected]
https://lists.xenproject.org/mailman/listinfo/xen-devel
Quoted 40 lines · Jan Beulich
Quoted 39 lines · Juergen Gross
Quoted 26 lines · Jan Beulich
Quoted 18 lines · Juergen Gross
Quoted 5 lines · Jan Beulich
And again - if someone pins every vCPU to a single pCPU, that last such pinning operation will be what takes long term effect. Aiui all vCPU-s in the unit will then be pinned to that one pCPU, i.e. they'll either all compete for the one pCPU's time, or only one of them will ever get scheduled.
No, that's not how it works. Lets say we have a system with the following topology and core scheduling active:
cpu0: core 0, thread 0
cpu1: core 0, thread 1
cpu2: core 1, thread 0
cpu3: core 1, thread 1Then any even numbered vcpu will only ever be scheduled on cpu0 or cpu2, while any odd numbered vcpu will only run on cpu1 or cpu3.
Quoted 6 lines
So virtual cores get scheduled on physical cores. Virtual thread 0 will only run on physical thread 0 and the associated virtual thread 1 will run on the associated physical thread 1 of the same physical core.
Pinning a virtual thread 1 to a physical thread 0 is not possible (in reality only the virtual core is being pinned to the physical core).
Quoted 8 lines
But that's what existing guests may be doing. You may want to take a look at our old, non-pvops kernels, in particular the functionality provided by their
drivers/xen/core/domctl.c. Yes, {sys,dom}ctl-s aren't supposed to be used by the kernel, but to achieve the intended effects I saw no way around (ab)using them. (I mean this to be taken as an example only - I realize that the code there wouldn't work on modern Xen without updating, due to the sysctl/domctl interface version that needs setting.)First - speaking of "guests" is a little bit misleading here. This is restricted to dom0.
Quoted 7 lines
Quoted 3 lines
So when you want to use such a dom0 kernel with Xen 4.13 or later you'd need to stay with cpu scheduling. Any recent kernel will run just fine as dom0 with core scheduling active.
Right, but such recent kernels have (afaict) no solution to some of the problems that the (ab)use of the {sys,dom}ctl-s were meant to address.
With SCHEDOP_pin_override this should all be doable. The kernel would need to execute the SCHEDOP_pin_override code on a suitable vcpu (ideally with vcpu-id == pcpu-id).
I'd prefer new hypervisor interfaces for that purpose, though.
Quoted 58 lines
Quoted 58 lines
Quoted 57 lines
Quoted 43 lines
Quoted 35 lines
Quoted 26 lines
Quoted 26 lines
Quoted 26 lines
Quoted 25 lines
Quoted 7 lines
xen/include/xen/sched-if.h +0
-0@@ -438,11 +438,11 @@ static inline cpumask_t* cpupool_domain_cpumask(struct domain *d)* * The hard affinity is not a subset of soft affinity * * There is an overlap between the soft and hard affinity masks */ xen/include/xen/sched-if.h static inline cpumask_t* cpupool_domain_cpumask(struct domain *d) · line 446
Quoted 10 lines
xen/include/xen/sched-if.h +4
-4-static inline int has_soft_affinity (const struct vcpu *v) +static inline int has_soft_affinity (const struct sched_unit *unit) { - return v->soft_aff_effective && - !cpumask_subset(cpupool_domain_cpumask(v->domain), - v->cpu_soft_affinity); + return unit->soft_aff_effective && + !cpumask_subset(cpupool_domain_cpumask(unit->vcpu->domain), + unit->cpu_soft_affinity); }Okay, at the moment there looks to be a 1:1 relationship between sched units and vCPU-s. This would - at this point of the series - invalidate most my earlier comments. However, in patch 57 I don't see how this
unit->vcpumapping would get broken, and I can't seem to identify any other patch where this might be happening. Looking at the github branch I also get the impression that the struct vcpu * pointer out of structsched_unitsurvives until the end of the series, which doesn't seem right to me.Quoted 8 lines
Quoted 6 lines
Quoted 3 lines
It is right. The vcpu pointer in the
sched_unitis pointing to the first vcpu of the unit at the end of the series. Further vcpus are found viav->next_in_list.I'm afraid this sets us up for misunderstanding and misuse. I don't think there should be a straight struct vcpu * out of struct
sched_unit.That was the most effective way to do it. What are you suggesting?
Quoted 7 lines
An actual list, i.e. with a struct
list_head. That'll make obvious that more than one vCPU might be associated with a unit. That's even more so that the ability to associate more than one appears only quite late in the series, i.e. there may be further instances like the code above, and it would require a careful audit (rather than the compiler finding such instance) to determine all places where using the first vCPU in a unit isn't really what was meant.Quoted 5 lines
TBH I don't see how this would help at all.
Instead of using the vcpu pointer I'd had to use the list head instead. Why is that different to a plain pointer regarding finding the places where using the first vcpu was wrong?
Take the example above: Is it correct to act on just the first vCPU? I guess _here_ it is, but the same pattern could be found elsewhere. If, from the beginning, you use a clearly identifiable list construct, then it'll be obvious to you as the writer and to reviewers that by the end of the series there may be multiple entities that need dealing with - we'd see list_first*() or for_each*() constructs right away (and you wouldn't be able to circumvent their use in a way that wouldn't trigger "don't open-code" comments).
Quoted 6 lines
Quoted 3 lines
Would you be fine with just renaming the pointer to "
vcpu_list"? This would avoid the need to introduce another vcpu list in struct vcpu and I could re-use the already existing list as today.Well, yes, this would at least make obvious at use sites that there may be more than one of them.
Thanks.
Quoted 6 lines
Quoted 3 lines
It should be noted that I named the pointer just "vcpu" in order to avoid lots of reformatting due to longer lines, though.
I can appreciate this aspect, but as said I'm afraid it would be misleading (and potentially inviting for mis-use).
Okay, lets live with some more multi-line statements then.
Juergen
_______________________________________________
Xen-devel mailing list
[email protected]
https://lists.xenproject.org/mailman/listinfo/xen-devel
Quoted 10 lines · Jan Beulich
Quoted 9 lines · Juergen Gross
Quoted 7 lines · Jan Beulich
Hmm, that's indeed what I was deducing, but how will we sell this to people actually fiddling with vCPU affinities? I foresee getting
bug reports that the respective xl command(s) do(es)n't do anymore
what it used to do.
Quoted 7 lines
Quoted 1 line
The new behavior must be documented, sure.
Documentation is just one aspect. Often enough people only read docs when wanting to introduce new functionality, which I consider a fair model. Such people will be caught by surprise that the pinning behavior does not work the same way anymore.
That is indeed the case, and we need to think about how to address it, I agree.
Quoted 6 lines
And again - if someone pins every vCPU to a single pCPU, that last such pinning operation will be what takes long term effect. Aiui all vCPU-s in the unit will then be pinned to that one pCPU, i.e. they'll either all compete for the one pCPU's time, or only one of them will ever get scheduled.
I'm not sure I'm getting this. On an, say, SMT system, with 4 threads per core, a unit is 4 vCPUs and a pCPU is 4 threads.
If we pin all the 4 vCPUs of a unit to one 4 thread pCPU, each vCPU will get a thread.
Isn't it so?
Regards
Signature · 6 lines
Dario Faggioli, Ph.D http://about.me/dario.faggioli Virtualization Software Engineer SUSE Labs, SUSE https://www.suse.com/ ------------------------------------------------------------------- <<This happens because _I_ choose it to happen!>> (Raistlin Majere)
_______________________________________________
Xen-devel mailing list
[email protected]
https://lists.xenproject.org/mailman/listinfo/xen-devel
Quoted 21 lines · Dario Faggioli
Quoted 10 lines · Jan Beulich
Quoted 9 lines · Juergen Gross
Quoted 7 lines · Jan Beulich
Hmm, that's indeed what I was deducing, but how will we sell this to people actually fiddling with vCPU affinities? I foresee getting
bug reports that the respective xl command(s) do(es)n't do anymore
what it used to do.Quoted 7 lines
Quoted 1 line
The new behavior must be documented, sure.
Documentation is just one aspect. Often enough people only read docs when wanting to introduce new functionality, which I consider a fair model. Such people will be caught by surprise that the pinning behavior does not work the same way anymore.
That is indeed the case, and we need to think about how to address it, I agree.
Quoted 8 lines
Quoted 6 lines
And again - if someone pins every vCPU to a single pCPU, that last such pinning operation will be what takes long term effect. Aiui all vCPU-s in the unit will then be pinned to that one pCPU, i.e. they'll either all compete for the one pCPU's time, or only one of them will ever get scheduled.
I'm not sure I'm getting this. On an, say, SMT system, with 4 threads per core, a unit is 4 vCPUs and a pCPU is 4 threads.
No, the meaning of pCPU is a single thread of a single core. I.e. what is represented by a single cpumask_t bit.
Jan
_______________________________________________
Xen-devel mailing list
[email protected]
https://lists.xenproject.org/mailman/listinfo/xen-devel
Quoted 12 lines · Jan Beulich
Quoted 11 lines · Dario Faggioli
Quoted 10 lines · Jan Beulich
And again - if someone pins every vCPU to a single pCPU, that last
such pinning operation will be what takes long term effect. Aiui all
vCPU-s in the unit will then be pinned to that one pCPU, i.e. they'll either all compete for the one pCPU's time, or only one of
them will ever get scheduled.
Quoted 7 lines
Quoted 3 lines
I'm not sure I'm getting this. On an, say, SMT system, with 4 threads
per core, a unit is 4 vCPUs and a pCPU is 4 threads.No, the meaning of pCPU is a single thread of a single core. I.e. what is represented by a single
cpumask_tbit.
Fine, let's continue to call that a pCPU. Then, when core-scheduling is enabled, there's no <<multiple vCPUs of a unit being pinned to the same pCPU and all competing for jut its CPU time>>.
There's units of 4 vCPUs being pinned to 4 pCPUs (the 4 pCPUs of a core, not 4 random, nor arbitrary, ones).
That is the point, AFAIUI.
Regards
Signature · 6 lines
Dario Faggioli, Ph.D http://about.me/dario.faggioli Virtualization Software Engineer SUSE Labs, SUSE https://www.suse.com/ ------------------------------------------------------------------- <<This happens because _I_ choose it to happen!>> (Raistlin Majere)
_______________________________________________
Xen-devel mailing list
[email protected]
https://lists.xenproject.org/mailman/listinfo/xen-devel
Quoted 20 lines · Dario Faggioli
Quoted 12 lines · Jan Beulich
Quoted 11 lines · Dario Faggioli
Quoted 10 lines · Jan Beulich
And again - if someone pins every vCPU to a single pCPU, that last
such pinning operation will be what takes long term effect. Aiui all
vCPU-s in the unit will then be pinned to that one pCPU, i.e. they'll either all compete for the one pCPU's time, or only one of
them will ever get scheduled.Quoted 7 lines
Quoted 3 lines
I'm not sure I'm getting this. On an, say, SMT system, with 4 threads
per core, a unit is 4 vCPUs and a pCPU is 4 threads.No, the meaning of pCPU is a single thread of a single core. I.e. what is represented by a single
cpumask_tbit.
Quoted 8 lines
Fine, let's continue to call that a pCPU. Then, when core-scheduling is enabled, there's no <<multiple vCPUs of a unit being pinned to the same pCPU and all competing for jut its CPU time>>.
There's units of 4 vCPUs being pinned to 4 pCPUs (the 4 pCPUs of a core, not 4 random, nor arbitrary, ones).
That is the point, AFAIUI.
Well, okay, quite possible. But then for the example topology you gave, what is going to be the effect of
xl vcpu-pin 0 0 0
? In particular for Dom0 and in particular for CPU 0, there may be reasons to pin a particular vCPU to it.
Jan
_______________________________________________
Xen-devel mailing list
[email protected]
https://lists.xenproject.org/mailman/listinfo/xen-devel
Quoted 28 lines · Jan Beulich
Quoted 27 lines · Dario Faggioli
Quoted 12 lines · Jan Beulich
Quoted 11 lines · Dario Faggioli
Quoted 10 lines · Jan Beulich
And again - if someone pins every vCPU to a single pCPU, that last
such pinning operation will be what takes long term effect. Aiui all
vCPU-s in the unit will then be pinned to that one pCPU, i.e. they'll either all compete for the one pCPU's time, or only one of
them will ever get scheduled.Quoted 7 lines
Quoted 3 lines
I'm not sure I'm getting this. On an, say, SMT system, with 4 threads
per core, a unit is 4 vCPUs and a pCPU is 4 threads.No, the meaning of pCPU is a single thread of a single core. I.e. what is represented by a single
cpumask_tbit.Fine, let's continue to call that a pCPU. Then, when core-scheduling is enabled, there's no <<multiple vCPUs of a unit being pinned to the same pCPU and all competing for jut its CPU time>>.
There's units of 4 vCPUs being pinned to 4 pCPUs (the 4 pCPUs of a core, not 4 random, nor arbitrary, ones).
Quoted 6 lines
Quoted 1 line
That is the point, AFAIUI.
Well, okay, quite possible. But then for the example topology you gave, what is going to be the effect of
xl vcpu-pin 0 0 0
dom0 vcpu0 will be pinned to cpu0. dom0 vcpu1 will be pinned to cpu1. dom0 vcpu2 will be pinned to cpu2. dom0 vcpu3 will be pinned to cpu3.
Quoted 2 lines
? In particular for Dom0 and in particular for CPU 0, there may be reasons to pin a particular vCPU to it.
In reality only pinning vcpu0 to cpu0 should be needed. And this is done e.g. in dcdbas_smi_request().
Juergen
_______________________________________________
Xen-devel mailing list [email protected]
https://lists.xenproject.org/mailman/listinfo/xen-devel