WineConf Agenda

Dimitrie O. Paun dpaun at
Mon Apr 4 15:09:09 GMT 2005

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.


1. We can avoid doing so for directories that are writable by root only, 
   those are not likely to change.
2. Essentially, those are under /home. Which means that a first order
   approximation would be a simple cache that works blindly on directories
   that match a simple regexp pattern. For most cases, that would simply
   be '/home/.*', and I think that would get us 90% there.

More information about the samba-technical mailing list