Re: [PATCH 2.6.16-mm2 1/4] sched_domain - handle kmalloc failure

From: Nick Piggin
Date: Sun Apr 02 2006 - 05:15:57 EST


Andrew Morton wrote:
Nick Piggin <nickpiggin@xxxxxxxxxxxx> wrote:

In that case, would it be simpler just
to add a __GFP_NOFAIL here and forget about it?


No new __GFP_NOFAILs, please.

It isn't a new one as such. It would simply make explicit the fact
that this code really can't handle allocation failures, and it is
presently depending on the allocator implementation to work.

The fact that the CPU addition will succeed, but it'll run forever more
with load balancing disabled still seems Just Wrong to me. We should
either completely succeed or completely fail.


Yes. But we shouldn't partially fail and leave the machine crippled.

Hence, __GFP_NOFAIL as a good marker for someone who gets keen and
comes along to fix it up properly. If it were trivial to fix it, I
wouldn't suggest adding the __GFP_NOFAIL.

--
SUSE Labs, Novell Inc.
Send instant messages to your online friends http://au.messenger.yahoo.com -
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@xxxxxxxxxxxxxxx
More majordomo info at http://vger.kernel.org/majordomo-info.html
Please read the FAQ at http://www.tux.org/lkml/