All of lore.kernel.org
 help / color / mirror / Atom feed
* [PATCH] mm/memcontrol: Disable on PREEMPT_RT
@ 2021-12-07 15:52 ` Sebastian Andrzej Siewior
  0 siblings, 0 replies; 20+ messages in thread
From: Sebastian Andrzej Siewior @ 2021-12-07 15:52 UTC (permalink / raw)
  To: cgroups-u79uwXL29TY76Z2rM5mHXA, linux-mm-Bw31MaZKKs3YtjvyW6yDsg
  Cc: Andrew Morton, Johannes Weiner, Michal Hocko, Thomas Gleixner,
	Vladimir Davydov, Waiman Long

From: Thomas Gleixner <tglx-hfZtesqFncYOwBW4kG4KsQ@public.gmane.org>

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-hfZtesqFncYOwBW4kG4KsQ@public.gmane.org>
Signed-off-by: Sebastian Andrzej Siewior <bigeasy-hfZtesqFncYOwBW4kG4KsQ@public.gmane.org>
---
 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

^ permalink raw reply	[flat|nested] 20+ messages in thread

end of thread, other threads:[~2021-12-16  7:52 UTC | newest]

Thread overview: 20+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2021-12-07 15:52 [PATCH] mm/memcontrol: Disable on PREEMPT_RT Sebastian Andrzej Siewior
2021-12-07 15:52 ` Sebastian Andrzej Siewior
     [not found] ` <20211207155208.eyre5svucpg7krxe-hfZtesqFncYOwBW4kG4KsQ@public.gmane.org>
2021-12-07 16:00   ` Waiman Long
2021-12-07 16:00     ` Waiman Long
2021-12-07 16:55   ` Johannes Weiner
2021-12-07 16:55     ` Johannes Weiner
     [not found]     ` <Ya+SCkLOLBVN/kiY-druUgvl0LCNAfugRpC6u6w@public.gmane.org>
2021-12-10 15:22       ` Sebastian Andrzej Siewior
2021-12-10 15:22         ` Sebastian Andrzej Siewior
     [not found]         ` <YbNwmUMPFM/MO0cX-hfZtesqFncYOwBW4kG4KsQ@public.gmane.org>
2021-12-13 10:08           ` Michal Hocko
2021-12-13 10:08             ` Michal Hocko
     [not found]             ` <YbcbmvQk+Sgdsi9G-2MMpYkNvuYDjFM9bn6wA6Q@public.gmane.org>
2021-12-15 16:47               ` Sebastian Andrzej Siewior
2021-12-15 16:47                 ` Sebastian Andrzej Siewior
     [not found]                 ` <YbocOh+h3o/Yc5Ag-hfZtesqFncYOwBW4kG4KsQ@public.gmane.org>
2021-12-15 16:56                   ` Michal Hocko
2021-12-15 16:56                     ` Michal Hocko
     [not found]                     ` <YboeI1aTFdQpN0TI-2MMpYkNvuYDjFM9bn6wA6Q@public.gmane.org>
2021-12-15 17:13                       ` Sebastian Andrzej Siewior
2021-12-15 17:13                         ` Sebastian Andrzej Siewior
     [not found]                         ` <YboiRA1znig/cbCt-hfZtesqFncYOwBW4kG4KsQ@public.gmane.org>
2021-12-15 18:44                           ` Michal Hocko
2021-12-15 18:44                             ` Michal Hocko
     [not found]                             ` <Ybo3cAkyg0SrUyJJ-2MMpYkNvuYDjFM9bn6wA6Q@public.gmane.org>
2021-12-16  7:51                               ` Sebastian Andrzej Siewior
2021-12-16  7:51                                 ` Sebastian Andrzej Siewior

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.