2001-07-06 11:57:31

by Vasu Varma P V

[permalink] [raw]
Subject: scheduling in kmalloc()

if we use any thing other than GFP_ATOMIC, does it result in scheduling
out the process if there is no memory available?
with GFP_KERNRL, I think we try freeing pages to service the current
request.
or is there any possibility of kmalloc() failing even with GFP_KERNEL?

thx,
Vasu.


2001-07-06 15:04:04

by Alan

[permalink] [raw]
Subject: Re: scheduling in kmalloc()

> if we use any thing other than GFP_ATOMIC, does it result in scheduling
> out the process if there is no memory available?
> with GFP_KERNRL, I think we try freeing pages to service the current
> request.
> or is there any possibility of kmalloc() failing even with GFP_KERNEL?

kmalloc can always fail, looping on a kmalloc at high level can almost always
cause deadlocks so you need to be prepared to fail