diff options
author | Adhemerval Zanella <adhemerval.zanella@linaro.org> | 2019-07-24 13:48:12 -0300 |
---|---|---|
committer | Adhemerval Zanella <adhemerval.zanella@linaro.org> | 2019-10-09 17:34:38 -0300 |
commit | edcda4c08ac033f40a91cb4def2fd0fa35a760ca (patch) | |
tree | 6676392a91b54b7b57253e37edff6262a33a656e /ChangeLog | |
parent | 00fe3c6657161a96890067666760ea8cf22b791c (diff) | |
download | glibc-edcda4c08ac033f40a91cb4def2fd0fa35a760ca.tar.gz glibc-edcda4c08ac033f40a91cb4def2fd0fa35a760ca.tar.xz glibc-edcda4c08ac033f40a91cb4def2fd0fa35a760ca.zip |
mips: Do not malloc on getdents64 fallback
This patch changes how the fallback getdents64 implementation calls non-LFS getdents by replacing the scratch_buffer with static buffer plus a loop on getdents calls. This avoids the potential malloc call on scratch_buffer_set_array_size for large input buffer size at the cost of more getdents syscalls. It also adds a small optimization for older kernels, where the first ENOSYS failure for getdents64 disable subsequent calls. Check the dirent tests on a mips64-linux-gnu with getdents64 code disabled. * sysdeps/unix/sysv/linux/mips/mips64/getdents64.c (__getdents64): Add small optimization for older kernel to avoid issuing __NR_getdents64 on each call and replace scratch_buffer usage with a static allocated buffer. Reviewed-by: Florian Weimer <fweimer@redhat.com>
Diffstat (limited to 'ChangeLog')
-rw-r--r-- | ChangeLog | 7 |
1 files changed, 7 insertions, 0 deletions
diff --git a/ChangeLog b/ChangeLog index fa343ed543..1d4f418e17 100644 --- a/ChangeLog +++ b/ChangeLog @@ -1,3 +1,10 @@ +2019-10-09 Adhemerval Zanella <adhemerval.zanella@linaro.org> + + * sysdeps/unix/sysv/linux/mips/mips64/getdents64.c (__getdents64): + Add small optimization for older kernel to avoid issuing + __NR_getdents64 on each call and replace scratch_buffer usage with + a static allocated buffer. + 2019-10-09 Florian Weimer <fweimer@redhat.com> * config.h.in (HAVE_GCC_GOTDATA): Remove. |