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

Chaskiel M Grundman cg2v@andrew.cmu.edu
Tue, 08 May 2007 15:59:37 -0400


--On Tuesday, May 08, 2007 12:20:47 PM -0400 chas williams - CONTRACTOR 
<chas@cmf.nrl.navy.mil> wrote:

> it might not be safe to performance certain operations under a
> lock with pageable (from vmalloc) memory.

vmalloc'd memory is not pageable. (I can't find a definitive current 
reference for this, but searching for "linux kernel pageable" comes up with 
lots of places that say it wasn't (I didn't find anything newer than 2002 
that actually said that "the linux kernel is not pageable"), and various 
people saying "wouldn't it be nice if....", but nothing about the feature 
actually being implemented.

vmalloc is about memory fragmentation. (kmalloc allocates memory that has a 
1:1 physical/virtual mapping, which means allocating large objects from it 
may fail even if there is enough memory. vmalloc only fails if there are 
insufficient pages, or if the virtual address space reserved for it fills 
or becomes fragmented)

--On Tuesday, May 08, 2007 03:04:58 PM -0400 Jeffrey Hutzelman 
<jhutz@cmu.edu> wrote:

> Fortunately, we don't have this problem, because callers in AFS make no
> distinction regarding what kind of memory they get.

Which doesn't prove that those callers know that they should be asserting 
that. Fortunately, because the assumption of non-pageable kernel memory is 
fulfilled, they are safe.