Re: [PATCH v4 3/6] mm/memcg: Protect per-CPU counter by disabling preemption on PREEMPT_RT where needed.

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

 



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.



[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