On Mon, Feb 21, 2022 at 10:26 AM Sebastian Andrzej Siewior <bigeasy@xxxxxxxxxxxxx> wrote: > [...] > + /* > + * The caller from rmap relay on disabled preemption becase they never > + * update their counter from in-interrupt context. For these two > + * counters we check that the update is never performed from an > + * interrupt context while other caller need to have disabled interrupt. > + */ > + __memcg_stats_lock(); > + if (IS_ENABLED(CONFIG_DEBUG_VM)) { > + if (idx == NR_ANON_MAPPED || idx == NR_FILE_MAPPED) NR_ANON_THPS, NR_SHMEM_PMDMAPPED, NR_FILE_PMDMAPPED are missing and the switch statement would be cleaner.