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; };