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

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



Nick Piggin <[email protected]> wrote:
>
> Srivatsa Vaddagiri wrote:
> > Andrew/Nick/Ingo,
> > 	Here's a different version of the patch that tries to handle mem
> > allocation failures in build_sched_domains by bailing out and cleaning up 
> > thus-far allocated memory. The patch has a direct consequence that we disable 
> > load balancing completely (even at sibling level) upon *any* memory allocation 
> > failure. Is that acceptable?
> > 
> 
> I guess so. Ideal solution would be to make all required allocations first,
> then fail the build_sched_domains and fall back to the old structure.

I'd have thought so.

> But
> I guess that gets pretty complicated.

Maybe.  Sometimes it's just a matter of running the code twice - first pass
is allocate-stuff mode, second pass is use-stuff mode.

> In reality (and after your patch 2/4), I don't think the page allocator will
> ever fail any of these allocations.

That is presently true, as long as the amounts being allocated are small
enough.

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

No new __GFP_NOFAILs, please.

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.
-
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to [email protected]
More majordomo info at  http://vger.kernel.org/majordomo-info.html
Please read the FAQ at  http://www.tux.org/lkml/

[Index of Archives]     [Kernel Newbies]     [Netfilter]     [Bugtraq]     [Photo]     [Stuff]     [Gimp]     [Yosemite News]     [MIPS Linux]     [ARM Linux]     [Linux Security]     [Linux RAID]     [Video 4 Linux]     [Linux for the blind]     [Linux Resources]
  Powered by Linux