Linux kernel mirror (for testing) git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git
kernel os linux
1
fork

Configure Feed

Select the types of activity you want to include in your feed.

mm: memcg: put struct task_struct::memcg_in_oom under CONFIG_MEMCG_V1

The memcg_in_oom field of the struct task_struct is not used by the cgroup
v2's memory controller, so it can be happily compiled out if
CONFIG_MEMCG_V1 is not set.

Link: https://lkml.kernel.org/r/20240628210317.272856-9-roman.gushchin@linux.dev
Signed-off-by: Roman Gushchin <roman.gushchin@linux.dev>
Acked-by: Shakeel Butt <shakeel.butt@linux.dev>
Cc: Johannes Weiner <hannes@cmpxchg.org>
Cc: Michal Hocko <mhocko@kernel.org>
Cc: Muchun Song <muchun.song@linux.dev>
Signed-off-by: Andrew Morton <akpm@linux-foundation.org>

authored by

Roman Gushchin and committed by
Andrew Morton
1c3a0b3d 98c9daf5

+3 -1
+3 -1
include/linux/sched.h
··· 1447 1447 unsigned int kcov_softirq; 1448 1448 #endif 1449 1449 1450 - #ifdef CONFIG_MEMCG 1450 + #ifdef CONFIG_MEMCG_V1 1451 1451 struct mem_cgroup *memcg_in_oom; 1452 + #endif 1452 1453 1454 + #ifdef CONFIG_MEMCG 1453 1455 /* Number of pages to reclaim on returning to userland: */ 1454 1456 unsigned int memcg_nr_pages_over_high; 1455 1457