Messages in this thread Patches in this message | | | Date | Thu, 27 Sep 2012 15:02:21 +0800 | From | Alex Shi <> | Subject | Re: [PATCH] x86: Distinguish TLB shootdown interrupts from other functions call interrupts |
| |
>>
>> the 3.6 kernel will closed soon. it will be great to has this patch in. >> So, could you like to refresh your patch with popular comments format? :) > > Fixed patch is below. > Thank you for the review again. >
Peter:
Maybe the patch doesn't looks perfect for this issue. So I am wondering if the following patch is better, if we don't care the irq_tlb was counted again in irq_call?
=== diff --git a/arch/x86/mm/tlb.c b/arch/x86/mm/tlb.c index 613cd83..2d6d8ed 100644 --- a/arch/x86/mm/tlb.c +++ b/arch/x86/mm/tlb.c @@ -98,6 +98,8 @@ static void flush_tlb_func(void *info) { struct flush_tlb_info *f = info; + inc_irq_stat(irq_tlb_count); + if (f->flush_mm != this_cpu_read(cpu_tlbstate.active_mm)) return; ===
Or another solution is also reducing double counted irq_tlb_count from irq_call_count What's your comments of this? === diff --git a/arch/x86/include/asm/hardirq.h b/arch/x86/include/asm/hardirq.h index d3895db..aac7886 100644 --- a/arch/x86/include/asm/hardirq.h +++ b/arch/x86/include/asm/hardirq.h @@ -36,6 +36,7 @@ DECLARE_PER_CPU_SHARED_ALIGNED(irq_cpustat_t, irq_stat); #define __ARCH_IRQ_STAT #define inc_irq_stat(member) this_cpu_inc(irq_stat.member) +#define dec_irq_stat(member) this_cpu_dec(irq_stat.member) #define local_softirq_pending() this_cpu_read(irq_stat.__softirq_pending) diff --git a/arch/x86/mm/tlb.c b/arch/x86/mm/tlb.c index 613cd83..b82bd9f 100644 --- a/arch/x86/mm/tlb.c +++ b/arch/x86/mm/tlb.c @@ -98,6 +98,10 @@ static void flush_tlb_func(void *info) { struct flush_tlb_info *f = info; + /* remove double counted irq_tlb_count from irq_call_count */ + dec_irq_stat(irq_call_count); + inc_irq_stat(irq_tlb_count); + if (f->flush_mm != this_cpu_read(cpu_tlbstate.active_mm)) return; ===
Thanks Alex
| |