[PATCH] D45546: [CachePruning] Clarify the per-directory entry limit on Linux ext4.
Fangrui Song via Phabricator via llvm-commits
llvm-commits at lists.llvm.org
Thu Apr 12 15:30:44 PDT 2018
This revision was automatically updated to reflect the committed changes.
Closed by commit rL329966: [CachePruning] Clarify the per-directory entry limit on Linux ext4. (authored by MaskRay, committed by ).
Changed prior to commit:
https://reviews.llvm.org/D45546?vs=142275&id=142280#toc
Repository:
rL LLVM
https://reviews.llvm.org/D45546
Files:
llvm/trunk/include/llvm/Support/CachePruning.h
Index: llvm/trunk/include/llvm/Support/CachePruning.h
===================================================================
--- llvm/trunk/include/llvm/Support/CachePruning.h
+++ llvm/trunk/include/llvm/Support/CachePruning.h
@@ -52,8 +52,11 @@
/// the number of files based pruning.
///
/// This defaults to 1000000 because with that many files there are
- /// diminishing returns on the effectiveness of the cache, and file
- /// systems have a limit on total number of files.
+ /// diminishing returns on the effectiveness of the cache. Some systems have a
+ /// limit on total number of files, and some also limit the number of files
+ /// per directory, such as Linux ext4, with the default setting (block size is
+ /// 4096 and large_dir disabled), there is a per-directory entry limit of
+ /// 508*510*floor(4096/(40+8))~=20M for average filename length of 40.
uint64_t MaxSizeFiles = 1000000;
};
-------------- next part --------------
A non-text attachment was scrubbed...
Name: D45546.142280.patch
Type: text/x-patch
Size: 924 bytes
Desc: not available
URL: <http://lists.llvm.org/pipermail/llvm-commits/attachments/20180412/56fcff4f/attachment.bin>
More information about the llvm-commits
mailing list