]> www.infradead.org Git - users/jedix/linux-maple.git/commit
mm: page_counters: put page_counter_calculate_protection() under CONFIG_MEMCG
authorRoman Gushchin <roman.gushchin@linux.dev>
Fri, 26 Jul 2024 20:31:09 +0000 (20:31 +0000)
committerAndrew Morton <akpm@linux-foundation.org>
Sat, 17 Aug 2024 00:52:36 +0000 (17:52 -0700)
commit840f30c014ea3599ab9f1b529e638a2869cc1c7e
tree8b7b43724c514dccdd151721882cf30d2d97b1ce
parentf5ce322ddfd86303e9adfb0788969033f75ef9d6
mm: page_counters: put page_counter_calculate_protection() under CONFIG_MEMCG

Put page_counter_calculate_protection() under CONFIG_MEMCG.

The protection functionality (min/low limits) is not supported by any
other cgroup subsystem, so page_counter_calculate_protection() and related
static effective_protection() can be compiled out if CONFIG_MEMCG is not
enabled.

Link: https://lkml.kernel.org/r/20240726203110.1577216-3-roman.gushchin@linux.dev
Signed-off-by: Roman Gushchin <roman.gushchin@linux.dev>
Acked-by: Shakeel Butt <shakeel.butt@linux.dev>
Acked-by: Johannes Weiner <hannes@cmpxchg.org>
Cc: Michal Hocko <mhocko@suse.com>
Cc: Muchun Song <songmuchun@bytedance.com>
Signed-off-by: Andrew Morton <akpm@linux-foundation.org>
include/linux/page_counter.h
mm/page_counter.c