From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S934272AbdERRIl (ORCPT ); Thu, 18 May 2017 13:08:41 -0400 Received: from hr2.samba.org ([144.76.82.148]:29905 "EHLO hr2.samba.org" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1751974AbdERRIj (ORCPT ); Thu, 18 May 2017 13:08:39 -0400 Date: Fri, 19 May 2017 03:08:23 +1000 From: Anton Blanchard To: Andrew Jeffery Cc: linuxppc-dev@lists.ozlabs.org, benh@kernel.crashing.org, paulus@samba.org, mpe@ellerman.id.au, npiggin@gmail.com, linux-kernel@vger.kernel.org Subject: Re: [PATCH] powerpc: Tweak copy selection parameter in __copy_tofrom_user_power7() Message-ID: <20170519030823.08966186@kryten> In-Reply-To: <20170512035810.15070-1-andrew@aj.id.au> References: <20170512035810.15070-1-andrew@aj.id.au> X-Mailer: Claws Mail 3.14.1 (GTK+ 2.24.31; x86_64-pc-linux-gnu) MIME-Version: 1.0 Content-Type: text/plain; charset=US-ASCII Content-Transfer-Encoding: 7bit Sender: linux-kernel-owner@vger.kernel.org List-ID: X-Mailing-List: linux-kernel@vger.kernel.org Hi Andrew, > Experiments with the netperf benchmark indicated that the size > selecting VMX-based copies in __copy_tofrom_user_power7() was > suboptimal on POWER8. Measurements showed that parity was in the > neighbourhood of 3328 bytes, rather than greater than 4096. The > change gives a 1.5-2.0% improvement in performance for 4096-byte > buffers, reducing the relative time spent in > __copy_tofrom_user_power7() from approximately 7% to approximately 5% > in the TCP_RR benchmark. Nice work! All our context switch optimisations we've made over the last year has likely moved the break even point for this. Acked-by: Anton Blanchard Anton > Signed-off-by: Andrew Jeffery > --- > arch/powerpc/lib/copyuser_power7.S | 4 ++-- > 1 file changed, 2 insertions(+), 2 deletions(-) > > diff --git a/arch/powerpc/lib/copyuser_power7.S > b/arch/powerpc/lib/copyuser_power7.S index a24b4039352c..706b7cc19846 > 100644 --- a/arch/powerpc/lib/copyuser_power7.S > +++ b/arch/powerpc/lib/copyuser_power7.S > @@ -82,14 +82,14 @@ > _GLOBAL(__copy_tofrom_user_power7) > #ifdef CONFIG_ALTIVEC > cmpldi r5,16 > - cmpldi cr1,r5,4096 > + cmpldi cr1,r5,3328 > > std r3,-STACKFRAMESIZE+STK_REG(R31)(r1) > std r4,-STACKFRAMESIZE+STK_REG(R30)(r1) > std r5,-STACKFRAMESIZE+STK_REG(R29)(r1) > > blt .Lshort_copy > - bgt cr1,.Lvmx_copy > + bge cr1,.Lvmx_copy > #else > cmpldi r5,16 >