summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--llvm/include/llvm/Support/CachePruning.h7
1 files changed, 5 insertions, 2 deletions
diff --git a/llvm/include/llvm/Support/CachePruning.h b/llvm/include/llvm/Support/CachePruning.h
index d82b194a43e..cf3f8ec67a5 100644
--- a/llvm/include/llvm/Support/CachePruning.h
+++ b/llvm/include/llvm/Support/CachePruning.h
@@ -52,8 +52,11 @@ struct CachePruningPolicy {
/// 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;
};
OpenPOWER on IntegriCloud