Skip to content

RFC x86: allocate up to 32 tlb invalidate vectors

Shaohua Li lkml 1 version In review

Get series with b4
b4 am 1288766655.23014.113.camel@sli10-conroe

Versions newest first

  1. v1 RFC Latest4 patches 15 repliesIn review

Patches in v1 No applies recorded yet

#Subject and filesSizeRepliesApplied
1/4x86: cleanup vector usagearch/x86/include/asm/irq_vectors.h+21 -193 replies
2/4x86: allocate 32 tlb_invalidate_interrupt handlersarch/x86/include/asm/entry_arch.h arch/x86/include/asm/hw_irq.h arch/x86/kernel/entry_64.S +1 more+103 -101 reply
3/4x86: make tlb invalidate vector number configurablearch/x86/include/asm/irq_vectors.h+9 -40 replies
4/4x86: avoid tlbstate lock if no enough cpusarch/x86/mm/tlb.c+7 -79 replies

Reviews trailers per patch

1 of 4 patches has a Reviewed-by or Acked-by.

PatchEric Dumazet
1/4
2/4
3/4
4/4A-b

Trailers given in replies are filled; those carried in the patches from earlier versions are outlined with dashes.

Read the v1 thread

Cover letter [RFC 0/4]x86: allocate up to 32 tlb invalidate vectors

Hi,
In workload with heavy page reclaim, flush_tlb_page() is frequently used. We currently have 8 vectors for tlb flush, which is fine for small machines. But for big machines with a lot of CPUs, the 8 vectors are shared by all CPUs and we need lock to protect them. This will cause a lot of lock contentions. please see the patch 3 for detailed number of the lock contention.
Andi Kleen suggests we can use 32 vectors for tlb flush, which should be fine for even 8 socket machines. Test shows this reduces lock contention dramatically (see patch 3 for number).
One might argue if this will waste too many vectors and leave less vectors for devices. This could be a problem. But even we use 32 vectors, we still leave 78 vectors for devices. And we now have per-cpu vector, vector isn't scarce any more, but I'm open if anybody has objections.

Thanks,
Shaohua