public inbox for cgroups@vger.kernel.org
 help / color / mirror / Atom feed
* [PATCH v3 0/5] mm/memcg: Address PREEMPT_RT problems instead of disabling it.
@ 2022-02-17  9:47 Sebastian Andrzej Siewior
       [not found] ` <20220217094802.3644569-1-bigeasy-hfZtesqFncYOwBW4kG4KsQ@public.gmane.org>
  0 siblings, 1 reply; 24+ messages in thread
From: Sebastian Andrzej Siewior @ 2022-02-17  9:47 UTC (permalink / raw)
  To: cgroups-u79uwXL29TY76Z2rM5mHXA, linux-mm-Bw31MaZKKs3YtjvyW6yDsg
  Cc: Andrew Morton, Johannes Weiner, Michal Hocko, Michal Koutný,
	Peter Zijlstra, Thomas Gleixner, Vladimir Davydov, Waiman Long

Hi,

this series aims to address the memcg related problem on PREEMPT_RT.

I tested them on CONFIG_PREEMPT and CONFIG_PREEMPT_RT with the
tools/testing/selftests/cgroup/* tests and I haven't observed any
regressions (other than the lockdep report that is already there).

Changes since v2:
- rebased on top of v5.17-rc4-mmots-2022-02-15-20-39.

- Added memcg_stats_lock() in 3/5 so it a little more obvious and
  hopefully easiert to maintain.

- Opencoded obj_cgroup_uncharge_pages() in drain_obj_stock(). The
  __locked suffix was confusing.

v2: https://lore.kernel.org/all/20220211223537.2175879-1-bigeasy@linutronix.de/

Changes since v1:
- Made a full patch from Michal Hocko's diff to disable the from-IRQ vs
  from-task optimisation

- Disabling threshold event handlers is using now IS_ENABLED(PREEMPT_RT)
  instead of #ifdef. The outcome is the same but there is no need to
  shuffle the code around.

v1: https://lore.kernel.org/all/20220125164337.2071854-1-bigeasy@linutronix.de/

Changes since the RFC:
- cgroup.event_control / memory.soft_limit_in_bytes is disabled on
  PREEMPT_RT. It is a deprecated v1 feature. Fixing the signal path is
  not worth it.

- The updates to per-CPU counters are usually synchronised by disabling
  interrupts. There are a few spots where assumption about disabled
  interrupts are not true on PREEMPT_RT and therefore preemption is
  disabled. This is okay since the counter are never written from
  in_irq() context.

RFC: https://lore.kernel.org/all/20211222114111.2206248-1-bigeasy@linutronix.de/

Sebastian



^ permalink raw reply	[flat|nested] 24+ messages in thread

end of thread, other threads:[~2022-02-21 17:25 UTC | newest]

Thread overview: 24+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2022-02-17  9:47 [PATCH v3 0/5] mm/memcg: Address PREEMPT_RT problems instead of disabling it Sebastian Andrzej Siewior
     [not found] ` <20220217094802.3644569-1-bigeasy-hfZtesqFncYOwBW4kG4KsQ@public.gmane.org>
2022-02-17  9:47   ` [PATCH v3 1/5] mm/memcg: Revert ("mm/memcg: optimize user context object stock access") Sebastian Andrzej Siewior
     [not found]     ` <20220217094802.3644569-2-bigeasy-hfZtesqFncYOwBW4kG4KsQ@public.gmane.org>
2022-02-18 16:09       ` Shakeel Butt
2022-02-21 14:26       ` Michal Hocko
2022-02-17  9:47   ` [PATCH v3 2/5] mm/memcg: Disable threshold event handlers on PREEMPT_RT Sebastian Andrzej Siewior
     [not found]     ` <20220217094802.3644569-3-bigeasy-hfZtesqFncYOwBW4kG4KsQ@public.gmane.org>
2022-02-18 16:39       ` Shakeel Butt
2022-02-21 14:27       ` Michal Hocko
2022-02-17  9:48   ` [PATCH v3 3/5] mm/memcg: Protect per-CPU counter by disabling preemption on PREEMPT_RT where needed Sebastian Andrzej Siewior
     [not found]     ` <20220217094802.3644569-4-bigeasy-hfZtesqFncYOwBW4kG4KsQ@public.gmane.org>
2022-02-18 17:25       ` Shakeel Butt
     [not found]         ` <CALvZod4eZWVfibhxu0P0ZQ35cB=vDbde=VNeXiBZfED=k3YPOQ-JsoAwUIsXosN+BqQ9rBEUg@public.gmane.org>
2022-02-21 11:31           ` Sebastian Andrzej Siewior
     [not found]             ` <YhN4BSQ1RLomLoyl-hfZtesqFncYOwBW4kG4KsQ@public.gmane.org>
2022-02-21 12:12               ` Sebastian Andrzej Siewior
2022-02-21 13:18               ` Michal Koutný
     [not found]                 ` <20220221131825.GA7534-9OudH3eul5jcvrawFnH+a6VXKuFTiq87@public.gmane.org>
2022-02-21 13:58                   ` Sebastian Andrzej Siewior
2022-02-17  9:48   ` [PATCH v3 4/5] mm/memcg: Opencode the inner part of obj_cgroup_uncharge_pages() in drain_obj_stock() Sebastian Andrzej Siewior
     [not found]     ` <20220217094802.3644569-5-bigeasy-hfZtesqFncYOwBW4kG4KsQ@public.gmane.org>
2022-02-18 18:40       ` Shakeel Butt
2022-02-18 19:07       ` Roman Gushchin
2022-02-21 14:30       ` Michal Hocko
2022-02-17  9:48   ` [PATCH v3 5/5] mm/memcg: Protect memcg_stock with a local_lock_t Sebastian Andrzej Siewior
     [not found]     ` <20220217094802.3644569-6-bigeasy-hfZtesqFncYOwBW4kG4KsQ@public.gmane.org>
2022-02-21 14:46       ` Michal Hocko
     [not found]         ` <YhOlxsLOOU/OVSzu-2MMpYkNvuYDjFM9bn6wA6Q@public.gmane.org>
2022-02-21 15:19           ` Sebastian Andrzej Siewior
     [not found]             ` <YhOtmPQUcqZCKodH-hfZtesqFncYOwBW4kG4KsQ@public.gmane.org>
2022-02-21 16:24               ` Michal Hocko
2022-02-21 16:44                 ` Sebastian Andrzej Siewior
     [not found]                   ` <YhPBXUmIIHeXI/Gz-hfZtesqFncYOwBW4kG4KsQ@public.gmane.org>
2022-02-21 17:17                     ` Michal Hocko
     [not found]                       ` <YhPJM4RjqklanVLE-2MMpYkNvuYDjFM9bn6wA6Q@public.gmane.org>
2022-02-21 17:25                         ` Sebastian Andrzej Siewior

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox