diff options
author | Dmitry Yakunin <zeil@yandex-team.ru> | 2020-03-05 17:45:57 +0300 |
---|---|---|
committer | David S. Miller <davem@davemloft.net> | 2020-03-09 18:13:39 -0700 |
commit | 018d26fcd12a75fb9b5fe233762aa3f2f0854b88 (patch) | |
tree | f98360092168d5b65b481823b992f689966e9ff3 /drivers/net/Makefile | |
parent | ce9a4186f9ac475c415ffd20348176a4ea366670 (diff) |
cgroup, netclassid: periodically release file_lock on classid updating
In our production environment we have faced with problem that updating
classid in cgroup with heavy tasks cause long freeze of the file tables
in this tasks. By heavy tasks we understand tasks with many threads and
opened sockets (e.g. balancers). This freeze leads to an increase number
of client timeouts.
This patch implements following logic to fix this issue:
аfter iterating 1000 file descriptors file table lock will be released
thus providing a time gap for socket creation/deletion.
Now update is non atomic and socket may be skipped using calls:
dup2(oldfd, newfd);
close(oldfd);
But this case is not typical. Moreover before this patch skip is possible
too by hiding socket fd in unix socket buffer.
New sockets will be allocated with updated classid because cgroup state
is updated before start of the file descriptors iteration.
So in common cases this patch has no side effects.
Signed-off-by: Dmitry Yakunin <zeil@yandex-team.ru>
Reviewed-by: Konstantin Khlebnikov <khlebnikov@yandex-team.ru>
Signed-off-by: David S. Miller <davem@davemloft.net>
Diffstat (limited to 'drivers/net/Makefile')
0 files changed, 0 insertions, 0 deletions