lkml.org 
[lkml]   [2006]   [Apr]   [2]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
/
Date
From
SubjectRe: [PATCH 2.6.16-mm2 1/4] sched_domain - handle kmalloc failure
Nick Piggin <nickpiggin@yahoo.com.au> 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 majordomo@vger.kernel.org
More majordomo info at http://vger.kernel.org/majordomo-info.html
Please read the FAQ at http://www.tux.org/lkml/

\
 
 \ /
  Last update: 2006-04-03 14:39    [W:0.061 / U:1.020 seconds]
©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site