mirror of https://lore.kernel.org/lkml/
 help / color / mirror / Atom feed
From: Peter Zijlstra <a.p.zijlstra@chello.nl>
To: David Rientjes <rientjes@google.com>
Cc: "Luck, Tony" <tony.luck@intel.com>,
	Linus Torvalds <torvalds@linux-foundation.org>,
	linux-kernel@vger.kernel.org
Subject: Re: [PATCH] sched: Don't try allocating memory from offline nodes
Date: Wed, 30 May 2012 11:44:17 +0200	[thread overview]
Message-ID: <1338371057.26856.226.camel@twins> (raw)
In-Reply-To: <alpine.DEB.2.00.1205292019560.14373@chino.kir.corp.google.com>

On Tue, 2012-05-29 at 20:21 -0700, David Rientjes wrote:
> On Tue, 29 May 2012, Luck, Tony wrote:
> 
> > Index: linux-2.6/kernel/sched/core.c
> > ===================================================================
> > --- linux-2.6.orig/kernel/sched/core.c
> > +++ linux-2.6/kernel/sched/core.c
> > @@ -6449,7 +6449,7 @@ static void sched_init_numa(void)
> >  			return;
> >  
> >  		for (j = 0; j < nr_node_ids; j++) {
> > -			struct cpumask *mask = kzalloc_node(cpumask_size(), GFP_KERNEL, j);
> > +			struct cpumask *mask = kzalloc(cpumask_size(), GFP_KERNEL);
> >  			if (!mask)
> >  				return;
> >  
> 
> It's definitely better if we can allocate on the node, though, so perhaps 
> do the same thing that I did in 
> http://marc.info/?l=linux-kernel&m=133778739503111 by doing
> kzalloc_node(..., node_online(j) ? j : NUMA_NO_NODE)?

This data isn't used overly much, only when rebuilding the sched
domains, so its not performance critical. I only used per-node
allocations because it seemed the right thing to do. If it doesn't work,
I wouldn't bother with making it more complex.

  reply	other threads:[~2012-05-30  9:44 UTC|newest]

Thread overview: 4+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2012-05-29 17:30 Luck, Tony
2012-05-30  3:21 ` David Rientjes
2012-05-30  9:44   ` Peter Zijlstra [this message]
2012-05-30 21:39     ` David Rientjes

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=1338371057.26856.226.camel@twins \
    --to=a.p.zijlstra@chello.nl \
    --cc=linux-kernel@vger.kernel.org \
    --cc=rientjes@google.com \
    --cc=tony.luck@intel.com \
    --cc=torvalds@linux-foundation.org \
    /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

all inboxes | Powered by JetHome®