Skip to contentSkip to conversation

mm-memcontrol-fix-missing-wakeup-polling-thread.patch removed from -mm tree

merged [email protected] 1 participant 1 message Nov 16, 2020

lore
Share & tools
lore

[email protected]

author tree notice Applied
#0 lore raw

The patch titled
Subject: mm: memcontrol: fix missing wakeup polling thread
has been removed from the -mm tree. Its filename was
mm-memcontrol-fix-missing-wakeup-polling-thread.patch

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

------------------------------------------------------
From: Muchun Song <[email protected]>
Subject: mm: memcontrol: fix missing wakeup polling thread

When we poll the swap.events, we can miss being woken up when the swap event occurs. Because we didn't notify.

Fixes f3a53a3a1e5b ("mm, memcontrol: implement memory.swap.events")
Cc Roman Gushchin <[email protected]>
Cc Michal Hocko <[email protected]>
Cc Yafang Shao <[email protected]>
Cc Chris Down <[email protected]>
Cc Tejun Heo <[email protected]>

---

 include/linux/memcontrol.h |   11 +++++++++--
 1 file changed, 9 insertions(+), 2 deletions(-)
include/linux/memcontrol.h renamed from include/linux/memcontrol.h~mm-memcontrol-fix-missing-wakeup-polling-thread +9 -2
@@ -900,12 +900,19 @@ static inline void count_memcg_event_mm(
 static inline void memcg_memory_event(struct mem_cgroup *memcg,
 				      enum memcg_memory_event event)
 {
+	bool swap_event = event == MEMCG_SWAP_HIGH || event == MEMCG_SWAP_MAX ||
+			  event == MEMCG_SWAP_FAIL;
+
 	atomic_long_inc(&memcg->memory_events_local[event]);
-	cgroup_file_notify(&memcg->events_local_file);
+	if (!swap_event)
+		cgroup_file_notify(&memcg->events_local_file);
 
 	do {
 		atomic_long_inc(&memcg->memory_events[event]);
-		cgroup_file_notify(&memcg->events_file);
+		if (swap_event)
+			cgroup_file_notify(&memcg->swap_events_file);
+		else
+			cgroup_file_notify(&memcg->events_file);
 
 		if (!cgroup_subsys_on_dfl(memory_cgrp_subsys))
 			break;

_

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

mm-memcg-slab-fix-root-memcg-vmstats.patch mm-memcontrol-remove-unused-mod_memcg_obj_state.patch mm-memcg-slab-fix-return-child-memcg-objcg-for-root-memcg.patch mm-memcg-slab-fix-use-after-free-in-obj_cgroup_charge.patch