Skip to contentSkip to conversation

mm-page_counters-put-page_counter_calculate_protection-under-config_memcg.patch removed from -mm tree

merged mm-stable Andrew Morton 1 participant 1 message Sep 2, 2024

lore
Share & tools
lore

Andrew Morton

author tree notice Applied
#0 lore raw

The quilt patch titled
Subject: mm: page_counters: put page_counter_calculate_protection() under CONFIG_MEMCG
has been removed from the -mm tree. Its filename was
mm-page_counters-put-page_counter_calculate_protection-under-config_memcg.patch

This patch was dropped because it was merged into the mm-stable branch of git://git.kernel.org/pub/scm/linux/kernel/git/akpm/mm

------------------------------------------------------
From: Roman Gushchin <[email protected]>
Subject: mm: page_counters: put page_counter_calculate_protection() under CONFIG_MEMCG
Date: Fri, 26 Jul 2024 20:31:09 +0000

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.

---

 include/linux/page_counter.h |    6 ++++++
 mm/page_counter.c            |    2 ++
 2 files changed, 8 insertions(+)
include/linux/page_counter.h renamed from include/linux/page_counter.h~mm-page_counters-put-page_counter_calculate_protection-under-config_memcg +6 -0
@@ -87,8 +87,14 @@ static inline void page_counter_reset_wa
 	counter->watermark = page_counter_read(counter);
 }
 
+#ifdef CONFIG_MEMCG
 void page_counter_calculate_protection(struct page_counter *root,
 				       struct page_counter *counter,
 				       bool recursive_protection);
+#else
+static inline void page_counter_calculate_protection(struct page_counter *root,
+						     struct page_counter *counter,
+						     bool recursive_protection) {}
+#endif
 
 #endif /* _LINUX_PAGE_COUNTER_H */
mm/page_counter.c renamed from mm/page_counter.c~mm-page_counters-put-page_counter_calculate_protection-under-config_memcg +2 -0
@@ -275,6 +275,7 @@ int page_counter_memparse(const char *bu
 }
 
 
+#ifdef CONFIG_MEMCG
 /*
  * This function calculates an individual page counter's effective
  * protection which is derived from its own memory.min/low, its
@@ -446,3 +447,4 @@ void page_counter_calculate_protection(s
 			atomic_long_read(&parent->children_low_usage),
 			recursive_protection));
 }
+#endif /* CONFIG_MEMCG */

_

Patches currently in -mm which might be from [email protected] are