[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:20:09 PDT 2018
MaskRay updated this revision to Diff 142275.
MaskRay added a comment.
reword
Repository:
rL LLVM
https://reviews.llvm.org/D45546
Files:
include/llvm/Support/CachePruning.h
Index: include/llvm/Support/CachePruning.h
===================================================================
--- include/llvm/Support/CachePruning.h
+++ include/llvm/Support/CachePruning.h
@@ -52,8 +52,13 @@
/// 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.
+ /// Some file systems have a limit on the 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.142275.patch
Type: text/x-patch
Size: 966 bytes
Desc: not available
URL: <http://lists.llvm.org/pipermail/llvm-commits/attachments/20180412/1af7dced/attachment.bin>
More information about the llvm-commits
mailing list