]> git.baikalelectronics.ru Git - kernel.git/commit
powerpc: Copy only required pieces of the mm_context_t to the paca
authorMichael Neuling <mikey@neuling.org>
Thu, 10 Dec 2015 22:34:42 +0000 (09:34 +1100)
committerMichael Ellerman <mpe@ellerman.id.au>
Sun, 27 Dec 2015 08:12:14 +0000 (19:12 +1100)
commit0465d3b7dc3b9c0db449df2b19379a1dbe2a4754
treec851eab2210153cfc4e706b2680ef64ee2329dce
parentc3000cbee42e28b449be13b2015a22afacef49e0
powerpc: Copy only required pieces of the mm_context_t to the paca

Currently we copy the whole mm_context_t to the paca but only access a
few bits of it.  This is wasteful of space paca and also takes quite
some time in the hot path of context switching.

This patch pulls in only the required bits from the mm_context_t to
the paca and on context switch, copies only those.

Benchmarking this (On top of Anton's recent MSR context switching
changes [1]) using processes and yield shows an improvement of almost
3% on POWER8:

  http://ozlabs.org/~anton/junkcode/context_switch2.c
  ./context_switch2 --test=yield --process 0 0

1. https://lists.ozlabs.org/pipermail/linuxppc-dev/2015-October/135700.html

Signed-off-by: Michael Neuling <mikey@neuling.org>
[mpe: Rename paca fields to be mm_ctx_foo rather than context_foo]
Signed-off-by: Michael Ellerman <mpe@ellerman.id.au>
arch/powerpc/include/asm/paca.h
arch/powerpc/kernel/asm-offsets.c
arch/powerpc/mm/hash_utils_64.c