From patchwork Thu Nov 3 21:15:44 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: 15209 Return-Path: Delivered-To: ouuuleilei@gmail.com Received: by 2002:a05:7300:a40e:b0:83:7221:86ba with SMTP id ck14csp1117176dyb; Thu, 3 Nov 2022 14:18:06 -0700 (PDT) X-Google-Smtp-Source: AMsMyM4KS9+3VTVZYSb710iiasyA4ppcdrpDddHzjkv2NV+9OiMwGU+ASqr1v57dreNZG/CTPeOE X-Received: by 2002:a17:906:cc4d:b0:7ad:b598:9a53 with SMTP id mm13-20020a170906cc4d00b007adb5989a53mr29028947ejb.480.1667510286155; Thu, 03 Nov 2022 14:18:06 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1667510286; cv=none; d=google.com; s=arc-20160816; b=RJmFyLWckFbF042yw+RB5F2xPThuBx55HisV9NjPtxV9mpnqRcRDWGCb13K2pzQ9FI 25dJk5vkeXOlwiN6BOzrMVrEYuX8RrhPsvgxHDDU6mDBKZpzDfYzFAqTfgqMx5Cbv8DE eh8dniL+EU9R2TDJl19b5cYDRJ258zbn348NUgoXWFLq3xNQftcRyNcQgfVw0GP0ArNP kunjrOncHCDthjCVLyZ4551hBNgaTMHCA2xx/I4tO8tYpPuOrd0HU87tq3JbQxdqMdgM H92pGH/1c7oaQGFXLYCGdCaurNoCjzi19Z5pXuwQCEcoGeo1BCen0GedB/2Eat5SEBip XJ7A== 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=n8iwlY/9D6Q3PCMrnKUA9vSeNxQa33Z5wQi0OlsgdQA=; b=geGKa95QR6rYWfpWAEkWtVrUMjwpNFvvk5It0GyDPpFRweMlGhjRBOBu/Qn2Say3f0 s2s1LLE2+7HuMHma2z3+qMyPk/LEOyA+MC937UYrtyNAaw9sCicyY0TRfR3mbQBdoxCB TQJnKIp1ykLdiLIZMbC7FdDTvdULX0kTzFEe9KK4/FYZWv1F0HyeYy0st6ibpPFUX0rI fcOfN2QbRqBzsPwvD5SlEG3gtdHecDnHAUSVdXhIhM14KXyf2+1vpQmb12afRqFaOM+m gd3EQUa2LOxIxRaM/ecKbJdLPa5dg58U1kjzdRblZT62A15R6LEdPWWLVKxCn1IT1z8W WNyQ== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@linutronix.de header.s=2020 header.b=puiLfx9p; dkim=neutral (no key) header.i=@linutronix.de header.b=3YjSfFIO; 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 h4-20020a056402280400b0046168e49e6fsi3484070ede.80.2022.11.03.14.17.42; Thu, 03 Nov 2022 14:18:06 -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=puiLfx9p; dkim=neutral (no key) header.i=@linutronix.de header.b=3YjSfFIO; 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 S231134AbiKCVPx (ORCPT + 99 others); Thu, 3 Nov 2022 17:15:53 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:38320 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S230131AbiKCVPt (ORCPT ); Thu, 3 Nov 2022 17:15:49 -0400 Received: from galois.linutronix.de (Galois.linutronix.de [IPv6:2a0a:51c0:0:12e:550::1]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 75FC117409; Thu, 3 Nov 2022 14:15:47 -0700 (PDT) Date: Thu, 03 Nov 2022 21:15:44 -0000 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=linutronix.de; s=2020; t=1667510146; 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=n8iwlY/9D6Q3PCMrnKUA9vSeNxQa33Z5wQi0OlsgdQA=; b=puiLfx9pOXvD/adNN/7BVtwu1ut7e1n00isJh+e2NPhNeKqbYczTfjMNcKf0snjiqXW9Qh TYsxGTmKNwFC/RzaWAuJWzsT6AuYE5+eFo7+idk2/aJEGNxZbCIrsI7ec0CqwuOgmNv0Tn G4lvqpeAKak5EWeFzJ7IUPrSuGcB9lpyqbz2B2npEcTM0XdzPB98XR+S9sPcFHXXwk5Kyt JA2KdyqFMWy0A2KF6Mygi7qmSC/xvhCZyvrhjOUYYN6FTEX/2a8oXrwo+nFMNucoW0OCU5 RDZw+E/m4XWXjgS7HOyKL37JCQI795rmRm9rqeO68IgOdKfaf1OWWym08OKhRA== DKIM-Signature: v=1; a=ed25519-sha256; c=relaxed/relaxed; d=linutronix.de; s=2020e; t=1667510146; 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=n8iwlY/9D6Q3PCMrnKUA9vSeNxQa33Z5wQi0OlsgdQA=; b=3YjSfFIOEZ4tu5Q80bWOnHqJ0TjXe7KmpP5REuT+caPyko/KIrifPOL6pJJoLphuL2QhGo vTwPn3ohae2lNcDA== 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: <166751014458.6127.2105990647281614159.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?1748511265900904571?= X-GMAIL-MSGID: =?utf-8?q?1748511265900904571?= The following commit has been merged into the x86/mm branch of tip: Commit-ID: 28fec83baabe2b72fa6ebbc178e979917f97c2f6 Gitweb: https://git.kernel.org/tip/28fec83baabe2b72fa6ebbc178e979917f97c2f6 Author: Peter Zijlstra AuthorDate: Fri, 21 Oct 2022 13:47:29 +02:00 Committer: Peter Zijlstra CommitterDate: Thu, 03 Nov 2022 22:04:29 +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)) {