[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index] Re: [Xen-devel] [PATCH 5/6] x86: avoid explicit TLB flush when saving exec state
On 19/01/18 16:06, Jan Beulich wrote: > Now that it's obvious that only a single dirty CPU can exist for a vCPU, > it becomes clear that flush_mask() doesn't need to be invoked when > sync_local_execstate() was already run. And with the IPI handler > clearing FLUSH_TLB from the passed flags anyway if > __sync_local_execstate() returns true, it also becomes clear that > FLUSH_TLB doesn't need to be passed here in the first place. Are either of these examples explicitly trying to flush the TLB in the first case? They both look like they care only about the vcpu state, and the FLUSH_TLB previously was to pass the nop check. > > Signed-off-by: Jan Beulich <jbeulich@xxxxxxxx> > > --- a/xen/arch/x86/domain.c > +++ b/xen/arch/x86/domain.c > @@ -1693,7 +1693,7 @@ void context_switch(struct vcpu *prev, s > if ( unlikely(dirty_cpu != cpu) && dirty_cpu != NR_CPUS ) > { > /* Other cpus call __sync_local_execstate from flush ipi handler. */ Given the change in behaviour, /* Remote cpu calls __sync_local_execstate(). */ ? Perhaps more applicable to the previous patch. ~Andrew > - flush_mask(cpumask_of(dirty_cpu), FLUSH_TLB | FLUSH_STATE); > + flush_mask(cpumask_of(dirty_cpu), FLUSH_STATE); > } > > if ( prev != next ) > @@ -1800,11 +1800,10 @@ void sync_vcpu_execstate(struct vcpu *v) > { > if ( v->dirty_cpu == smp_processor_id() ) > sync_local_execstate(); > - > - if ( v->dirty_cpu != NR_CPUS ) > + else if ( v->dirty_cpu != NR_CPUS ) > { > /* Other cpus call __sync_local_execstate from flush ipi handler. */ > - flush_mask(cpumask_of(v->dirty_cpu), FLUSH_TLB | FLUSH_STATE); > + flush_mask(cpumask_of(v->dirty_cpu), FLUSH_STATE); > } > } > > > > _______________________________________________ Xen-devel mailing list Xen-devel@xxxxxxxxxxxxxxxxxxxx https://lists.xenproject.org/mailman/listinfo/xen-devel
|
Lists.xenproject.org is hosted with RackSpace, monitoring our |