[OpenAFS-devel] some problems about cache manager
Nickolai Zeldovich
kolya@MIT.EDU
Thu, 24 Jan 2002 02:07:34 -0500
> I have some problems about cache manager. What is the AFS cache
> replacement policy? Something about its write back time slice, etc. Can
> I modify AFS cache replacement policy by interface provided by AFS, like
> using unix system call?
Perhaps you could be more specific in your question? Currently,
the cache replacement policy is pretty much LRU, implemented by
afs_GetDownD() in src/afs/afs_dcache.c. Caching works on chunks,
which are usually 64k each. There's no way to set the cache
replacement policy, other than by rewriting the code. Writeback
to server happens upon file close. You can allow close() to
return before writeback completes (by using "fs storebehind",
I think), but it still will write out all modified dcache blocks
right then. There's also afs_DoPartialWrite(), which can write
modified data cache entries to the server before file close, if
the cache is full of dirty blocks.
> I have some programmer reference documents about
> AFS, and they describe something about interface which AFS provides.
> Their names are File Server/Cache Manager Interface, Authentication
> Interface, etc. I found them in OpenAFS website. Are they still
> available? Or is there any latest document about interface that AFS
> provides?
The interface you mention (in particular the FS-CM one) describes
the protocol used between your local AFS client (the cache manager)
and the fileserver. That protocol (with some modifications) is still
used now, but it sounds like you just want to locally control your
cache manager's cache replacement policy, rather than talk to the
fileserver directly.
-- kolya