diff options
| author | 2019-11-18 19:54:14 +0530 | |
|---|---|---|
| committer | 2019-11-18 19:54:14 +0530 | |
| commit | 8705cb99a3b10dbdfd5490f04ed7c361971c26b2 (patch) | |
| tree | 947440cf7f9c40115f07218d49ede5c2fe75c0c2 /src | |
| parent | 0ef9ec196e7fa0732a9bce5b3223d4e66a0997ba (diff) | |
| download | nnn-8705cb99a3b10dbdfd5490f04ed7c361971c26b2.tar.gz | |
Seek advantage of kernel readahead()
References:
1. http://man7.org/linux/man-pages/man2/posix_fadvise.2.html
2. https://www.oreilly.com/library/view/linux-system-programming/9781449341527/ch04.html
Diffstat (limited to 'src')
| -rw-r--r-- | src/nnn.c | 2 |
1 files changed, 2 insertions, 0 deletions
@@ -3512,6 +3512,8 @@ static int dentfill(char *path, struct entry **dents) open_max = max_openfds(); } + posix_fadvise(fd, 0, 0, POSIX_FADV_SEQUENTIAL); + dp = readdir(dirp); if (!dp) goto exit; |