[OpenAFS] Re: Linux tmpfs

Douglas E. Engert deengert@anl.gov
Wed, 19 Nov 2008 09:55:32 -0600

Rainer Toebbicke wrote:
>> Does the disk cache take advantage of linux's disk cache? I'm thinking
>> that is a freebie if we use tmpfs or some other linux-provided fs-backed
>> cache.
> Yes, it does, it just reads cache files like any vanilla user space 
> process.
> This has two consequences:
> 1. tmpfs on linux just works fine, if you have a (small) patch that 
> glues the inode-centric file opens to the dentry-centric tmpfs files. I 
> suspect the work done to make OSX happy obsoletes this patch if it can 
> be made to work under Linux.

It looks like it should be easy. It was for Solaris 10 so it can run
on tmpfs or ZFS. See http://rt.central.org/rt/Ticket/Display.html?id=123677
all the code change is in osi_file.c, and the param.<sysname>.h files.

> Actually, since tmpfs's disk backing can span disks this would be an 
> attractive option to speed up the cache. But we never deployed that 
> patch it on a big scale as it required resizing existing machines (more 
> swap, no AFS cache).
> The downside is of course that you loose your cache upon reboot. I guess 
> disconnected-AFS users might consider that serious.
> 2. AFS files end up twice in memory, once in the mapping of the AFS file 
> itself and then in the mapping of the cache chunk. We've addressed this 
> by short-circuiting the VM layer for the AFS file, a relatively 
> straightforward mod, but which gets messy as you still need that layer 
> for everything that is memory-mapped, such as executables.


  Douglas E. Engert  <DEEngert@anl.gov>
  Argonne National Laboratory
  9700 South Cass Avenue
  Argonne, Illinois  60439
  (630) 252-5444