On Mon, Apr 04, 2005 at 04:19:36PM +1000, Andrew Tridgell wrote:
Personally I think that keeping a full alternative dcache in userspace isn't the right approach. I think we could bear the hit of something that keeps O(number_of_directories) memory, but not O(number_of_files). The lack of a sensible way to auto-shrink the user space dcache in low memory situations is just one of the many problems of a full userspace dcache.
But using your status bits, one can compress such a cache significantly. That is, using the fact that most files on an Unix FS are not mixed case, we can avoid storing O(number_of_files). We would then need to store all files only in r/w[1] directories with mixed case filesystems[2]. So we would be trading a little bit of memory for speed. Not a bad tradeoff these days.