From patchwork Wed Nov 2 09:12:32 2022 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: tip-bot2 for Thomas Gleixner X-Patchwork-Id: 14121 Return-Path: Delivered-To: ouuuleilei@gmail.com Received: by 2002:a5d:6687:0:0:0:0:0 with SMTP id l7csp3503701wru; Wed, 2 Nov 2022 02:13:54 -0700 (PDT) X-Google-Smtp-Source: AMsMyM7D3jDxekT/ebqIC/GVD2PWLT/oZ+O36HoFLH4bvdTdwyGiIhZcyDpoq63EGtg7dHE9phHE X-Received: by 2002:aa7:942d:0:b0:56c:6e8c:6ff6 with SMTP id y13-20020aa7942d000000b0056c6e8c6ff6mr24001033pfo.67.1667380434331; Wed, 02 Nov 2022 02:13:54 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1667380434; cv=none; d=google.com; s=arc-20160816; b=fG7Qc7nfAZeMxIw2ekEqLjjNJ0gxCvoN024OrJiZQDTFI/VSF15wjsMkG950bs7y7a LLkHvEshZwO+xgTcsXikQo6n4o94K9hivLTTbTPzmGiGxxRtn+/enwHqsHmfnR29aICT sdiA8ejTG84L3DBOZCQDmcnB9o6J8mfnEFuB+9xe1e6vin3qpgkDhBNQYlBfCdcA2g4o wcTNjsWIeV5seuOhneh4sOdWko8cuFR68en8gt+deupqX7sh6pnH1GO7SxplEgSRfanV oRGCyTC9gQw0rrodZ/Y85kq9B4OA60GbIfsFu0/BvHyy0tkU/r/6Y1KfIvW7KcfuL4jS m5LA== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:content-transfer-encoding:robot-unsubscribe :robot-id:message-id:mime-version:cc:subject:to:reply-to:sender:from :dkim-signature:dkim-signature:date; bh=KRprBJxpWWF4vJhuz+AXEAq0eTkLDsVJbi3ANVWEyBA=; b=RpKx6zVae6J5g+EoU6SmUkI7IVt/zc5lQx5iqL0oz3JvBaSAKO2hCSCbWA8tAJqWSv n2haM1EAMgrZD2e/tSGaVsSJgd7q7NO9rpmhpnEFMn1hFHWzyOrmQGSdSQPR/WB1aFnT OMqU8hcVJH3GkIWmAegdKl3csld/K1dLl/dHkVw2v7yrR511L+79xMDKIdX4Vk5REOu+ GBpqO9lQSuxe2kWi8P3HjplFQTEW4wPoFKv1mTqOAobf/lHexo007VXO7g14szN2gUeU LjNioLbwrxuf1+dhVgstSx1n17IqDUne5sEBWCLrZ1CTp3OBRksaYpvDFmr1WI2mAC09 M6Hg== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@linutronix.de header.s=2020 header.b=FUlg9kH+; dkim=neutral (no key) header.i=@linutronix.de header.s=2020e; 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=NONE sp=QUARANTINE dis=NONE) header.from=linutronix.de Received: from out1.vger.email (out1.vger.email. [2620:137:e000::1:20]) by mx.google.com with ESMTP id o12-20020a655bcc000000b0046f75bc53d0si16247319pgr.241.2022.11.02.02.13.41; Wed, 02 Nov 2022 02:13:54 -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=@linutronix.de header.s=2020 header.b=FUlg9kH+; dkim=neutral (no key) header.i=@linutronix.de header.s=2020e; 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=NONE sp=QUARANTINE dis=NONE) header.from=linutronix.de Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S231438AbiKBJN2 (ORCPT + 99 others); Wed, 2 Nov 2022 05:13:28 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:43488 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S231295AbiKBJMi (ORCPT ); Wed, 2 Nov 2022 05:12:38 -0400 Received: from galois.linutronix.de (Galois.linutronix.de [IPv6:2a0a:51c0:0:12e:550::1]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 90FB7286E4; Wed, 2 Nov 2022 02:12:37 -0700 (PDT) Date: Wed, 02 Nov 2022 09:12:32 -0000 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=linutronix.de; s=2020; t=1667380354; h=from:from:sender:sender:reply-to:reply-to:subject:subject:date:date: message-id:message-id:to:to:cc:cc:mime-version:mime-version: content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=KRprBJxpWWF4vJhuz+AXEAq0eTkLDsVJbi3ANVWEyBA=; b=FUlg9kH+jVQvECTV8wNQD08ERj7o8oq0qTHwXT/fVvjmKZ+MM0NfNuIdQV6MzlNJ7b16zF 3Sv+Aafj8l/9J8ai9vtVY1ssxcysfeM+Z2sgF9rBjXXoW8Ii8D2zctwDjb7f634uEwo8Yx R6USifFoDOmAjKno52SF1hr7pEWB0fY9wzb7wYnwCXcwV/4jiBNnc2Z8nXnLSvRj/VJj7P UTLVJNn/9Bahn+FgBHplqAQk3/CSZ3oHGStai6BPwa0/aF9z+IzXzyOaCiNrty11zqQ8p2 U/QadX00z3DE6ebVyKWv7ttBzhKE04rLWrmhiTlMZO0Iqk312aviYw9Ic8ZpHg== DKIM-Signature: v=1; a=ed25519-sha256; c=relaxed/relaxed; d=linutronix.de; s=2020e; t=1667380354; h=from:from:sender:sender:reply-to:reply-to:subject:subject:date:date: message-id:message-id:to:to:cc:cc:mime-version:mime-version: content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=KRprBJxpWWF4vJhuz+AXEAq0eTkLDsVJbi3ANVWEyBA=; b=vEzti0jCBKQbkJxdGJ3a3fiY46RhS5KfcXjtkpmgGteTYT1wvQ0ReEocEU+WitPJXgzX2z CzKHrmS+XMGakyBg== From: "tip-bot2 for Peter Zijlstra" Sender: tip-bot2@linutronix.de Reply-to: linux-kernel@vger.kernel.org To: linux-tip-commits@vger.kernel.org Subject: [tip: x86/mm] mm: Remove pointless barrier() after pmdp_get_lockless() Cc: "Peter Zijlstra (Intel)" , x86@kernel.org, linux-kernel@vger.kernel.org MIME-Version: 1.0 Message-ID: <166738035298.7716.13942934814030999868.tip-bot2@tip-bot2> Robot-ID: Robot-Unsubscribe: Contact to get blacklisted from these emails X-Spam-Status: No, score=-4.4 required=5.0 tests=BAYES_00,DKIM_SIGNED, DKIM_VALID,DKIM_VALID_AU,DKIM_VALID_EF,RCVD_IN_DNSWL_MED,SPF_HELO_NONE, SPF_PASS 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 X-getmail-retrieved-from-mailbox: =?utf-8?q?INBOX?= X-GMAIL-THRID: =?utf-8?q?1748375106205263815?= X-GMAIL-MSGID: =?utf-8?q?1748375106205263815?= The following commit has been merged into the x86/mm branch of tip: Commit-ID: 0aa82c4e78ca59a2246a28112adbee7d0a692f27 Gitweb: https://git.kernel.org/tip/0aa82c4e78ca59a2246a28112adbee7d0a692f27 Author: Peter Zijlstra AuthorDate: Fri, 21 Oct 2022 13:47:29 +02:00 Committer: Peter Zijlstra CommitterDate: Tue, 01 Nov 2022 13:44:05 +01:00 mm: Remove pointless barrier() after pmdp_get_lockless() pmdp_get_lockless() should itself imply any ordering required. Signed-off-by: Peter Zijlstra (Intel) Link: https://lkml.kernel.org/r/20221022114425.298833095%40infradead.org --- mm/hmm.c | 1 - mm/vmscan.c | 3 --- 2 files changed, 4 deletions(-) diff --git a/mm/hmm.c b/mm/hmm.c index 39cf50d..601a99c 100644 --- a/mm/hmm.c +++ b/mm/hmm.c @@ -362,7 +362,6 @@ again: * values. */ pmd = pmdp_get_lockless(pmdp); - barrier(); if (!pmd_devmap(pmd) && !pmd_trans_huge(pmd)) goto again; diff --git a/mm/vmscan.c b/mm/vmscan.c index 88ef873..4936a88 100644 --- a/mm/vmscan.c +++ b/mm/vmscan.c @@ -4041,9 +4041,6 @@ restart: for (i = pmd_index(start), addr = start; addr != end; i++, addr = next) { pmd_t val = pmdp_get_lockless(pmd + i); - /* for pmdp_get_lockless() */ - barrier(); - next = pmd_addr_end(addr, end); if (!pmd_present(val) || is_huge_zero_pmd(val)) {