Skip to content

Commit d046ff4

Browse files
shakeelbakpm00
authored andcommitted
memcg: initiate deprecation of v1 tcp accounting
Patch series "memcg: initiate deprecation of v1 features", v2. Start the deprecation process of the memcg v1 features which we discussed during LSFMMBPF 2024 [1]. For now add the warnings to collect the information on how the current users are using these features. Next we will work on providing better alternatives in v2 (if needed) and fully deprecate these features. Link: https://lwn.net/Articles/974575 [1] This patch (of 4): Memcg v1 provides opt-in TCP memory accounting feature. However it is mostly unused due to its performance impact on the network traffic. In v2, the TCP memory is accounted in the regular memory usage and is transparent to the users but they can observe the TCP memory usage through memcg stats. Let's initiate the deprecation process of memcg v1's tcp accounting functionality and add warnings to gather if there are any users and if there are, collect how they are using it and plan to provide them better alternative in v2. Link: https://lkml.kernel.org/r/[email protected] Link: https://lkml.kernel.org/r/[email protected] Signed-off-by: Shakeel Butt <[email protected]> Reviewed-by: T.J. Mercier <[email protected]> Acked-by: Michal Hocko <[email protected]> Acked-by: Roman Gushchin <[email protected]> Cc: Johannes Weiner <[email protected]> Cc: Muchun Song <[email protected]> Signed-off-by: Andrew Morton <[email protected]>
1 parent 98455ee commit d046ff4

2 files changed

Lines changed: 11 additions & 0 deletions

File tree

Documentation/admin-guide/cgroup-v1/memory.rst

Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -105,10 +105,18 @@ Brief summary of control files.
105105
memory.kmem.max_usage_in_bytes show max kernel memory usage recorded
106106

107107
memory.kmem.tcp.limit_in_bytes set/show hard limit for tcp buf memory
108+
This knob is deprecated and shouldn't be
109+
used.
108110
memory.kmem.tcp.usage_in_bytes show current tcp buf memory allocation
111+
This knob is deprecated and shouldn't be
112+
used.
109113
memory.kmem.tcp.failcnt show the number of tcp buf memory usage
110114
hits limits
115+
This knob is deprecated and shouldn't be
116+
used.
111117
memory.kmem.tcp.max_usage_in_bytes show max tcp buf memory usage recorded
118+
This knob is deprecated and shouldn't be
119+
used.
112120
==================================== ==========================================
113121

114122
1. History

mm/memcontrol-v1.c

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -2534,6 +2534,9 @@ static ssize_t mem_cgroup_write(struct kernfs_open_file *of,
25342534
ret = 0;
25352535
break;
25362536
case _TCP:
2537+
pr_warn_once("kmem.tcp.limit_in_bytes is deprecated and will be removed. "
2538+
"Please report your usecase to [email protected] if you "
2539+
"depend on this functionality.\n");
25372540
ret = memcg_update_tcp_max(memcg, nr_pages);
25382541
break;
25392542
}

0 commit comments

Comments
 (0)