The patch titled Subject: mm/memcg: only perform the debug checks on !PREEMPT_RT has been added to the -mm tree. Its filename is mm-memcg-protect-per-cpu-counter-by-disabling-preemption-on-preempt_rt-where-needed-fix-2.patch This patch should soon appear at https://ozlabs.org/~akpm/mmots/broken-out/mm-memcg-protect-per-cpu-counter-by-disabling-preemption-on-preempt_rt-where-needed-fix-2.patch and later at https://ozlabs.org/~akpm/mmotm/broken-out/mm-memcg-protect-per-cpu-counter-by-disabling-preemption-on-preempt_rt-where-needed-fix-2.patch Before you just go and hit "reply", please: a) Consider who else should be cc'ed b) Prefer to cc a suitable mailing list as well c) Ideally: find the original patch on the mailing list and do a reply-to-all to that, adding suitable additional cc's *** Remember to use Documentation/process/submit-checklist.rst when testing your code *** The -mm tree is included into linux-next and is updated there every 3-4 working days ------------------------------------------------------ From: Sebastian Andrzej Siewior <bigeasy@xxxxxxxxxxxxx> Subject: mm/memcg: only perform the debug checks on !PREEMPT_RT On PREEMPT_RT interrupts and preemption is always enabled. The locking function __memcg_stats_lock() always disabled preemptions. The recently added checks need to performed only on !PREEMPT_RT where preemption and disabled interrupts are used. Please fold into: "Protect per-CPU counter by disabling preemption on PREEMPT_RT" Link: https://lkml.kernel.org/r/Yhlf29/HqyNMOvGb@xxxxxxxxxxxxx Signed-off-by: Sebastian Andrzej Siewior <bigeasy@xxxxxxxxxxxxx> Cc: Shakeel Butt <shakeelb@xxxxxxxxxx> Signed-off-by: Andrew Morton <akpm@xxxxxxxxxxxxxxxxxxxx> --- mm/memcontrol.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) --- a/mm/memcontrol.c~mm-memcg-protect-per-cpu-counter-by-disabling-preemption-on-preempt_rt-where-needed-fix-2 +++ a/mm/memcontrol.c @@ -741,7 +741,7 @@ void __mod_memcg_lruvec_state(struct lru * interrupt context while other caller need to have disabled interrupt. */ __memcg_stats_lock(); - if (IS_ENABLED(CONFIG_DEBUG_VM)) { + if (IS_ENABLED(CONFIG_DEBUG_VM) && !IS_ENABLED(CONFIG_PREEMPT_RT)) { switch (idx) { case NR_ANON_MAPPED: case NR_FILE_MAPPED: _ Patches currently in -mm which might be from bigeasy@xxxxxxxxxxxxx are mm-memcg-disable-threshold-event-handlers-on-preempt_rt.patch mm-memcg-protect-per-cpu-counter-by-disabling-preemption-on-preempt_rt-where-needed.patch mm-memcg-protect-per-cpu-counter-by-disabling-preemption-on-preempt_rt-where-needed-fix.patch mm-memcg-protect-per-cpu-counter-by-disabling-preemption-on-preempt_rt-where-needed-fix-2.patch mm-memcg-protect-memcg_stock-with-a-local_lock_t.patch mm-memcg-disable-migration-instead-of-preemption-in-drain_all_stock.patch