tech-kern archive

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index][Old Index]

name cache TTL?

FUSE uses name cache TTL extensively: each time we lookup or create a
node, the filesystem gives a cache TTL for the node so that the kernel
does not have to lookup again too often. 

Some time ago, I added the feature in PUFFS so that we can support the
FUSE feature. The name cache TTL is kept in struct puffs_node. When we
retreive an entry from name cache, clock is checked against the TTL and
we decide wether we do another lookup or not.

But that cannot handle negative caching. FUSE allows the filesystem to
specify a TTL for a ENOENT. I cannot implement it at the PUFFS level
like I did before, since there is no struct puffs_node associated with
an unexistant node. 

The simpliest way of dealing with this would be to push down the name
cache TTL from struct puffs_node to puffs_namecache, and add an optional
struct timespec argument to cache_enter(). That argument would tell the
name cache how long the cache entry shall be valid at most. NULL would
mean current behavior.


Emmanuel Dreyfus

Home | Main Index | Thread Index | Old Index