From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from ozlabs.org (ozlabs.org [103.22.144.67]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by lists.ozlabs.org (Postfix) with ESMTPS id 3spfzx3M4ZzDrNK for ; Wed, 5 Oct 2016 13:36:29 +1100 (AEDT) In-Reply-To: <1475476829-6296-1-git-send-email-anton@ozlabs.org> To: Anton Blanchard , benh@kernel.crashing.org, paulus@samba.org, npiggin@gmail.com, cyrilbur@gmail.com From: Michael Ellerman Cc: linuxppc-dev@lists.ozlabs.org Subject: Re: powerpc: During context switch, check before setting mm_cpumask Message-Id: <3spfzx28DDz9sCg@ozlabs.org> Date: Wed, 5 Oct 2016 13:36:29 +1100 (AEDT) List-Id: Linux on PowerPC Developers Mail List List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , On Mon, 2016-03-10 at 06:40:29 UTC, Anton Blanchard wrote: > From: Anton Blanchard > > 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 > Acked-by: Balbir Singh Applied to powerpc next, thanks. https://git.kernel.org/powerpc/c/bb85fb5803270c52863b983596c2a0 cheers