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

chas williams (contractor) chas@cmf.nrl.navy.mil
Tue, 13 Apr 2004 00:16:23 -0400


In message <20040412181659.14dfeb99.zaitcev@redhat.com>,Pete Zaitcev writes:
>So, for any Linux kernel hacker, a code which does kmalloc, if that
>fails falls back to vmalloc is a red flag. They have entirely different
>characteristics. For one thing, DMA is not possible into vmalloc-ed

which would sort of be the reason i sent the patch a while ago that
make the allocator use kmalloc for < page_size and vmalloc for anything
else.  kmalloc does not fail over to vmalloc (and it really should 
never have too unless you have a really strange situation like someone
trying to get 75MB inside the kernel).  the page_size cutoff might
seem harsh but the afs allocator really only gets two sizes, small
and huge.

and i cant even believe i am writing this but perhaps afs needs another 
allocator "afs_osi_AllocLarge()".  for most platforms this would be
the same as afs_osi_Alloc but for linux it would be vmalloc.