* + mm-page_alloc-remove-redundant-read_once.patch added to mm-new branch
@ 2025-04-03 2:34 Andrew Morton
0 siblings, 0 replies; only message in thread
From: Andrew Morton @ 2025-04-03 2:34 UTC (permalink / raw)
To: mm-commits, zhengqi.arch, ying.huang, vishal.moola, songmuchun,
pankaj.gupta, osalvador, anshuman.khandual, liusongtang, akpm
The patch titled
Subject: mm: page_alloc: remove redundant READ_ONCE
has been added to the -mm mm-new branch. Its filename is
mm-page_alloc-remove-redundant-read_once.patch
This patch will shortly appear at
https://git.kernel.org/pub/scm/linux/kernel/git/akpm/25-new.git/tree/patches/mm-page_alloc-remove-redundant-read_once.patch
This patch will later appear in the mm-new branch at
git://git.kernel.org/pub/scm/linux/kernel/git/akpm/mm
Before you just go and hit "reply", please:
a) Consider who else should be cc'ed
b) Prefer to cc a suitable mailing list as well
c) Ideally: find the original patch on the mailing list and do a
reply-to-all to that, adding suitable additional cc's
*** Remember to use Documentation/process/submit-checklist.rst when testing your code ***
The -mm tree is included into linux-next via the mm-everything
branch at git://git.kernel.org/pub/scm/linux/kernel/git/akpm/mm
and is updated there every 2-3 working days
------------------------------------------------------
From: Songtang Liu <liusongtang@bytedance.com>
Subject: mm: page_alloc: remove redundant READ_ONCE
Date: Wed, 2 Apr 2025 03:41:16 -0400
In the current code, batch is a local variable, and it cannot be
concurrently modified. It's unnecessary to use READ_ONCE here, so remove
it.
Link: https://lkml.kernel.org/r/CAA=HWd1kn01ym8YuVFuAqK2Ggq3itEGkqX8T6eCXs_C7tiv-Jw@mail.gmail.com
Fixes: 51a755c56dc0 ("mm: tune PCP high automatically")
Signed-off-by: Songtang Liu <liusongtang@bytedance.com>
Reviewed-by: Qi Zheng <zhengqi.arch@bytedance.com>
Reviewed-by: Huang Ying <ying.huang@linux.alibaba.com>
Reviewed-by: Anshuman Khandual <anshuman.khandual@arm.com>
Reviewed-by: Pankaj Gupta <pankaj.gupta@amd.com>
Reviewed-by: Oscar Salvador <osalvador@suse.de>
Reviewed-by: Vishal Moola (Oracle) <vishal.moola@gmail.com>
Cc: Muchun Song <songmuchun@bytedance.com>
Signed-off-by: Andrew Morton <akpm@linux-foundation.org>
---
mm/page_alloc.c | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
--- a/mm/page_alloc.c~mm-page_alloc-remove-redundant-read_once
+++ a/mm/page_alloc.c
@@ -2634,7 +2634,7 @@ static void free_frozen_page_commit(stru
free_high = (pcp->free_count >= batch &&
(pcp->flags & PCPF_PREV_FREE_HIGH_ORDER) &&
(!(pcp->flags & PCPF_FREE_HIGH_BATCH) ||
- pcp->count >= READ_ONCE(batch)));
+ pcp->count >= batch));
pcp->flags |= PCPF_PREV_FREE_HIGH_ORDER;
} else if (pcp->flags & PCPF_PREV_FREE_HIGH_ORDER) {
pcp->flags &= ~PCPF_PREV_FREE_HIGH_ORDER;
_
Patches currently in -mm which might be from liusongtang@bytedance.com are
mm-page_alloc-remove-redundant-read_once.patch
^ permalink raw reply [flat|nested] only message in thread
only message in thread, other threads:[~2025-04-03 2:34 UTC | newest]
Thread overview: (only message) (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2025-04-03 2:34 + mm-page_alloc-remove-redundant-read_once.patch added to mm-new branch Andrew Morton
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.