Skip to contentSkip to conversation

mm: memcg-v1: account vmpressure event allocations

PATCH Applied Guopeng Zhang 5 participants 5 messages Jul 13 – Jul 14

Subsystems (4)
lore
Share & tools
lore
#0 lore raw

PATCH 1/1 mm: memcg-v1: account vmpressure event allocations

From: Guopeng Zhang <[email protected]>

Commit 72797d218b43 ("mm/memcg: v1: account event registrations and drop world-writable cgroup.event_control") accounted cgroup v1 event registration allocations with GFP_KERNEL_ACCOUNT, but missed struct vmpressure_event.

Use GFP_KERNEL_ACCOUNT for this allocation as well.

Fixes 72797d218b43 ("mm/memcg: v1: account event registrations and drop world-writable cgroup.event_control")
---
 mm/memcontrol-v1.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)
mm/memcontrol-v1.c +1 -1
index e8b6e1560278..f8424ec3734b 100644
@@ -1721,7 +1721,7 @@ int vmpressure_register_event(struct mem_cgroup *memcg,
 		mode = ret;
 	}
 
-	ev = kzalloc_obj(*ev);
+	ev = kzalloc_obj(*ev, GFP_KERNEL_ACCOUNT);
 	if (!ev) {
 		ret = -ENOMEM;
 		goto out;
Signature · 1 line
2.43.0
Acked-by on v1 1/1
#1 lore raw
Quoted 20 lines · Guopeng Zhang

From: Guopeng Zhang <[email protected]>

Commit 72797d218b43 ("mm/memcg: v1: account event registrations and drop world-writable cgroup.event_control") accounted cgroup v1 event registration allocations with GFP_KERNEL_ACCOUNT, but missed struct vmpressure_event.

Use GFP_KERNEL_ACCOUNT for this allocation as well.

Fixes 72797d218b43 ("mm/memcg: v1: account event registrations and drop world-writable cgroup.event_control")
---
 mm/memcontrol-v1.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)
mm/memcontrol-v1.c +0 -0
index e8b6e1560278..f8424ec3734b 100644

mm/memcontrol-v1.c int vmpressure_register_event(struct mem_cgroup *memcg, · line 1727

Quoted 8 lines
mm/memcontrol-v1.c +1 -1
@@ -1721,7 +1721,7 @@ int vmpressure_register_event(struct mem_cgroup *memcg,
 		mode = ret;
 	}
 
-	ev = kzalloc_obj(*ev);
+	ev = kzalloc_obj(*ev, GFP_KERNEL_ACCOUNT);
 	if (!ev) {
 		ret = -ENOMEM;
 		goto out;
maintainer Acked-by on v1 1/1
#2 lore raw
In reply to Guopeng Zhang
Quoted 11 lines · Guopeng Zhang

From: Guopeng Zhang <[email protected]>

Commit 72797d218b43 ("mm/memcg: v1: account event registrations and drop world-writable cgroup.event_control") accounted cgroup v1 event registration allocations with GFP_KERNEL_ACCOUNT, but missed struct vmpressure_event.

Use GFP_KERNEL_ACCOUNT for this allocation as well.

Fixes 72797d218b43 ("mm/memcg: v1: account event registrations and drop world-writable cgroup.event_control")

I guess :)

reviewer Reviewed-by on v1 1/1
#3 lore raw
In reply to Guopeng Zhang
Quoted 11 lines · Guopeng Zhang

From: Guopeng Zhang <[email protected]>

Commit 72797d218b43 ("mm/memcg: v1: account event registrations and drop world-writable cgroup.event_control") accounted cgroup v1 event registration allocations with GFP_KERNEL_ACCOUNT, but missed struct vmpressure_event.

Quoted 4 lines

Use GFP_KERNEL_ACCOUNT for this allocation as well.

Fixes 72797d218b43 ("mm/memcg: v1: account event registrations and drop world-writable cgroup.event_control")
maintainer Acked-by on v1 1/1
#4 lore raw
In reply to Guopeng Zhang
Quoted 11 lines · Guopeng Zhang

From: Guopeng Zhang <[email protected]>

Commit 72797d218b43 ("mm/memcg: v1: account event registrations and drop world-writable cgroup.event_control") accounted cgroup v1 event registration allocations with GFP_KERNEL_ACCOUNT, but missed struct vmpressure_event.

Use GFP_KERNEL_ACCOUNT for this allocation as well.

Fixes 72797d218b43 ("mm/memcg: v1: account event registrations and drop world-writable cgroup.event_control")