From patchwork Sat Dec 17 18:55:31 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: 34233 Return-Path: Delivered-To: ouuuleilei@gmail.com Received: by 2002:adf:e747:0:0:0:0:0 with SMTP id c7csp1636121wrn; Sat, 17 Dec 2022 10:57:37 -0800 (PST) X-Google-Smtp-Source: AA0mqf6w/5QyxxDC5SNiIFkmwE6T2DdntL3vyNgV4rto+4xe8a3xeEvwIxZT0UQuuJxxwLiwGxj/ X-Received: by 2002:a05:6402:289c:b0:461:bf47:ba43 with SMTP id eg28-20020a056402289c00b00461bf47ba43mr43901076edb.28.1671303456946; Sat, 17 Dec 2022 10:57:36 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1671303456; cv=none; d=google.com; s=arc-20160816; b=rRGjQQzXD86LOghIDNAGJsdfzJSiscSQ5YPSiYXqGpEdY976RGNdZsvdb1Ob656VNC Hjn8qtTVlJDqad2C/Thn0M31JDi4aamlnf//YB7r2UpLtSHGKUBo1yQMw410jy84n8JP LnyhRoADLww/NtzeZo/duPigY192/+r7OHpSOF5f0AcbX/7P8J5j3OrooiRmihBBQ5WB ufdlwNFml2gddlrVf3BASIqHp96PPGEOf9jXS0LeAf+NZE3oDO+HQ+YndlTQwMld4Mod 50t1ttYh849vJm2oLtk2/DJiMH9Rx9bnPuMvLAAAKnT/jTuykA+XZUWyLOSwZqp0CMNL OvRQ== 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=QgGIxxjXPXX5AByY57u1zqywk8dbUi7+e1GgB7Rkt0Y=; b=vR0+8g7cimH49cPUU4ax1EX0jwsT7cbeIkzxgGPzwnsE1t/11Iw19O3EQ+sZXpkgAH KM8XCYLAWA9vPdf+vQCf8oU4OtGlJrlg5iWPPwgTBVIEvTtYm1umM+FCoCnJe5B5qmTT /saa3OEumO5rQgFq/GYHcFJovS8BKw1cjXWY2S1295ajTnJ+pSw0QsdDS5ZPWl+UbjLq sgLYO/k4/EnGX33saQ7hbY5f/xGerb9bHDeYJHzuJGr15NOdK3bc7KzgG7UQ8zjT71Lk 2jOfV4qzNsAkk7yvyC3C0xtbrAxd2TSZflUKkyYyhmMnod/9JyxOkww40JabN//oMfu2 xDew== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@linutronix.de header.s=2020 header.b=pM+NwnzD; dkim=neutral (no key) header.i=@linutronix.de header.s=2020e header.b=NYXUx1ho; 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 c16-20020a50f610000000b0046a7f3ddb8csi5338669edn.523.2022.12.17.10.57.13; Sat, 17 Dec 2022 10:57:36 -0800 (PST) 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=pM+NwnzD; dkim=neutral (no key) header.i=@linutronix.de header.s=2020e header.b=NYXUx1ho; 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 S230282AbiLQS4d (ORCPT + 99 others); Sat, 17 Dec 2022 13:56:33 -0500 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:40796 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S230031AbiLQSzi (ORCPT ); Sat, 17 Dec 2022 13:55:38 -0500 Received: from galois.linutronix.de (Galois.linutronix.de [IPv6:2a0a:51c0:0:12e:550::1]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id DB43310FC9; Sat, 17 Dec 2022 10:55:36 -0800 (PST) Date: Sat, 17 Dec 2022 18:55:31 -0000 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=linutronix.de; s=2020; t=1671303332; 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=QgGIxxjXPXX5AByY57u1zqywk8dbUi7+e1GgB7Rkt0Y=; b=pM+NwnzDN7Jtp0hFFriAUZibIiv0Hf2d8PSVhq0kxwEvJ2DiZ4bsGPNyW9A8XAY2snA/mW H5jC7JBeiOUEqjk7QmvFbbnHgs5eXxuistcc0YGvyOfQSQKtIl62gAjagJ+7++mLSF+EfL GVV9AKl4lA9FH/K+RZNyAq9+dDHGTmxLmNOQRQsto4vzMvi1Qdzi0SE5o2sGGEGJ/+HKfd oezdprsu0nObIeb+/YrIhAroe3jTNdjsDkuDPirwkC8R2+PqesMLeo8cC+qODGxfbeJsve FGxjpLmhP7esdQQmkUUdNnTiPCIW4Ci/KNBgIceH3vBI8q8Oq0UIlkPb0kxP0A== DKIM-Signature: v=1; a=ed25519-sha256; c=relaxed/relaxed; d=linutronix.de; s=2020e; t=1671303332; 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=QgGIxxjXPXX5AByY57u1zqywk8dbUi7+e1GgB7Rkt0Y=; b=NYXUx1hoQKOjyQpksuBJr0IE29LpapmWP21Udbkj3IC7HYzXUL79nL2Cat9qJxsOoZn6Wx IG+PX1F+hIuxHKCg== 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: <167130333179.4906.5607292265365831847.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?1752488693595976976?= X-GMAIL-MSGID: =?utf-8?q?1752488693595976976?= The following commit has been merged into the x86/mm branch of tip: Commit-ID: eb780dcae02d5a71e6979aa7b8c708dea8597adf Gitweb: https://git.kernel.org/tip/eb780dcae02d5a71e6979aa7b8c708dea8597adf Author: Peter Zijlstra AuthorDate: Fri, 21 Oct 2022 13:47:29 +02:00 Committer: Dave Hansen CommitterDate: Thu, 15 Dec 2022 10:37:27 -08: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)) {