Thread (1 message) 1 message, 1 author, 2025-08-13

Re: [PATCH v3 net-next 06/12] net-memcg: Introduce mem_cgroup_from_sk().

From: Roman Gushchin <roman.gushchin@linux.dev>
Date: 2025-08-13 01:44:54
Also in: linux-mm, mptcp, netdev

Possibly related (same subject, not in this thread)

Kuniyuki Iwashima [off-list ref] writes:
We will store a flag in the lowest bit of sk->sk_memcg.

Then, directly dereferencing sk->sk_memcg will be illegal, and we
do not want to allow touching the raw sk->sk_memcg in many places.

Let's introduce mem_cgroup_from_sk().

Other places accessing the raw sk->sk_memcg will be converted later.

Note that we cannot define the helper as an inline function in
memcontrol.h as we cannot access any fields of struct sock there
due to circular dependency, so it is placed in sock.h.

Signed-off-by: Kuniyuki Iwashima <kuniyu@google.com>
Reviewed-by: Eric Dumazet <edumazet@google.com>
Acked-by: Roman Gushchin <roman.gushchin@linux.dev>
Keyboard shortcuts
hback out one level
jnext message in thread
kprevious message in thread
ldrill in
Escclose help / fold thread tree
?toggle this help