public inbox for linux-kernel@vger.kernel.org
 help / color / mirror / Atom feed
From: "Siddha, Suresh B" <suresh.b.siddha@intel.com>
To: Srivatsa Vaddagiri <vatsa@in.ibm.com>
Cc: Nick Piggin <nickpiggin@yahoo.com.au>,
	Ingo Molnar <mingo@elte.hu>,
	pj@sgi.com, hawkes@sgi.com, Dinakar Guniguntala <dino@in.ibm.com>,
	Andrew Morton <akpm@osdl.org>,
	linux-kernel@vger.kernel.org, suresh.b.siddha@intel.com
Subject: Re: [PATCH 2.6.16-mm1 2/2] sched_domains: Allocate sched_groups dynamically
Date: Mon, 27 Mar 2006 13:18:26 -0800	[thread overview]
Message-ID: <20060327131826.A12364@unix-os.sc.intel.com> (raw)
In-Reply-To: <20060325082804.GB17011@in.ibm.com>; from vatsa@in.ibm.com on Sat, Mar 25, 2006 at 01:58:04PM +0530

On Sat, Mar 25, 2006 at 01:58:04PM +0530, Srivatsa Vaddagiri wrote:
> +		if (!sched_group_phys && !alloc_phys_failed) {
> +			sched_group_phys
> +				= kmalloc(sizeof(struct sched_group) * NR_CPUS,
> +					  GFP_KERNEL);
> +			if (!sched_group_phys) {
> +				printk (KERN_WARNING
> +				"Can not alloc phys sched group\n");
> +				alloc_phys_failed = 1;
> +			}
> +			sched_group_phys_bycpu[i] = sched_group_phys;
> +		}

We can move this allocation outside the for loop and avoid the complexities
of alloc_phys_failed, alloc_core_failed..

thanks,
suresh

  reply	other threads:[~2006-03-27 21:18 UTC|newest]

Thread overview: 7+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2006-03-25  8:28 [PATCH 2.6.16-mm1 2/2] sched_domains: Allocate sched_groups dynamically Srivatsa Vaddagiri
2006-03-27 21:18 ` Siddha, Suresh B [this message]
2006-07-07  0:01 ` Paul Jackson
2006-07-07  0:08   ` Siddha, Suresh B
2006-07-07  0:34     ` Paul Jackson
2006-07-07  0:36       ` Siddha, Suresh B
2006-07-07  5:26         ` Paul Jackson

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=20060327131826.A12364@unix-os.sc.intel.com \
    --to=suresh.b.siddha@intel.com \
    --cc=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=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