From patchwork Tue Feb 13 20:42:20 2024 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Philip Cox X-Patchwork-Id: 1898488 Return-Path: X-Original-To: incoming@patchwork.ozlabs.org Delivered-To: patchwork-incoming@legolas.ozlabs.org Authentication-Results: legolas.ozlabs.org; spf=pass (sender SPF authorized) smtp.mailfrom=lists.ubuntu.com (client-ip=185.125.189.65; helo=lists.ubuntu.com; envelope-from=kernel-team-bounces@lists.ubuntu.com; receiver=patchwork.ozlabs.org) Received: from lists.ubuntu.com (lists.ubuntu.com [185.125.189.65]) (using TLSv1.2 with cipher ECDHE-ECDSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by legolas.ozlabs.org (Postfix) with ESMTPS id 4TZCxW0WNkz23hT for ; Wed, 14 Feb 2024 07:44:46 +1100 (AEDT) Received: from localhost ([127.0.0.1] helo=lists.ubuntu.com) by lists.ubuntu.com with esmtp (Exim 4.86_2) (envelope-from ) id 1rZzdq-0008SL-SL; Tue, 13 Feb 2024 20:44:35 +0000 Received: from smtp-relay-internal-0.internal ([10.131.114.225] helo=smtp-relay-internal-0.canonical.com) by lists.ubuntu.com with esmtps (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.86_2) (envelope-from ) id 1rZzdl-0008Ru-OJ for kernel-team@lists.ubuntu.com; Tue, 13 Feb 2024 20:44:30 +0000 Received: from mail-qk1-f199.google.com (mail-qk1-f199.google.com [209.85.222.199]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (2048 bits) server-digest SHA256) (No client certificate requested) by smtp-relay-internal-0.canonical.com (Postfix) with ESMTPS id 94B8B3FA81 for ; Tue, 13 Feb 2024 20:44:29 +0000 (UTC) Received: by mail-qk1-f199.google.com with SMTP id af79cd13be357-7816bea8d28so27920485a.0 for ; Tue, 13 Feb 2024 12:44:29 -0800 (PST) X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1707857066; x=1708461866; h=content-transfer-encoding:mime-version:message-id:date:subject:cc :to:from:x-gm-message-state:from:to:cc:subject:date:message-id :reply-to; bh=lSiVNnZEJEbKgyLDAx2FfvPARSSun3evutY5wy95OWE=; b=A+/3nanUsHjs5FxBIOtsPyAMQi9xtRiEx6hELIdlUi78wg2/mfPZDdvn4RHT1gS9bW xFEeC86KYILEviea6s2Q1ZoajR00IeIsuCz41A02aKUgHNRlrwnqCU4knbKzAvn01iAo Jgocryxqw5l0bYuuWlv3FAUFvIqI+dMTk7M7tWap9YVbDD1z0WGUrmwpH3N5G2TU4218 8HZCXuLK747Pa2pXY/l2wG57bIAAAd6P9NU3MaoOyVwk6CLgV0ohNDZ21Cy3vEUrDhn8 53IdWmJGK0FeYLzGek9j58joWYsCLWww4mvWDkz+JSm1H7qanCmKgVNly4EpFA6cVO80 KBNQ== X-Gm-Message-State: AOJu0YwbI6QxvCXXrts2CbiC8VPSzKJboZYRZPlFVndDRzErzDVOWwaB PX6WXh5pYWtil3px7Lj1q/Y4NRTdjVHK9kS1OQRMBv3vJy5+J7L2U1BpkaefBYvs4cI/m7pou5j +4BPw414Td1dx/9JT42UnqmMhp9mecPp1q6P+SVVXhElUBy1I0XD0CKUaooMqAec+waogng+A8z qA08hCGt/7Og== X-Received: by 2002:a05:620a:458b:b0:785:d4a1:2a38 with SMTP id bp11-20020a05620a458b00b00785d4a12a38mr1118299qkb.28.1707857066061; Tue, 13 Feb 2024 12:44:26 -0800 (PST) X-Google-Smtp-Source: AGHT+IEFFIxXN1gIfnlFp/La5W3zPygbO9VV1giKUfDr9TNucynXl+gHKuStCz1Ab4eLN2cd0TSnOQ== X-Received: by 2002:a05:620a:458b:b0:785:d4a1:2a38 with SMTP id bp11-20020a05620a458b00b00785d4a12a38mr1118279qkb.28.1707857065727; Tue, 13 Feb 2024 12:44:25 -0800 (PST) Received: from cox.home.arpa ([108.175.227.176]) by smtp.gmail.com with ESMTPSA id x23-20020ae9f817000000b00785a0416305sm3215401qkh.56.2024.02.13.12.44.23 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Tue, 13 Feb 2024 12:44:23 -0800 (PST) From: Philip Cox To: kernel-team@lists.ubuntu.com Subject: [SRU][jammy][PATCH 0/1] performance: address_space: add padding for i_map and i_mmap_rwsem to mitigate a false sharing Date: Tue, 13 Feb 2024 15:42:20 -0500 Message-Id: <20240213204221.661294-1-philip.cox@canonical.com> X-Mailer: git-send-email 2.34.1 MIME-Version: 1.0 X-BeenThere: kernel-team@lists.ubuntu.com X-Mailman-Version: 2.1.20 Precedence: list List-Id: Kernel team discussions List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: kernel-team-bounces@lists.ubuntu.com Sender: "kernel-team" BugLink: https://bugs.launchpad.net/bugs/2053069 SRU Justification: [Impact] In high core count systems such as Intel Sapphire Rapids (with a 112C/224T count) this this change improvesgeekbench performance by ~5.3% due to moving the elements in the address_space struct. [Fix] by moving i_mmap_rwsema, vma_interval_tree_remove is no longer in cacheline 0 which improves the performance. [Test Plan] I've tested this change, as has Intel. This change has also been upstreamed for some time. [Where problems could occur] The risk for regression is fairly low, as we are just changing the layout of a stuct to change where members land in the cache. Acked-by: Ian May Acked-by: Stefan Bader Acked-by: Andrei Gherzan --- Zhu, Lipeng (1): fs/address_space: add alignment padding for i_map and i_mmap_rwsem to mitigate a false sharing. include/linux/fs.h | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-)