Skip to content

memcg: tcp memcontrol fixes.

KAMEZAWA Hiroyuki netdev 1 version In review

Get series with b4
b4 am [email protected]

Versions newest first

  1. v1 Latest3 patches 10 repliesIn review

Patches in v1 No applies recorded yet

#Subject and filesSizeRepliesApplied
1/3memcg/tcp : fix to see use_hierarchy in tcp memcontrol cgroupinclude/linux/memcontrol.h mm/memcontrol.c net/ipv4/tcp_memcontrol.c+9 -12 replies
2/3memcg/tcp: remove static_branch_slow_dec() at changing limitinclude/net/tcp_memcontrol.h net/ipv4/tcp_memcontrol.c+19 -63 replies
3/3memcg/tcp: ignore tcp usage before accounting startedinclude/linux/res_counter.h include/net/sock.h kernel/res_counter.c+22 -116 replies

Reviews trailers per patch

1 of 3 patches has a Reviewed-by or Acked-by.

PatchGlauber Costa
1/3
2/3
3/3A-b A-b

Trailers given in replies are filled; those carried in the patches from earlier versions are outlined with dashes.

Read the v1 thread

Cover letter [BUGFIX][PATCH 0/3] memcg: tcp memcontrol fixes.

I'm very sorry if you received this e-mail twice.
==
This series is 3 bugfixes for memcg's kmem.tcp memory controller. Maybe this should go via network tree.
(CC akpm for noticing an ugly change in res_counter.)

All patches are generated onto today linus's git tree.

Brief description:

Patch 1/3 .... tcp memcontrol doesn't see memcg's use_hierarchy value. Fix it.

Patch 2/3 and 3/3 ....
Because tcp memcontrol doesn't do any accounting when limit=RESOUCE_MAX, there will be account leakage when limit is changed. This can trigger WARN_ON() in res_counter which checks usage >= 0.

Patch 2/3 .... don't call static_key_slow_dec(&memcg_socket_limit_enabled) until
a cgroup under accounted is destroyed.

Patch 3/3 .... add res_counter_uncharge_nowarn() to ignore leakage.

Thanks,
-Kame