diff options
author | Eric Dumazet <edumazet@google.com> | 2015-12-03 20:12:07 +0100 |
---|---|---|
committer | Al Viro <viro@zeniv.linux.org.uk> | 2016-01-09 08:56:10 +0100 |
commit | 3cc4a84e026e8d61b7ffe4a7367ed09a555f2c5b (patch) | |
tree | d538f2cde041d28d7ca3320d0e88d592cb76abad /fs/proc/proc_sysctl.c | |
parent | logfs: constify logfs_block_ops structures (diff) | |
download | linux-3cc4a84e026e8d61b7ffe4a7367ed09a555f2c5b.tar.xz linux-3cc4a84e026e8d61b7ffe4a7367ed09a555f2c5b.zip |
proc: add a reschedule point in proc_readfd_common()
User can pass an arbitrary large buffer to getdents().
It is typically a 32KB buffer used by libc scandir() implementation.
When scanning /proc/{pid}/fd, we can hold cpu way too long,
so add a cond_resched() to be kind with other tasks.
We've seen latencies of more than 50ms on real workloads.
Signed-off-by: Eric Dumazet <edumazet@google.com>
Cc: Alexander Viro <viro@zeniv.linux.org.uk>
Signed-off-by: Al Viro <viro@zeniv.linux.org.uk>
Diffstat (limited to 'fs/proc/proc_sysctl.c')
0 files changed, 0 insertions, 0 deletions