]> www.infradead.org Git - users/dwmw2/linux.git/commit
cgroup, netclassid: on modifying netclassid in cgroup, only consider the main process.
authorLiansen Zhai <zhailiansen@gmail.com>
Thu, 12 Oct 2023 09:03:30 +0000 (17:03 +0800)
committerJakub Kicinski <kuba@kernel.org>
Mon, 16 Oct 2023 23:36:53 +0000 (16:36 -0700)
commitc60991f8e187eb73dbea2375c08ccba8f544bd49
treee7fd044bcb45d3edc953b760fab0c61552ae4676
parent1cfce8261d9cb21303899aa04de1abb25834d3d0
cgroup, netclassid: on modifying netclassid in cgroup, only consider the main process.

When modifying netclassid, the command("echo 0x100001 > net_cls.classid")
will take more time on many threads of one process, because the process
create many fds.
for example, one process exists 28000 fds and 60000 threads, echo command
will task 45 seconds.
Now, we only consider the main process when exec "iterate_fd", and the
time is about 52 milliseconds.

Signed-off-by: Liansen Zhai <zhailiansen@kuaishou.com>
Reviewed-by: Simon Horman <horms@kernel.org>
Link: https://lore.kernel.org/r/20231012090330.29636-1-zhailiansen@kuaishou.com
Signed-off-by: Jakub Kicinski <kuba@kernel.org>
net/core/netclassid_cgroup.c