Received: by 2002:a05:6358:3188:b0:123:57c1:9b43 with SMTP id q8csp2752994rwd; Fri, 26 May 2023 10:39:59 -0700 (PDT) X-Google-Smtp-Source: ACHHUZ786HDXQu5uUP7VKdfrkljV45AVAToHyJItAvNUstU/evIn7q+sUlE6yG4YR+AdUUDwpVvo X-Received: by 2002:a17:90b:3a81:b0:255:ea26:9b0 with SMTP id om1-20020a17090b3a8100b00255ea2609b0mr3086701pjb.47.1685122799426; Fri, 26 May 2023 10:39:59 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1685122799; cv=none; d=google.com; s=arc-20160816; b=B60hxn5CEEAWVOnXysQGRsGS9pCkiYcH3s6I0/FY2KB1plc+qKqjMtO1/jpgr64uod W1PoJthm6ceLdUBiZrP/BK+pMHjyWFmKV5EBpTkt7+OWuvY0fKNbhJNhkdg2ff0FZgOS 6AIWxLjcL5lwDCTbt97mw8AQHLw+v/TgnfsMi0DfAqQEjJhAtWdFHqRf+yCbJ4ZeVxOc seac5qIvZeTmcogcu9mABVnn2MgzVeU2NF9sEckUIo0LQRCmOXqN3MsPj7EwuQcOLr1I qjyXGF+U+7dG0IjAQSnzqAoJpdcuN5Yg2zUHiYIaXWtOnnqsAyHrect2FLtXJfLZq4jb yjnQ== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:content-transfer-encoding:cc:to:subject :message-id:date:from:in-reply-to:references:mime-version :dkim-signature; bh=l8g5Xna8j25EFmespE1bvOARSHuLS2nJdLVHo25mjSE=; b=JnqBAw9BR3viVszGbIvArMfpgBFUR70a8A1BKkDus+xpoz1b6Glg8IQ0JEU2xOyjnp 68o4gCXxiHDJJ1734dqOHKfc//LxgKUnnHP4iszTbYzjns520XWda8rg3j2Z3pLfYzRN 6cQM1fMEpa0ABUpX9vVFYRq5RU18njJwjAfw0WG+Hdnl7IKf0diz09b+lO73kDdtjkq8 s5xh3R7t+lIpNho+mdrDhatgcCXvgjoUpZlMqyamUibtqwjm7bTHiMbuijO13BP/Vglh /8RtTA3/SojH0Kj2OG0GDfLW4p9QoN6XxoehFi7bD5vILZytbQOVZPrr7gzZ0j5+Vnjd OHnw== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@google.com header.s=20221208 header.b=f23M39+X; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:20 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=REJECT sp=REJECT dis=NONE) header.from=google.com Return-Path: Received: from out1.vger.email (out1.vger.email. [2620:137:e000::1:20]) by mx.google.com with ESMTP id s190-20020a632cc7000000b005348af160c4si2347307pgs.632.2023.05.26.10.39.44; Fri, 26 May 2023 10:39:59 -0700 (PDT) Received-SPF: pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:20 as permitted sender) client-ip=2620:137:e000::1:20; Authentication-Results: mx.google.com; dkim=pass header.i=@google.com header.s=20221208 header.b=f23M39+X; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:20 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=REJECT sp=REJECT dis=NONE) header.from=google.com Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S236919AbjEZRZm (ORCPT + 99 others); Fri, 26 May 2023 13:25:42 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:43452 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S237116AbjEZRZk (ORCPT ); Fri, 26 May 2023 13:25:40 -0400 Received: from mail-wm1-x32e.google.com (mail-wm1-x32e.google.com [IPv6:2a00:1450:4864:20::32e]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 138601B0 for ; Fri, 26 May 2023 10:25:37 -0700 (PDT) Received: by mail-wm1-x32e.google.com with SMTP id 5b1f17b1804b1-3f600a6a890so4105e9.0 for ; Fri, 26 May 2023 10:25:36 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=20221208; t=1685121935; x=1687713935; h=content-transfer-encoding:cc:to:subject:message-id:date:from :in-reply-to:references:mime-version:from:to:cc:subject:date :message-id:reply-to; bh=l8g5Xna8j25EFmespE1bvOARSHuLS2nJdLVHo25mjSE=; b=f23M39+X+33xnPxCbKYMOJ14/bCAA9KXeklSOwa8N+tHHQEeVXO9PG06uqnHlgbpvJ yZcoi+2V0Rnvo3xNSbHS90ZINBSY8pxHi1Xm96Pc1OjyRBIMYwQg2pzWUKm9EvEGoqIg mRQCwruUR1IwLekhmrhr2T58qvSw2Qkt3CloEtcqrhHH6VZq5NTF+ZeRAfTCprFOJPL7 s4ZPJ02tHgnaBv2DpSE42RD6H0VRLlp6RyMZXB3hJs1tYXQm0tIoHRpXpiEHXKluB88B 6iMsG8tJ8UdDub6koAvqI+jJOj4p/m1joTQtKjUwx/iR1zcf7M4i1WxdB9+hz7d0nCFk KzDQ== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20221208; t=1685121935; x=1687713935; h=content-transfer-encoding:cc:to:subject:message-id:date:from :in-reply-to:references:mime-version:x-gm-message-state:from:to:cc :subject:date:message-id:reply-to; bh=l8g5Xna8j25EFmespE1bvOARSHuLS2nJdLVHo25mjSE=; b=I2NbXET3F2qgSUDpo0gGUYtrSD/3ucgFy3p10+wu3iyAoR6UAV/kf5WLENXtedUfiY hkz47KNe7ZIfinF08Ss51GWAr3eg8s9boBPp8t+Ouz5z0N8uhuYL4KC1gsi8/436LjlK dlZj9cMPOMC2iy3NRzDa/WwP9gC155bnlqLjpci6Aw6H4Fe8qMhh7Dd9cF4//11+TdyV 6MVjXB1Hl3QLhnBjLNii8WMKwYJmPnfFIIeNHzLcy2rSUDHBnaOb9VlqpqA9SO4qmc08 Jo4ugnqBt+8Z8/3WscOE9MKI7JEbinu862erphpa69PQ+/G6ZctrkzZKfX5hP/okg2lN 847g== X-Gm-Message-State: AC+VfDz/QGtv0yHtpRFpCUN3itJODAy4rkM9vZYw43LJgC8JuFSDlE3I tQpA7qDoUlc4xvR9pAjWQLCpyuKhVbIflXk2M/ZJLsQy2y/TDq7mJzU5eg== X-Received: by 2002:a05:600c:458b:b0:3f1:758c:dd23 with SMTP id r11-20020a05600c458b00b003f1758cdd23mr123345wmo.7.1685121935222; Fri, 26 May 2023 10:25:35 -0700 (PDT) MIME-Version: 1.0 References: In-Reply-To: From: Eric Dumazet Date: Fri, 26 May 2023 19:25:23 +0200 Message-ID: Subject: Re: x86 copy performance regression To: Linus Torvalds Cc: LKML , netdev Content-Type: text/plain; charset="UTF-8" Content-Transfer-Encoding: quoted-printable X-Spam-Status: No, score=-17.6 required=5.0 tests=BAYES_00,DKIMWL_WL_MED, DKIM_SIGNED,DKIM_VALID,DKIM_VALID_AU,DKIM_VALID_EF, ENV_AND_HDR_SPF_MATCH,RCVD_IN_DNSWL_NONE,SPF_HELO_NONE,SPF_PASS, T_SCC_BODY_TEXT_LINE,USER_IN_DEF_DKIM_WL,USER_IN_DEF_SPF_WL autolearn=ham autolearn_force=no version=3.4.6 X-Spam-Checker-Version: SpamAssassin 3.4.6 (2021-04-09) on lindbergh.monkeyblade.net Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On Fri, May 26, 2023 at 7:17=E2=80=AFPM Linus Torvalds wrote: > > On Fri, May 26, 2023 at 10:00=E2=80=AFAM Linus Torvalds > wrote: > > > > Let me go look at it some more. I *really* didn't want to make the > > code worse for ERMS > > Oh well. I'll think about it some more in the hope that I can come up > with something clever that doesn't make objtool hate me, but in the > meantime let me just give you the "not clever" patch. > > It generates an annoying six-byte jump when the small 2-byte one would > work just fine, but I guess only my pride is wounded. arch/x86/lib/copy_user_64.S:34:2: error: invalid instruction mnemonic 'alternative' alternative "jae .Lunrolled", "jae .Llarge", ( 9*32+ 9) ^~~~~~~~~~~ I changed alternative to ALTERNATIVE to let it build. SYM_FUNC_START(rep_movs_alternative) cmpq $64,%rcx - jae .Lunrolled + ALTERNATIVE "jae .Lunrolled", "jae .Llarge", X86_FEATURE_ERMS I will report test result soon, thanks !