All of lore.kernel.org
 help / color / mirror / Atom feed
From: Mike Travis <travis@sgi.com>
To: Alexey Dobriyan <adobriyan@gmail.com>
Cc: Andrew Morton <akpm@linux-foundation.org>,
	linux-mm@kvack.org, linux-kernel@vger.kernel.org,
	"David S. Miller" <davem@davemloft.net>,
	Alexey Kuznetsov <kuznet@ms2.inr.ac.ru>,
	James Morris <jmorris@namei.org>,
	Patrick McHardy <kaber@trash.net>
Subject: Re: [PATCH 08/10] net: remove NR_CPUS arrays in net/core/dev.c
Date: Tue, 25 Mar 2008 08:02:28 -0700	[thread overview]
Message-ID: <47E91404.7030901@sgi.com> (raw)
In-Reply-To: <20080325055752.GA4774@martell.zuzino.mipt.ru>

Alexey Dobriyan wrote:
> On Mon, Mar 24, 2008 at 07:20:02PM -0700, Mike Travis wrote:
>> Remove the fixed size channels[NR_CPUS] array in
>> net/core/dev.c and dynamically allocate array based on
>> nr_cpu_ids.
> 
>> @@ -4362,6 +4362,13 @@ netdev_dma_event(struct dma_client *clie
>>   */
>>  static int __init netdev_dma_register(void)
>>  {
>> +	net_dma.channels = kzalloc(nr_cpu_ids * sizeof(struct net_dma),
>> +								GFP_KERNEL);
>> +	if (unlikely(net_dma.channels)) {
> 
> 		     !net_dma.channels
> 
>> +		printk(KERN_NOTICE
>> +				"netdev_dma: no memory for net_dma.channels\n");
>> +		return -ENOMEM;
>> +	}


Got it, Thanks!  

-Mike

WARNING: multiple messages have this Message-ID (diff)
From: Mike Travis <travis@sgi.com>
To: Alexey Dobriyan <adobriyan@gmail.com>
Cc: Andrew Morton <akpm@linux-foundation.org>,
	linux-mm@kvack.org, linux-kernel@vger.kernel.org,
	"David S. Miller" <davem@davemloft.net>,
	Alexey Kuznetsov <kuznet@ms2.inr.ac.ru>,
	James Morris <jmorris@namei.org>,
	Patrick McHardy <kaber@trash.net>
Subject: Re: [PATCH 08/10] net: remove NR_CPUS arrays in net/core/dev.c
Date: Tue, 25 Mar 2008 08:02:28 -0700	[thread overview]
Message-ID: <47E91404.7030901@sgi.com> (raw)
In-Reply-To: <20080325055752.GA4774@martell.zuzino.mipt.ru>

Alexey Dobriyan wrote:
> On Mon, Mar 24, 2008 at 07:20:02PM -0700, Mike Travis wrote:
>> Remove the fixed size channels[NR_CPUS] array in
>> net/core/dev.c and dynamically allocate array based on
>> nr_cpu_ids.
> 
>> @@ -4362,6 +4362,13 @@ netdev_dma_event(struct dma_client *clie
>>   */
>>  static int __init netdev_dma_register(void)
>>  {
>> +	net_dma.channels = kzalloc(nr_cpu_ids * sizeof(struct net_dma),
>> +								GFP_KERNEL);
>> +	if (unlikely(net_dma.channels)) {
> 
> 		     !net_dma.channels
> 
>> +		printk(KERN_NOTICE
>> +				"netdev_dma: no memory for net_dma.channels\n");
>> +		return -ENOMEM;
>> +	}


Got it, Thanks!  

-Mike

--
To unsubscribe, send a message with 'unsubscribe linux-mm' in
the body to majordomo@kvack.org.  For more info on Linux MM,
see: http://www.linux-mm.org/ .
Don't email: <a href=mailto:"dont@kvack.org"> email@kvack.org </a>

  reply	other threads:[~2008-03-25 15:02 UTC|newest]

Thread overview: 26+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2008-03-25  2:19 [PATCH 00/10] NR_CPUS: third reduction of NR_CPUS memory usage Mike Travis
2008-03-25  2:19 ` Mike Travis
2008-03-25  2:19 ` [PATCH 01/10] x86_64: Cleanup non-smp usage of cpu maps v4 Mike Travis
2008-03-25  2:19   ` Mike Travis
2008-03-25  2:19 ` [PATCH 02/10] init: move setup of nr_cpu_ids to as early as possible v4 Mike Travis
2008-03-25  2:19   ` Mike Travis
2008-03-25  2:19 ` [PATCH 03/10] cpufreq: change cpu freq arrays to per_cpu variables Mike Travis
2008-03-25  2:19   ` Mike Travis
2008-03-25  2:19 ` [PATCH 04/10] acpi: change processors from array to per_cpu variable Mike Travis
2008-03-25  2:19   ` Mike Travis
2008-03-25  2:19 ` [PATCH 05/10] cpumask: Add cpumask_scnprintf_len function Mike Travis
2008-03-25  2:19   ` Mike Travis
2008-03-25  2:20 ` [PATCH 06/10] x86: reduce memory and stack usage in intel_cacheinfo Mike Travis
2008-03-25  2:20   ` Mike Travis
2008-03-25  2:20 ` [PATCH 07/10] cpu: change cpu_sys_devices from array to per_cpu variable Mike Travis
2008-03-25  2:20   ` Mike Travis
2008-03-25  2:20 ` [PATCH 08/10] net: remove NR_CPUS arrays in net/core/dev.c Mike Travis
2008-03-25  2:20   ` Mike Travis
2008-03-25  5:57   ` Alexey Dobriyan
2008-03-25  5:57     ` Alexey Dobriyan
2008-03-25 15:02     ` Mike Travis [this message]
2008-03-25 15:02       ` Mike Travis
2008-03-25  2:20 ` [PATCH 09/10] x86: oprofile: remove NR_CPUS arrays in arch/x86/oprofile/nmi_int.c Mike Travis
2008-03-25  2:20   ` Mike Travis
2008-03-25  2:20 ` [PATCH 10/10] sched: Remove fixed NR_CPUS sized arrays in kernel_sched.c Mike Travis
2008-03-25  2:20   ` Mike Travis

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=47E91404.7030901@sgi.com \
    --to=travis@sgi.com \
    --cc=adobriyan@gmail.com \
    --cc=akpm@linux-foundation.org \
    --cc=davem@davemloft.net \
    --cc=jmorris@namei.org \
    --cc=kaber@trash.net \
    --cc=kuznet@ms2.inr.ac.ru \
    --cc=linux-kernel@vger.kernel.org \
    --cc=linux-mm@kvack.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 an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.