|
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index] Re: [Xen-devel] [PATCH v2] x86: avoid flush IPI when possible
>>> On 17.02.16 at 15:48, <andrew.cooper3@xxxxxxxxxx> wrote:
> On 16/02/16 10:14, Jan Beulich wrote:
>> --- a/xen/arch/x86/smp.c
>> +++ b/xen/arch/x86/smp.c
>> @@ -205,26 +205,30 @@ static unsigned int flush_flags;
>>
>> void invalidate_interrupt(struct cpu_user_regs *regs)
>> {
>> + unsigned int flags = flush_flags;
>> ack_APIC_irq();
>> perfc_incr(ipis);
>> - if ( !__sync_local_execstate() ||
>> - (flush_flags & (FLUSH_TLB_GLOBAL | FLUSH_CACHE)) )
>> - flush_area_local(flush_va, flush_flags);
>> + if ( __sync_local_execstate() )
>> + flags &= ~FLUSH_TLB;
>
> If a switch happened, write_ptbase() also flushed global mappings. I
> believe you can also mask out FLUSH_TLB_GLOBAL here.
Indeed - not doing so appears to be another leftover of 32-bit
days, where write_cr3() did not fiddle with CR4 when
!USER_MAPPINGS_ARE_GLOBAL (i.e. namely the 32-bit case).
> Otherwise, the rest looks ok. Reviewed-by: Andrew Cooper
> <andrew.cooper3@xxxxxxxxxx>
Thanks, Jan
_______________________________________________
Xen-devel mailing list
Xen-devel@xxxxxxxxxxxxx
http://lists.xen.org/xen-devel
|
![]() |
Lists.xenproject.org is hosted with RackSpace, monitoring our |