From: Stephen Rothwell <sfr@canb•auug.org.au>
To: Tejun Heo <tj@kernel•org>, Andrew Morton <akpm@linux-foundation•org>
Cc: JP Kobryn <inwardvessel@gmail•com>,
Linux Kernel Mailing List <linux-kernel@vger•kernel.org>,
Linux Next Mailing List <linux-next@vger•kernel.org>,
Lorenzo Stoakes <lorenzo.stoakes@oracle•com>,
Shakeel Butt <shakeel.butt@linux•dev>
Subject: linux-next: manual merge of the cgroup tree with the mm-stable, mm-unstable trees
Date: Thu, 22 May 2025 17:35:18 +1000 [thread overview]
Message-ID: <20250522173518.68d11f41@canb.auug.org.au> (raw)
[-- Attachment #1: Type: text/plain, Size: 2098 bytes --]
Hi all,
Today's linux-next merge of the cgroup tree got a conflict in:
mm/memcontrol.c
between commits:
60cada258dfe ("memcg: optimize memcg_rstat_updated")
ff9798e05d33 ("memcg: memcg_rstat_updated re-entrant safe against irqs")
from the mm-stable tree,
dc1bc55490f4 ("memcg: make memcg_rstat_updated nmi safe")
from the mm-unstable tree and commit:
a97915559f5c ("cgroup: change rstat function signatures from cgroup-based to css-based")
from the cgroup tree.
I fixed it up (see below) and can carry the fix as necessary. This
is now fixed as far as linux-next is concerned, but any non trivial
conflicts should be mentioned to your upstream maintainer when your tree
is submitted for merging. You may also want to consider cooperating
with the maintainer of the conflicting tree to minimise any particularly
complex conflicts.
--
Cheers,
Stephen Rothwell
diff --cc mm/memcontrol.c
index 4e9771e6e340,fde0934e2837..000000000000
--- a/mm/memcontrol.c
+++ b/mm/memcontrol.c
@@@ -573,22 -582,11 +573,22 @@@ static inline void memcg_rstat_updated(
if (!val)
return;
- css_rstat_updated(&memcg->css, cpu);
- statc = this_cpu_ptr(memcg->vmstats_percpu);
- for (; statc; statc = statc->parent) {
- stats_updates = READ_ONCE(statc->stats_updates) + abs(val);
- WRITE_ONCE(statc->stats_updates, stats_updates);
+ /* TODO: add to cgroup update tree once it is nmi-safe. */
+ if (!in_nmi())
- cgroup_rstat_updated(memcg->css.cgroup, cpu);
++ css_rstat_updated(&memcg->css, cpu);
+ statc_pcpu = memcg->vmstats_percpu;
+ for (; statc_pcpu; statc_pcpu = statc->parent_pcpu) {
+ statc = this_cpu_ptr(statc_pcpu);
+ /*
+ * If @memcg is already flushable then all its ancestors are
+ * flushable as well and also there is no need to increase
+ * stats_updates.
+ */
+ if (memcg_vmstats_needs_flush(statc->vmstats))
+ break;
+
+ stats_updates = this_cpu_add_return(statc_pcpu->stats_updates,
+ abs(val));
if (stats_updates < MEMCG_CHARGE_BATCH)
continue;
[-- Attachment #2: OpenPGP digital signature --]
[-- Type: application/pgp-signature, Size: 488 bytes --]
next reply other threads:[~2025-05-22 7:35 UTC|newest]
Thread overview: 2+ messages / expand[flat|nested] mbox.gz Atom feed top
2025-05-22 7:35 Stephen Rothwell [this message]
-- strict thread matches above, loose matches on Subject: below --
2025-05-21 7:49 linux-next: manual merge of the cgroup tree with the mm-stable, mm-unstable trees Stephen Rothwell
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=20250522173518.68d11f41@canb.auug.org.au \
--to=sfr@canb$(echo .)auug.org.au \
--cc=akpm@linux-foundation$(echo .)org \
--cc=inwardvessel@gmail$(echo .)com \
--cc=linux-kernel@vger$(echo .)kernel.org \
--cc=linux-next@vger$(echo .)kernel.org \
--cc=lorenzo.stoakes@oracle$(echo .)com \
--cc=shakeel.butt@linux$(echo .)dev \
--cc=tj@kernel$(echo .)org \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox