mm: Remove pointless barrier() after pmdp_get_lockless()
authorPeter Zijlstra <peterz@infradead.org>
Fri, 21 Oct 2022 11:47:29 +0000 (13:47 +0200)
committerDave Hansen <dave.hansen@linux.intel.com>
Thu, 15 Dec 2022 18:37:27 +0000 (10:37 -0800)
pmdp_get_lockless() should itself imply any ordering required.

Signed-off-by: Peter Zijlstra (Intel) <peterz@infradead.org>
Link: https://lkml.kernel.org/r/20221022114425.298833095%40infradead.org
mm/hmm.c
mm/vmscan.c

index 39cf50d..601a99c 100644 (file)
--- 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;
 
index 88ef873..4936a88 100644 (file)
@@ -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)) {