Received: by 2002:ac0:a5b6:0:0:0:0:0 with SMTP id m51-v6csp3655899imm; Mon, 4 Jun 2018 07:15:44 -0700 (PDT) X-Google-Smtp-Source: ADUXVKKVs1aOjVb3pe/6NlqrBYmbhMEJUNmM6pwKEQcEJo+52eHtwQV3zEDf/dyu0XXoA4OF4BZg X-Received: by 2002:a17:902:bb90:: with SMTP id m16-v6mr19185601pls.50.1528121743976; Mon, 04 Jun 2018 07:15:43 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1528121743; cv=none; d=google.com; s=arc-20160816; b=O6PLtTeer6BcpUnGsyXTLgqqA/ZXlDNsRKGxTeHgSeoNaZzWEMS0W3mloQ8b0v1Xaa gCijjLkGupL3JIVMPABjClb5NHfy9EVEXYg930i3L6YuLAxsTcMmKcDdgWdhR2INijOh 2j1RQvcimRlYlsan+DT3xmyUzp0yiLlYwYN8qjoB/joaVeLVDuBkMKc37amV5w6cLKmU IQOwN9IJPi9RW+XlB9E4eTcVbpdyvRPlejUF2hC6EKuOLKRNkjRXKg6jv4vpBJy+6Zv5 CJy8mKdnKi/DEJ+uvp1TL8mSk3f9rE983VbWSQ2YlaLz19CR4scjKkVOVsv1n8rOjUMx Jqaw== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:sender:date:message-id:subject:cc:from:to :in-reply-to:arc-authentication-results; bh=+pJ0QHfM+o/7HS5KECOkJIHs7n6k2imrzQyI/HrYQwg=; b=xQhsEDrzChKmpLeS1uOfbDZA5hj0ANx4AatnpEQ+GlyaeRDNmE2mFNMuNBdeWgpadd 3+qEMFAU14hm5XKEDi44/tbP/9kLdjPjDCn48/BYJvF0OuYutGovqE+DcJGTkF0jyFJ0 4MW24YstzIF8E09oNzMhldItDbrUnNOkoCcP73QpJj0yB4CeW3yFA/OXIXgcyFAV/Zxy a8YzflW/rYfIpNR4MlBDLClBdy5b9o2LvrNmksGkV1qCdIJqHF+qKUGQ7vSZ3DnGNU/q Ht+jUXI4eYooTOVNmd7psf6X/zVPMPEGEkXSTh50A6pmRaaIVSp8DOpm6VU0pF1Q/hmp FQ4w== ARC-Authentication-Results: i=1; mx.google.com; spf=pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org Return-Path: Received: from vger.kernel.org (vger.kernel.org. [209.132.180.67]) by mx.google.com with ESMTP id u12-v6si25832514plz.392.2018.06.04.07.15.29; Mon, 04 Jun 2018 07:15:43 -0700 (PDT) Received-SPF: pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) client-ip=209.132.180.67; Authentication-Results: mx.google.com; spf=pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1753711AbeFDOLE (ORCPT + 99 others); Mon, 4 Jun 2018 10:11:04 -0400 Received: from ozlabs.org ([203.11.71.1]:52609 "EHLO ozlabs.org" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1753349AbeFDOLC (ORCPT ); Mon, 4 Jun 2018 10:11:02 -0400 Received: by ozlabs.org (Postfix, from userid 1034) id 40zxg75qFJz9s5b; Tue, 5 Jun 2018 00:10:58 +1000 (AEST) X-powerpc-patch-notification: thanks X-powerpc-patch-commit: 1128bb7813a896bd608fb622eee3c26aaf33b473 In-Reply-To: <20180518130116.A1A3B6F937@po14934vm.idsi0.si.c-s.fr> To: Christophe Leroy , Benjamin Herrenschmidt , Paul Mackerras From: Michael Ellerman Cc: linuxppc-dev@lists.ozlabs.org, linux-kernel@vger.kernel.org Subject: Re: [v2] powerpc/lib: Adjust .balign inside string functions for PPC32 Message-Id: <40zxg75qFJz9s5b@ozlabs.org> Date: Tue, 5 Jun 2018 00:10:58 +1000 (AEST) Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On Fri, 2018-05-18 at 13:01:16 UTC, Christophe Leroy wrote: > commit 87a156fb18fe1 ("Align hot loops of some string functions") > degraded the performance of string functions by adding useless > nops > > A simple benchmark on an 8xx calling 100000x a memchr() that > matches the first byte runs in 41668 TB ticks before this patch > and in 35986 TB ticks after this patch. So this gives an > improvement of approx 10% > > Another benchmark doing the same with a memchr() matching the 128th > byte runs in 1011365 TB ticks before this patch and 1005682 TB ticks > after this patch, so regardless on the number of loops, removing > those useless nops improves the test by 5683 TB ticks. > > Fixes: 87a156fb18fe1 ("Align hot loops of some string functions") > Signed-off-by: Christophe Leroy Applied to powerpc next, thanks. https://git.kernel.org/powerpc/c/1128bb7813a896bd608fb622eee3c2 cheers