Received: by 2002:a05:7412:419a:b0:f3:1519:9f41 with SMTP id i26csp2605246rdh; Sun, 26 Nov 2023 12:24:32 -0800 (PST) X-Google-Smtp-Source: AGHT+IFmVlLPO5h2XPiEDUbxKZUUGtPqXnLTI3OWFATdTD9yiEv3TthW85NxfuA6QLm3yDe4gpZx X-Received: by 2002:a05:6a20:7da0:b0:18c:9175:eae6 with SMTP id v32-20020a056a207da000b0018c9175eae6mr1384712pzj.24.1701030271652; Sun, 26 Nov 2023 12:24:31 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1701030271; cv=none; d=google.com; s=arc-20160816; b=XoIcGrzXMnGczoZWUgS2RXV6BZNyzWCsbK7OSYUtIZJePmXxsNZTf72vhidgRiTndZ 7SL7fY5DwMuYSVqNiE73IIpC+vunBf3Hkfx3nrMoUnLHa+i7+QRNhTmtn85XzW0DS/QT da84mUUoquv4ocInlA2dE5eoQM16Zt4EKzVDXDfblFgCSVsbVHYdySIUQx49aY4lTjUQ Y1tFiehkPuDI4RuBP58IryO5YVOIs3OxxccF8Wn1QVy2vGnbCrvuyfq6d5m0JweAkbuX 3PCN5SNk2AbsxQYIPcIQA4YzdC+0FdDtV4Ax6YOV7Xg0oxi6QwqfBseskY7a7M7WVqoB ZcYw== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:cc:to:subject:message-id:date:from:in-reply-to :references:mime-version:dkim-signature; bh=Z9m0VkYBMPQAAqcfnyKJyHPhdZmsbJX1nKe+Mjna/jI=; fh=lErGtXdf21FHmX7L4hEmvZKF1UCyMACzCPgN5aLXXLk=; b=RoRzQkMUwEq+QMhZowjPkNwg+bBvwzmvlmntLJCAJ5etm3XUzfZgcx+Mdpzp88tjKH 7YpzYS+K0rQ4ZXCm/HuI8+mKlAIgpR2xi0at3mEGOlzBNvaK9Qawwdvny2qRH6vSd6ER O2aiy+Hf93zzOSBBvLkJoulPmDiDQVHkNjAb1myHJcsP+IWNbDftQe/fqTnVV4ARWvST Y85VLebTJT51ktM/Kp9n5mNeJ8OV0p+0f6dIqPI55vjzGEDKhv1qNDRs+LmhPka9BPZB +OTudfdrg41mSQRJ8BYgQKwDEJVDZ6UhdYjZo4SyfoqQj8apuupJ3qAx7Ye1cs0ulipg phWA== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@linux-foundation.org header.s=google header.b=EGH0rRnh; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::3:7 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org Return-Path: Received: from snail.vger.email (snail.vger.email. [2620:137:e000::3:7]) by mx.google.com with ESMTPS id n4-20020a170902e54400b001c62e8c0a38si8695512plf.256.2023.11.26.12.24.31 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Sun, 26 Nov 2023 12:24:31 -0800 (PST) Received-SPF: pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::3:7 as permitted sender) client-ip=2620:137:e000::3:7; Authentication-Results: mx.google.com; dkim=pass header.i=@linux-foundation.org header.s=google header.b=EGH0rRnh; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::3:7 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org Received: from out1.vger.email (depot.vger.email [IPv6:2620:137:e000::3:0]) by snail.vger.email (Postfix) with ESMTP id 07BE38066649; Sun, 26 Nov 2023 12:24:30 -0800 (PST) X-Virus-Status: Clean X-Virus-Scanned: clamav-milter 0.103.11 at snail.vger.email Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S229560AbjKZUYM (ORCPT + 99 others); Sun, 26 Nov 2023 15:24:12 -0500 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:58070 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S229436AbjKZUYL (ORCPT ); Sun, 26 Nov 2023 15:24:11 -0500 Received: from mail-ej1-x631.google.com (mail-ej1-x631.google.com [IPv6:2a00:1450:4864:20::631]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 7B9B6111 for ; Sun, 26 Nov 2023 12:24:17 -0800 (PST) Received: by mail-ej1-x631.google.com with SMTP id a640c23a62f3a-a04196fc957so513927366b.2 for ; Sun, 26 Nov 2023 12:24:17 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=linux-foundation.org; s=google; t=1701030256; x=1701635056; darn=vger.kernel.org; h=cc:to:subject:message-id:date:from:in-reply-to:references :mime-version:from:to:cc:subject:date:message-id:reply-to; bh=Z9m0VkYBMPQAAqcfnyKJyHPhdZmsbJX1nKe+Mjna/jI=; b=EGH0rRnh12YtBQDh+ogT7oqNTqVSizbHnbv0xwiqhVAgHB1FE1THLh6hozAAZ/3vnA BbDxzjw9i4tTh3j0elQ16Ijx5maS1lxO0nj0n0hibNdWhnbtk9TTvsW2rxwVau7+fnKV oAdhWn4B2Lrv+8Eftxxit2Jat9/jbB4e2ShyY= X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1701030256; x=1701635056; h=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=Z9m0VkYBMPQAAqcfnyKJyHPhdZmsbJX1nKe+Mjna/jI=; b=FFTogDa03oyDA6SRClptXgI0+t84NA47g/b2fklfa7KSgJ3DeiAirvrL36aLfF3FCt 4GEYiLZXTdugbw5ssABOoRwadywKTdGmvaCRdkYjkF3DbSX/gfUiG4xZ1qNmZvz7HROh 8b8NlRs2Vis5ZVqEpB7iWoSEAK2YbeN6cJbpqP+JF0lDo5BzX61mG1d5cipBl951mScj cI7SXoaZmqTZ9oSj+0j2AV8Bl1nPMSApMMdJ4z619z05z9Li4bSVQttpNLp7xFf+LNlr gwJMiAnR4C8Keq+1+Djwq0nXg4AIs6D0wDMa1zXa0m1Ys4WasTt3MaH0MXKID4Rwloi7 92dQ== X-Gm-Message-State: AOJu0YxqIea6LtccfStG8OAlHEWaxhXXXBr5CXYlwD6OBqFWhFLfBHrh OSZCPh/0y6278XVOPwiv+fopH5AfpofKfSCtox8eYRkq X-Received: by 2002:a17:906:5345:b0:a0c:5dc9:5238 with SMTP id j5-20020a170906534500b00a0c5dc95238mr2505423ejo.38.1701030255742; Sun, 26 Nov 2023 12:24:15 -0800 (PST) Received: from mail-ej1-f48.google.com (mail-ej1-f48.google.com. [209.85.218.48]) by smtp.gmail.com with ESMTPSA id s20-20020a1709066c9400b009fd585a2155sm4841177ejr.0.2023.11.26.12.24.14 for (version=TLS1_3 cipher=TLS_AES_128_GCM_SHA256 bits=128/128); Sun, 26 Nov 2023 12:24:14 -0800 (PST) Received: by mail-ej1-f48.google.com with SMTP id a640c23a62f3a-a04196fc957so513924666b.2 for ; Sun, 26 Nov 2023 12:24:14 -0800 (PST) X-Received: by 2002:a17:906:28e:b0:a0a:f934:6075 with SMTP id 14-20020a170906028e00b00a0af9346075mr3560404ejf.39.1701030253926; Sun, 26 Nov 2023 12:24:13 -0800 (PST) MIME-Version: 1.0 References: <202311201406.2022ca3f-oliver.sang@intel.com> In-Reply-To: <202311201406.2022ca3f-oliver.sang@intel.com> From: Linus Torvalds Date: Sun, 26 Nov 2023 12:23:57 -0800 X-Gmail-Original-Message-ID: Message-ID: Subject: Re: [linus:master] [file] 0ede61d858: will-it-scale.per_thread_ops -2.9% regression To: kernel test robot Cc: Christian Brauner , oe-lkp@lists.linux.dev, lkp@intel.com, linux-kernel@vger.kernel.org, Jann Horn , linux-doc@vger.kernel.org, linuxppc-dev@lists.ozlabs.org, intel-gfx@lists.freedesktop.org, linux-fsdevel@vger.kernel.org, gfs2@lists.linux.dev, bpf@vger.kernel.org, ying.huang@intel.com, feng.tang@intel.com, fengwei.yin@intel.com Content-Type: multipart/mixed; boundary="00000000000009cc68060b13f8a2" X-Spam-Status: No, score=-1.8 required=5.0 tests=BAYES_00,DKIM_SIGNED, DKIM_VALID,DKIM_VALID_AU,HEADER_FROM_DIFFERENT_DOMAINS, RCVD_IN_DNSWL_BLOCKED,SPF_HELO_NONE,SPF_PASS,T_SCC_BODY_TEXT_LINE autolearn=no 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 X-Greylist: Sender passed SPF test, not delayed by milter-greylist-4.6.4 (snail.vger.email [0.0.0.0]); Sun, 26 Nov 2023 12:24:30 -0800 (PST) --00000000000009cc68060b13f8a2 Content-Type: text/plain; charset="UTF-8" Content-Transfer-Encoding: quoted-printable On Sun, 19 Nov 2023 at 23:11, kernel test robot wro= te: > > kernel test robot noticed a -2.9% regression of will-it-scale.per_thread_= ops on: > > commit: 0ede61d8589cc2d93aa78230d74ac58b5b8d0244 ("file: convert to SLAB_= TYPESAFE_BY_RCU") Ok, so __fget_light() is one of our more performance-critical things, and that commit ends up making it call a rather more expensive version in __get_file_rcu(), so we have: > 30.90 =C4=85 4% -20.6 10.35 =C4=85 2% perf-profile.self= .cycles-pp.__fget_light > 0.00 +26.5 26.48 perf-profile.self.cycles-pp= .__get_file_rcu and that "20% decrease balanced by 26% increase elsewhere" then directly causes the ~3% regression. I took a look at the code generation, and honestly, I think we're better off just making __fget_files_rcu() have special logic for this all, and not use __get_file_rcu(). The 'fd' case really is special because we need to do that non-speculative pointer access. Because it turns out that we already have to use array_index_nospec() to safely generate that pointer to the fd entry, and once you have to do that "use non-speculative accesses to generate a safe pointer", you might as well just go whole hog. So this takes a different approach, and uses the array_index_mask_nospec() thing that we have exactly to generate that non-speculative mask for these things: /* Mask is a 0 for invalid fd's, ~0 for valid ones */ mask =3D array_index_mask_nospec(fd, fdt->max_fds); and then it does something you can consider either horribly clever, or horribly ugly (this first part is basically just array_index_nospec()): /* fdentry points to the 'fd' offset, or fdt->fd[0] */ fdentry =3D fdt->fd + (fd&mask); and then we can just *unconditionally* do the load - but since we might be loading fd[0] for an invalid case, we need to mask the result too: /* Do the load, then mask any invalid result */ file =3D rcu_dereference_raw(*fdentry); file =3D (void *)(mask & (unsigned long)file); but now we have done everything without any conditionals, and the only conditional is now "did we load NULL" - which includes that "we masked the bad value". Then we just do that atomic_long_inc_not_zero() on the file, and re-check the pointer chain we used. I made files_lookup_fd_raw() do the same thing. The end result is much nicer code generation at least from my quick check. And I assume the regression will be gone, and hopefully even turned into an improvement since this is so hot. Comments? I also looked at that odd OPTIMIZER_HIDE_VAR() that __get_file_rcu() does, and I don't get it. Both things come from volatile accesses, I don't see the point of those games, but I also didn't care, since it's no longer in a critical code path. Christian? NOTE! This patch is not well tested. I verified an earlier version of this, but have been playing with it since, so caveat emptor. IOW, I might have messed up some "trivial cleanup" when prepping for sending it out... Linus --00000000000009cc68060b13f8a2 Content-Type: text/x-patch; charset="US-ASCII"; name="patch.diff" Content-Disposition: attachment; filename="patch.diff" Content-Transfer-Encoding: base64 Content-ID: X-Attachment-Id: f_lpfx3pqa0 IGZzL2ZpbGUuYyAgICAgICAgICAgICAgIHwgNDggKysrKysrKysrKysrKysrKysrKysrKysrKysr KysrLS0tLS0tLS0tLS0tLS0tLS0tCiBpbmNsdWRlL2xpbnV4L2ZkdGFibGUuaCB8IDE1ICsrKysr KysrKystLS0tLQogMiBmaWxlcyBjaGFuZ2VkLCA0MCBpbnNlcnRpb25zKCspLCAyMyBkZWxldGlv bnMoLSkKCmRpZmYgLS1naXQgYS9mcy9maWxlLmMgYi9mcy9maWxlLmMKaW5kZXggNWZiMGIxNDZl NzllLi5jNzRhNmU4Njg3ZDkgMTAwNjQ0Ci0tLSBhL2ZzL2ZpbGUuYworKysgYi9mcy9maWxlLmMK QEAgLTk1OSwzMSArOTU5LDQyIEBAIHN0YXRpYyBpbmxpbmUgc3RydWN0IGZpbGUgKl9fZmdldF9m aWxlc19yY3Uoc3RydWN0IGZpbGVzX3N0cnVjdCAqZmlsZXMsCiAJCXN0cnV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