Re: [PATCH v2] memcg: Remove the lockdep assert from __mod_objcg_mlstate().

From: Shakeel Butt
Date: Tue May 28 2024 - 12:21:16 EST


On Tue, May 28, 2024 at 05:08:56PM GMT, Sebastian Andrzej Siewior wrote:
> On 2024-05-28 07:59:57 [-0700], Shakeel Butt wrote:
> > One question on VM_WARN_ON_IRQS_ENABLED() in __mod_memcg_lruvec_state().
> > On a PREEMPT_RT kernel with CONFIG_DEBUG_VM, will that
> > VM_WARN_ON_IRQS_ENABLED() cause a splat or VM_WARN_ON_IRQS_ENABLED is
> > special on PREEMPT_RT kernels?
>
> we have the following in the header file:
>
> | #ifdef CONFIG_DEBUG_VM_IRQSOFF
> | #define VM_WARN_ON_IRQS_ENABLED() WARN_ON_ONCE(!irqs_disabled())
> | #else
> | #define VM_WARN_ON_IRQS_ENABLED() do { } while (0)
> | #endif
>
> and this in Kconfig:
> | config DEBUG_VM_IRQSOFF
> | def_bool DEBUG_VM && !PREEMPT_RT
> |
>
> which means on PREEMPT_RT we end up with "do {…"

Thanks for the explanation.