Re: [PATCH] mm/memcontrol: Disable on PREEMPT_RT

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



On 12/7/21 10:52, Sebastian Andrzej Siewior wrote:
From: Thomas Gleixner <tglx@xxxxxxxxxxxxx>

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.

Disabling MEMCG for PREEMPT_RT may be too drastic a step to take. For commit 559271146efc ("mm/memcg: optimize user context object stock access"), I can modify it to disable the optimization for PREEMPT_RT.

Cheers,
Longman


[ bigeasy: commit description. ]

Signed-off-by: Thomas Gleixner <tglx@xxxxxxxxxxxxx>
Signed-off-by: Sebastian Andrzej Siewior <bigeasy@xxxxxxxxxxxxx>
---
  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





[Index of Archives]     [Linux ARM Kernel]     [Linux ARM]     [Linux Omap]     [Fedora ARM]     [IETF Annouce]     [Security]     [Bugtraq]     [Linux OMAP]     [Linux MIPS]     [eCos]     [Asterisk Internet PBX]     [Linux API]     [Monitors]

  Powered by Linux