[OpenAFS] Re: Linux tmpfs

Simon Wilkinson sxw@inf.ed.ac.uk
Sat, 19 Dec 2009 01:33:16 +0000


On 18 Dec 2009, at 22:57, Adam Megacz wrote:

>
> Rainer Toebbicke <rtb@pclella.cern.ch> writes:
>> 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.
>>
>> 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.
>
> Hi, does anybody have copies of one or both of these patches?  I'd be
> quite interested in trying them out.

Crickey - this is a thread from almost 12 months ago - talk about  
necromancy!

Anyway, the first point is solved by Marc Dionne's LINUX_USE_FH  
patches in the 1.5.x series - these let you use pretty much any  
filesystem as a disk cache, and are automatically enabled for kernels  
that are new enough to lack the iget interface - check to see if  
LINUX_USE_FH is defined for your build and, if it isn't, define it.  
I'd hope that this will be the default for 1.6.

Code does exist for the 2nd, but we'd need to carefully discuss  
whether it's viable for the tree. Whilst it has big advantages in  
terms of memory consumption, it does increase the complexity of the  
cache manager when it comes to handling files which are accessed  
through the page cache (which doesn't just mean mmap, but interfaces  
such as splice and sendfile, too). It is also radically different from  
the way that most Linux filesystems interact with the kernel, which  
has the possibility of causing us pain whenever the VFS interface  
changes.

Cheers,

Simon.