From: Sebastian Andrzej Siewior <bigeasy@linutronix.de>
To: cgroups@vger.kernel.org, linux-mm@kvack.org
Cc: Andrew Morton <akpm@linux-foundation.org>,
Johannes Weiner <hannes@cmpxchg.org>,
Michal Hocko <mhocko@kernel.org>,
Thomas Gleixner <tglx@linutronix.de>,
Vladimir Davydov <vdavydov.dev@gmail.com>,
Waiman Long <longman@redhat.com>
Subject: [PATCH] mm/memcontrol: Disable on PREEMPT_RT
Date: Tue, 7 Dec 2021 16:52:08 +0100 [thread overview]
Message-ID: <20211207155208.eyre5svucpg7krxe@linutronix.de> (raw)
From: Thomas Gleixner <tglx@linutronix.de>
MEMCG has a few constructs which are not compatible with PREEMPT_RT's
requirements. This includes:
- relying on disabled interrupts from spin_lock_irqsave() locking for
something not related to lock itself (like the per-CPU counter).
- explicitly disabling interrupts and acquiring a spinlock_t based lock
like in memcg_check_events() -> eventfd_signal().
- explicitly disabling interrupts and freeing memory like in
drain_obj_stock() -> obj_cgroup_put() -> obj_cgroup_release() ->
percpu_ref_exit().
Commit 559271146efc ("mm/memcg: optimize user context object stock
access") continued to optimize for the CPU local access which
complicates the PREEMPT_RT locking requirements further.
Disable MEMCG on PREEMPT_RT until the whole situation can be evaluated
again.
[ bigeasy: commit description. ]
Signed-off-by: Thomas Gleixner <tglx@linutronix.de>
Signed-off-by: Sebastian Andrzej Siewior <bigeasy@linutronix.de>
---
init/Kconfig | 1 +
1 file changed, 1 insertion(+)
--- a/init/Kconfig
+++ b/init/Kconfig
@@ -943,6 +943,7 @@ config PAGE_COUNTER
config MEMCG
bool "Memory controller"
+ depends on !PREEMPT_RT
select PAGE_COUNTER
select EVENTFD
help
next reply other threads:[~2021-12-07 15:52 UTC|newest]
Thread overview: 10+ messages / expand[flat|nested] mbox.gz Atom feed top
2021-12-07 15:52 Sebastian Andrzej Siewior [this message]
2021-12-07 16:00 ` Waiman Long
2021-12-07 16:55 ` Johannes Weiner
2021-12-10 15:22 ` Sebastian Andrzej Siewior
2021-12-13 10:08 ` Michal Hocko
2021-12-15 16:47 ` Sebastian Andrzej Siewior
2021-12-15 16:56 ` Michal Hocko
2021-12-15 17:13 ` Sebastian Andrzej Siewior
2021-12-15 18:44 ` Michal Hocko
2021-12-16 7:51 ` Sebastian Andrzej Siewior
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=20211207155208.eyre5svucpg7krxe@linutronix.de \
--to=bigeasy@linutronix.de \
--cc=akpm@linux-foundation.org \
--cc=cgroups@vger.kernel.org \
--cc=hannes@cmpxchg.org \
--cc=linux-mm@kvack.org \
--cc=longman@redhat.com \
--cc=mhocko@kernel.org \
--cc=tglx@linutronix.de \
--cc=vdavydov.dev@gmail.com \
/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