public inbox for linux-next@vger.kernel.org 
 help / color / mirror / Atom feed
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>,
	Shakeel Butt <shakeel.butt@linux•dev>
Subject: linux-next: manual merge of the cgroup tree with the mm-stable, mm-unstable trees
Date: Wed, 21 May 2025 17:49:58 +1000	[thread overview]
Message-ID: <20250521174958.0b7354da@canb.auug.org.au> (raw)

[-- Attachment #1: Type: text/plain, Size: 1916 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")

from the mm-stable tree and

  d826d981051a ("memcg: memcg_rstat_updated re-entrant safe against irqs")

from the mm-unstable trees 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 e936f6651f47,fde0934e2837..000000000000
--- a/mm/memcontrol.c
+++ b/mm/memcontrol.c
@@@ -573,20 -582,11 +573,20 @@@ static inline void memcg_rstat_updated(
  	if (!val)
  		return;
  
- 	cgroup_rstat_updated(memcg->css.cgroup, cpu);
+ 	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);
 +	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 --]

             reply	other threads:[~2025-05-21  7:50 UTC|newest]

Thread overview: 2+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2025-05-21  7:49 Stephen Rothwell [this message]
  -- strict thread matches above, loose matches on Subject: below --
2025-05-22  7:35 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=20250521174958.0b7354da@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=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