Skip to contentSkip to conversation

memcg-replace-in_interrupt-by-in_task-in-active_memcg.patch removed from -mm tree

merged [email protected] 1 participant 1 message Sep 3, 2021

lore
Share & tools
lore

[email protected]

author tree notice Applied
#0 lore raw

The patch titled
Subject: memcg: replace in_interrupt() by !in_task() in active_memcg()
has been removed from the -mm tree. Its filename was
memcg-replace-in_interrupt-by-in_task-in-active_memcg.patch

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

------------------------------------------------------
From: Vasily Averin <[email protected]>
Subject: memcg: replace in_interrupt() by !in_task() in active_memcg()

set_active_memcg() uses in_interrupt() check to select proper storage for
cgroup: pointer on task struct or per-cpu pointer.

It isn't fully correct: obsoleted in_interrupt() includes tasks with disabled BH. It's better to use '!in_task()' instead.

Fixes 37d5985c003d ("mm: kmem: prepare remote memcg charging infra for interrupt contexts")
Cc Johannes Weiner <[email protected]>
Cc Michal Hocko <[email protected]>
Cc Roman Gushchin <[email protected]>

---

 include/linux/sched/mm.h |    2 +-
 mm/memcontrol.c          |    2 +-
 2 files changed, 2 insertions(+), 2 deletions(-)
include/linux/sched/mm.h renamed from include/linux/sched/mm.h~memcg-replace-in_interrupt-by-in_task-in-active_memcg +1 -1
@@ -306,7 +306,7 @@ set_active_memcg(struct mem_cgroup *memc
 {
 	struct mem_cgroup *old;
 
-	if (in_interrupt()) {
+	if (!in_task()) {
 		old = this_cpu_read(int_active_memcg);
 		this_cpu_write(int_active_memcg, memcg);
 	} else {
mm/memcontrol.c renamed from mm/memcontrol.c~memcg-replace-in_interrupt-by-in_task-in-active_memcg +1 -1
@@ -878,7 +878,7 @@ EXPORT_SYMBOL(mem_cgroup_from_task);
 
 static __always_inline struct mem_cgroup *active_memcg(void)
 {
-	if (in_interrupt())
+	if (!in_task())
 		return this_cpu_read(int_active_memcg);
 	else
 		return current->active_memcg;

_

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