From: Sebastian Andrzej Siewior <bigeasy@linutronix.de>
To: "Vlastimil Babka (SUSE)" <vbabka@kernel.org>
Cc: Shakeel Butt <shakeel.butt@linux.dev>,
Andrew Morton <akpm@linux-foundation.org>,
Johannes Weiner <hannes@cmpxchg.org>,
Michal Hocko <mhocko@kernel.org>,
Roman Gushchin <roman.gushchin@linux.dev>,
Muchun Song <muchun.song@linux.dev>,
linux-mm@kvack.org, linux-kernel@vger.kernel.org,
Thomas Gleixner <tglx@linutronix.de>
Subject: Re: [PATCH v2] memcg: simple cleanup of stats update functions
Date: Tue, 28 May 2024 12:19:06 +0200 [thread overview]
Message-ID: <20240528101906.ts4NjHvU@linutronix.de> (raw)
In-Reply-To: <69c0e008-ddde-4a38-b856-b765dc2b9745@kernel.org>
On 2024-05-28 10:10:50 [+0200], Vlastimil Babka (SUSE) wrote:
> > I don't mind sending a patch. I'm just not sure if the lock is the right
> > thing to do. However it should ensure that interrupts are disabled on
> > !RT for the sake of the counter update (if observed in IRQ context).
>
> Looks like some places there use VM_WARN_ON_IRQS_ENABLED() that's turned off
> for PREEMPT_RT, so maybe that's what should replace the current
> lockdep_assert, perhaps together with
> lockdep_assert_held(this_cpu_ptr(&memcg_stock.stock_lock));
>
> But also __mod_memcg_lruvec_state() already has that VM_WARN_ON.
This "VM_WARN_ON_IRQS_ENABLED" is the initial assert for "interrupts
must be disabled while change the counter".
You want to replace it with lockdep? Part of its requirement was that it
yells with lockdep disabled.
Currently I am leaning towards removing the
lockdep_assert_irqs_disabled() from __mod_objcg_mlstate(). Nothing but
the counter need it and they have their own check. So?
Sebastian
next prev parent reply other threads:[~2024-05-28 10:19 UTC|newest]
Thread overview: 8+ messages / expand[flat|nested] mbox.gz Atom feed top
2024-04-20 23:25 Shakeel Butt
2024-05-27 15:22 ` Sebastian Andrzej Siewior
2024-05-27 16:34 ` Vlastimil Babka (SUSE)
2024-05-28 5:16 ` Shakeel Butt
2024-05-28 7:56 ` Sebastian Andrzej Siewior
2024-05-28 8:10 ` Vlastimil Babka (SUSE)
2024-05-28 10:19 ` Sebastian Andrzej Siewior [this message]
2024-05-28 12:17 ` Vlastimil Babka (SUSE)
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=20240528101906.ts4NjHvU@linutronix.de \
--to=bigeasy@linutronix.de \
--cc=akpm@linux-foundation.org \
--cc=hannes@cmpxchg.org \
--cc=linux-kernel@vger.kernel.org \
--cc=linux-mm@kvack.org \
--cc=mhocko@kernel.org \
--cc=muchun.song@linux.dev \
--cc=roman.gushchin@linux.dev \
--cc=shakeel.butt@linux.dev \
--cc=tglx@linutronix.de \
--cc=vbabka@kernel.org \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
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