From: Alexey Dobriyan <adobriyan@gmail.com>
To: Mike Travis <travis@sgi.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:57:52 +0300 [thread overview]
Message-ID: <20080325055752.GA4774@martell.zuzino.mipt.ru> (raw)
In-Reply-To: <20080325021956.212787000@polaris-admin.engr.sgi.com>
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;
> + }
--
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>
next prev parent reply other threads:[~2008-03-25 6:00 UTC|newest]
Thread overview: 13+ 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 ` [PATCH 01/10] x86_64: Cleanup non-smp usage of cpu maps v4 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 ` [PATCH 03/10] cpufreq: change cpu freq arrays to per_cpu variables 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 ` [PATCH 05/10] cpumask: Add cpumask_scnprintf_len function 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 ` [PATCH 07/10] cpu: change cpu_sys_devices from array to per_cpu variable 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 5:57 ` Alexey Dobriyan [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 ` [PATCH 10/10] sched: Remove fixed NR_CPUS sized arrays in kernel_sched.c 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=20080325055752.GA4774@martell.zuzino.mipt.ru \
--to=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 \
--cc=travis@sgi.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