]> git.baikalelectronics.ru Git - kernel.git/commit
powerpc/mm/radix: Improve TLB/PWC flushes
authorBenjamin Herrenschmidt <benh@kernel.crashing.org>
Wed, 19 Jul 2017 04:49:05 +0000 (14:49 +1000)
committerMichael Ellerman <mpe@ellerman.id.au>
Wed, 2 Aug 2017 03:11:06 +0000 (13:11 +1000)
commit165d7b709ee89cf83164dd7786011bd9996fbf86
tree73d1c77d0429e0e9cd86a9fb3c705b4c2f06423c
parent78cc1b5628255bd9d722e28ce22f3a7fe8ed729c
powerpc/mm/radix: Improve TLB/PWC flushes

At the moment we have to rather sub-optimal flushing behaviours:

 - flush_tlb_mm() will flush the PWC which is unnecessary (for example
   when doing a fork)

 - A large unmap will call flush_tlb_pwc() multiple times causing us
   to perform that fairly expensive operation repeatedly. This happens
   often in batches of 3 on every new process.

So we change flush_tlb_mm() to only flush the TLB, and we use the
existing "need_flush_all" flag in struct mmu_gather to indicate
that the PWC needs flushing.

Unfortunately, flush_tlb_range() still needs to do a full flush
for now as it's used by the THP collapsing. We will fix that later.

Signed-off-by: Benjamin Herrenschmidt <benh@kernel.crashing.org>
Reviewed-by: Aneesh Kumar K.V <aneesh.kumar@linux.vnet.ibm.com>
Signed-off-by: Michael Ellerman <mpe@ellerman.id.au>
arch/powerpc/include/asm/book3s/64/tlbflush-radix.h
arch/powerpc/mm/tlb-radix.c