mirror of https://lore.kernel.org/lkml/
 help / color / mirror / Atom feed
From: Andrew Morton <akpm@osdl.org>
To: Nick Piggin <nickpiggin@yahoo.com.au>
Cc: vatsa@in.ibm.com, mingo@elte.hu, suresh.b.siddha@intel.com,
	dino@in.ibm.com, pj@sgi.com, hawkes@sgi.com,
	linux-kernel@vger.kernel.org
Subject: Re: [PATCH 2.6.16-mm2 1/4] sched_domain - handle kmalloc failure
Date: Sat, 1 Apr 2006 21:25:33 -0800	[thread overview]
Message-ID: <20060401212533.61a02f9d.akpm@osdl.org> (raw)
In-Reply-To: <442F2A79.1040903@yahoo.com.au>

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.

  reply	other threads:[~2006-04-02  5:26 UTC|newest]

Thread overview: 4+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2006-04-01 18:52 Srivatsa Vaddagiri
2006-04-02  1:35 ` Nick Piggin
2006-04-02  5:25   ` Andrew Morton [this message]
2006-04-02  5:37     ` Nick Piggin

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=20060401212533.61a02f9d.akpm@osdl.org \
    --to=akpm@osdl.org \
    --cc=dino@in.ibm.com \
    --cc=hawkes@sgi.com \
    --cc=linux-kernel@vger.kernel.org \
    --cc=mingo@elte.hu \
    --cc=nickpiggin@yahoo.com.au \
    --cc=pj@sgi.com \
    --cc=suresh.b.siddha@intel.com \
    --cc=vatsa@in.ibm.com \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox

Powered by JetHome