[OpenAFS-devel] How can the mem cache possibly not be able to allocate memory?

chas williams (contractor) chas@cmf.nrl.navy.mil
Mon, 12 Apr 2004 20:58:40 -0400


a little more about vmalloc/kmalloc in openafs.  i re-instrumented the
linux memory allocator (for a different reason) but it turns out to 
be useful here as well.  here are any allocations > 64k (actually there
should be one more, but you can easily fix afs_WriteThroughDSlots() so that
it does not get the biggest possible array and just go through the list 
twice).

its pretty clear some of these could not be allocated with kmalloc().

alloc(size 159856, ...) /scratch/openafs/src/rx/rx_packet.c:382
alloc(size 102400, ...) /scratch/openafs/src/afs/afs_buffer.c:117
alloc(size 245760, ...) /scratch/openafs/src/afs/afs_call.c:2579
Starting AFS cache scan...
alloc(size 1680000, ...) /scratch/openafs/openafs/src/afs/afs_vcache.c:2822
alloc(size 100000, ...) /scratch/openafs/src/afs/afs_dcache.c:3200
alloc(size 100000, ...) /scratch/openafs/src/afs/afs_dcache.c:3201
alloc(size 100000, ...) /scratch/openafs/src/afs/afs_dcache.c:3209
alloc(size 200000, ...) /scratch/openafs/src/afs/afs_dcache.c:3212
alloc(size 100000, ...) /scratch/openafs/src/afs/afs_dcache.c:3215
alloc(size 374400, ...) /scratch/openafs/src/afs/afs_dcache.c:3222