Skip to content
Commit c60991f8 authored by Liansen Zhai's avatar Liansen Zhai Committed by Jakub Kicinski
Browse files

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: default avatarLiansen Zhai <zhailiansen@kuaishou.com>
Reviewed-by: default avatarSimon Horman <horms@kernel.org>
Link: https://lore.kernel.org/r/20231012090330.29636-1-zhailiansen@kuaishou.com
Signed-off-by: default avatarJakub Kicinski <kuba@kernel.org>
parent 1cfce826
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment