[OpenAFS-devel] [PATCH] fix openafs crashes on linux 2.6.10-2.6.12, and all RHEL4 kernels

Jeffrey Hutzelman jhutz@cmu.edu
Thu, 24 May 2007 17:13:48 -0400


On Friday, May 11, 2007 08:54:35 AM +0200 Harald Barth <haba@kth.se> wrote:

> If someone shows me how to alloc pageable memory from the Linux kernel,
> I'd love to use that for memcache (Linux).

You'd have to do a fair amount of work, and I'm not convinced it would be a 
good idea.  There is no trivial way to allocate pageable memory that is 
permanently mapped in kernel virtual address space, and it's not clear that 
doing so would be a good idea anyway - kernel virtual address space is 
somewhat scarce on some platforms; allocating many gigabytes of it may not 
be an option.

If you really want to go down this path, you're probably better off 
designing a new cache backend which manages cache storage in terms of VM 
pages, mapping them as needed in the same was as everyone else.  It'd be 
more work than just "allocate memcache in dynamic storage" (if such an 
operation existed), but it would be cleaner, more storage-efficient 
(remember, memcache is nowhere near as storge-efficient as diskcache), and 
would pave the way for future performance improvements like allowing open 
files to use cache pages directly instead of requiring copies to separate 
pages.


> With users who want to use all 32GB of a cluster node for computing,
> pinning down say 8GB for memcache is out. But as users often don't
> do I/O and the big calculation steps at the same time, pageable
> would be OK.

Maybe, but it seems like it would be a significant waste of both storage 
and virtual address space as compared to just using a disk cache.

-- Jeff