[RFC] Should lmb_alloc() always panic on failure?

Anton Blanchard anton at samba.org
Thu Dec 15 11:57:18 EST 2005


 
Hi,

> Currently lmb_alloc(_base) returns 0 if it can't allocate memory, but
> a lot of places don't actualyl check. I was thinking it might be
> better if it just panicked.

Sounds reasonable to me.

> The only other caller is careful_allocation(), which checks and retries the 
> alloc with different parameters - we could accomodate this with an 
> __lmb_alloc() or similar.

Yeah in that case we are attempting to get node local memory but if that
fails we can go off node. We sometimes have to create 0 size zones (eg
if there is PCI or CPUs and no memory in the node), so that case can hit.

Anton



More information about the Linuxppc64-dev mailing list