[OpenAFS] allocation and scheduling in the Linux kernel

Bart Banter bartbanter@hotmail.com
Fri, 21 Dec 2001 11:48:57 -0600

I've been discussing with our kernel developers a couple of hangs (process 
and system) that seem to be associated with openafs usage and heavy system 
I would like to suggest two changes to the openafs linux_alloc() routine 
which we believe will help matters.

The first is to change the gfp_mask passed to kmalloc(). Using GFP_KERNEL, 
it is possible that the VM will call back to the filesystem to free up 
memory to satisfy the kmalloc request. GFP_NOFS will prevent this possible 
recursion. I believe GFP_NOFS first appeared in the 2.4.6 kernel.

The second change involves the call to schedule() when vmalloc() fails. This 
can also cause a hang. The schedule() call could be replaced with:


I'm certainly not an expert on the openasf code, but I believe these changes 
are correct and needed. I'm interested in hearing other opinions.

Guy Streeter
Red Hat

Join the world’s largest e-mail service with MSN Hotmail.