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

chas williams (contractor) chas@cmf.nrl.navy.mil
Wed, 07 Apr 2004 23:00:53 -0400


In message <20040408014851.GA10203@umr.edu>,Nathan Neulinger writes:
>Apr  7 13:27:51 nic1 kernel: Memory: 4008596k/4194304k available (2244k
>kernel code, 53668k reserved, 1432k data, 168k init, 3145152k highmem)
>
>That just plain doesn't make any sense... I tried to give it a 75MB
>memcache... Is there something with how afs is trying to allocate kernel
>memory that would limit what it could use? 

well the linux kernel could be placing a limit on memory.  i would have
to guess that afs_osi_Alloc(memCacheBlkSize) is going to using kmalloc()
instead of vmalloc().  kmalloc() gets its buffer from various pools
viewable from /proc/slabinfo (in particular the size-NNNN pools).  it
seems like you might be hitting a limit on the number of buffers.

perhaps memcache should be implemented to have it own kmem_cache.