powerpc: During context switch, check before setting mm_cpumask

Michael Ellerman patch-notifications at ellerman.id.au
Wed Oct 5 13:36:29 AEDT 2016


On Mon, 2016-03-10 at 06:40:29 UTC, Anton Blanchard wrote:
> From: Anton Blanchard <anton at samba.org>
> 
> During context switch, switch_mm() sets our current CPU in mm_cpumask.
> We can avoid this atomic sequence in most cases by checking before
> setting the bit.
> 
> Testing on a POWER8 using our context switch microbenchmark:
> 
> tools/testing/selftests/powerpc/benchmarks/context_switch \
> 	--process --no-fp --no-altivec --no-vector
> 
> Performance improves 2%.
> 
> Signed-off-by: Anton Blanchard <anton at samba.org>
> Acked-by: Balbir Singh <bsingharora at gmail.com>

Applied to powerpc next, thanks.

https://git.kernel.org/powerpc/c/bb85fb5803270c52863b983596c2a0

cheers


More information about the Linuxppc-dev mailing list