diff options
author | Benjamin Herrenschmidt <benh@kernel.crashing.org> | 2017-07-24 06:28:02 +0200 |
---|---|---|
committer | Michael Ellerman <mpe@ellerman.id.au> | 2017-08-23 14:28:38 +0200 |
commit | a619e59c075c66e530a88e57b45bb0417e2f4fff (patch) | |
tree | 5f725ed75bdccc3bbd715ae8fb400ae0e55062b2 /arch/powerpc/include/asm/book3s | |
parent | powerpc/mm: Use mm_is_thread_local() instread of open-coding (diff) | |
download | linux-a619e59c075c66e530a88e57b45bb0417e2f4fff.tar.xz linux-a619e59c075c66e530a88e57b45bb0417e2f4fff.zip |
powerpc/mm: Optimize detection of thread local mm's
Instead of comparing the whole CPU mask every time, let's
keep a counter of how many bits are set in the mask. Thus
testing for a local mm only requires testing if that counter
is 1 and the current CPU bit is set in the mask.
Signed-off-by: Benjamin Herrenschmidt <benh@kernel.crashing.org>
Signed-off-by: Michael Ellerman <mpe@ellerman.id.au>
Diffstat (limited to 'arch/powerpc/include/asm/book3s')
-rw-r--r-- | arch/powerpc/include/asm/book3s/64/mmu.h | 3 |
1 files changed, 3 insertions, 0 deletions
diff --git a/arch/powerpc/include/asm/book3s/64/mmu.h b/arch/powerpc/include/asm/book3s/64/mmu.h index 1a220cdff923..c3b00e8ff791 100644 --- a/arch/powerpc/include/asm/book3s/64/mmu.h +++ b/arch/powerpc/include/asm/book3s/64/mmu.h @@ -83,6 +83,9 @@ typedef struct { mm_context_id_t id; u16 user_psize; /* page size index */ + /* Number of bits in the mm_cpumask */ + atomic_t active_cpus; + /* NPU NMMU context */ struct npu_context *npu_context; |