[Linux-cachefs] Experiments in fs-cache - ...nothing happens?

Rince rincebrain at gmail.com
Thu Apr 23 10:03:30 UTC 2009


I recently came upon FS-Cache as an interesting feature to play around
with, and so I did everything I thought I'd need to use it.

I'm running 2.6.30-rc3, and I have cachefilesd 0.9 installed. I loaded
the cachefiles and fscache modules into my kernel, and I started
cachefilesd with a simple two-line config file, pointing it at
/var/fscache and naming the cache "test".

Fine, no errors. /var/fscache is mounted with user_xattr and is an
ext4 filesystem.

So I mount an NFS filesystem using -o fsc=test, and I get back no errors.

...nor, it seems, do I get any usage of it at all. I pulled GB and GB
of data across NFS, and /proc/fs/fscache/stats thinks it's utterly
unused...
# cat /proc/fs/fscache/stats
FS-Cache statistics
Cookies: idx=0 dat=0 spc=0
Objects: alc=0 nal=0 avl=0 ded=0
ChkAux : non=0 ok=0 upd=0 obs=0
Pages  : mrk=0 unc=0
Acquire: n=0 nul=0 noc=0 ok=0 nbf=0 oom=0
Lookups: n=0 neg=0 pos=0 crt=0
Updates: n=0 nul=0 run=0
Relinqs: n=0 nul=0 wcr=0
AttrChg: n=0 ok=0 nbf=0 oom=0 run=0
Allocs : n=0 ok=0 wt=0 nbf=0
Allocs : ops=0 owt=0
Retrvls: n=0 ok=0 wt=0 nod=0 nbf=0 int=0 oom=0
Retrvls: ops=0 owt=0
Stores : n=0 ok=0 agn=0 nbf=0 oom=0
Stores : ops=0 run=0
Ops    : pend=0 run=0 enq=0
Ops    : dfr=0 rel=0 gc=0

Am I missing something? I'm reasonably certain I'm not a complete
idiot. cachefilesd even created cache and graveyard in /var/fscache,
but...nothing ever shows up in it.

Output from cachefilesd:
# cachefilesd -s -n -d -f /etc/cachefilesd.conf
About to bind cache
Bound cache
Daemon Started
Scan complete
Refilling cull table
Scan complete
Refilling cull table
Scan complete
Refilling cull table
Scan complete
Refilling cull table
Scan complete
Refilling cull table
Scan complete
Refilling cull table
Scan complete
Refilling cull table
Scan complete
Refilling cull table
Scan complete
Refilling cull table
Scan complete
[repeat forever]

dmesg reports:
Slow work thread pool: Starting up
Slow work thread pool: Ready
FS-Cache: Loaded
CacheFiles: Loaded
FS-Cache: Cache "test" added (type cachefiles)
CacheFiles: File cache on sdi1 registered


Am I oblivious?  Missing something obvious? Is it magically known to be broken?

I really want to make use of this, and I'm tremendously saddened that
it appears to be doing nothing.

- Rich




More information about the Linux-cachefs mailing list