[PATCH 16/19] powerpc: create giveup_all()
Michael Ellerman
mpe at ellerman.id.au
Wed Dec 2 19:24:02 AEDT 2015
On Thu, 2015-10-29 at 11:44 +1100, Anton Blanchard wrote:
> Create a single function that gives everything up (FP, VMX, VSX, SPE).
> Doing this all at once means we only do one MSR write.
>
> A context switch microbenchmark using yield():
>
> http://ozlabs.org/~anton/junkcode/context_switch2.c
>
> ./context_switch2 --test=yield --fp --altivec --vector 0 0
>
> shows an improvement of 3% on POWER8.
>
> Signed-off-by: Anton Blanchard <anton at samba.org>
> ---
> arch/powerpc/include/asm/switch_to.h | 1 +
> arch/powerpc/kernel/process.c | 75 ++++++++++++++++++++++++++++--------
> arch/powerpc/kvm/book3s_pr.c | 17 +-------
books3s_pr.c can be a module, so we need giveup_all() to be EXPORT_SYMBOL.
I'll fix it up on my end.
cheers
More information about the Linuxppc-dev
mailing list