Skip to contentSkip to conversation

mm-memcg-bail-early-from-swap-accounting-if-memcg-disabled.patch removed from -mm tree

merged [email protected] 1 participant 1 message Dec 20, 2020

lore
Share & tools
lore

[email protected]

author tree notice Applied
#0 lore raw

The patch titled
Subject: mm/memcg: bail early from swap accounting if memcg disabled
has been removed from the -mm tree. Its filename was
mm-memcg-bail-early-from-swap-accounting-if-memcg-disabled.patch

This patch was dropped because it was merged into mainline or a subsystem tree

------------------------------------------------------
From: Alex Shi <[email protected]>
Subject: mm/memcg: bail early from swap accounting if memcg disabled

Patch series "bail out early for memcg disable".

These 2 patches are indepenedent from per memcg lru lock, and may encounter unexpected warning, so let's move out them from per memcg lru locking patchset.

This patch (of 2):

We could bail out early when memcg wasn't enabled.

---

 mm/memcontrol.c |    6 ++++++
 1 file changed, 6 insertions(+)
mm/memcontrol.c renamed from mm/memcontrol.c~mm-memcg-bail-early-from-swap-accounting-if-memcg-disabled +6 -0
@@ -7178,6 +7178,9 @@ void mem_cgroup_swapout(struct page *pag
 	VM_BUG_ON_PAGE(PageLRU(page), page);
 	VM_BUG_ON_PAGE(page_count(page), page);
 
+	if (mem_cgroup_disabled())
+		return;
+
 	if (cgroup_subsys_on_dfl(memory_cgrp_subsys))
 		return;
 
@@ -7242,6 +7245,9 @@ int mem_cgroup_try_charge_swap(struct pa
 	struct mem_cgroup *memcg;
 	unsigned short oldid;
 
+	if (mem_cgroup_disabled())
+		return 0;
+
 	if (!cgroup_subsys_on_dfl(memory_cgrp_subsys))
 		return 0;
 

_

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

mm-vmscan-__isolate_lru_page_prepare-clean-up.patch