From: Andi Kleen <andi@firstfloor•org>
To: Jeff Kirsher <jeffrey.t.kirsher@intel•com>
Cc: davem@davemloft•net, netdev@vger•kernel.org, gospo@redhat•com,
Peter P Waskiewicz Jr <peter.p.waskiewicz.jr@intel•com>
Subject: Re: [net-next-2.6 PATCH 1/5] ixgbe: Allocate driver resources per NUMA node
Date: Thu, 14 Jan 2010 12:02:06 +0100 [thread overview]
Message-ID: <87y6k1dk5t.fsf@basil.nowhere.org> (raw)
In-Reply-To: <20100107044741.28605.31414.stgit@localhost.localdomain> (Jeff Kirsher's message of "Wed, 06 Jan 2010 20:48:26 -0800")
Jeff Kirsher <jeffrey.t.kirsher@intel•com> writes:
> enum ixbge_state_t {
> diff --git a/drivers/net/ixgbe/ixgbe_main.c b/drivers/net/ixgbe/ixgbe_main.c
> index 2ad754c..6895de7 100644
> --- a/drivers/net/ixgbe/ixgbe_main.c
> +++ b/drivers/net/ixgbe/ixgbe_main.c
> @@ -3741,7 +3741,8 @@ static int ixgbe_alloc_q_vectors(struct ixgbe_adapter *adapter)
> }
>
> for (q_idx = 0; q_idx < num_q_vectors; q_idx++) {
> - q_vector = kzalloc(sizeof(struct ixgbe_q_vector), GFP_KERNEL);
> + q_vector = kzalloc_node(sizeof(struct ixgbe_q_vector),
> + GFP_KERNEL, adapter->node);
The problem of doing this is that the node might be full or have
no memory and k*alloc_node will fail then.
So you would need a fallback to be reliable (we probably should have a
generic utility function for this somewhere, but we don't currently)
-Andi
--
ak@linux•intel.com -- Speaking for myself only.
next prev parent reply other threads:[~2010-01-14 11:02 UTC|newest]
Thread overview: 25+ messages / expand[flat|nested] mbox.gz Atom feed top
2010-01-07 4:48 [net-next-2.6 PATCH 1/5] ixgbe: Allocate driver resources per NUMA node Jeff Kirsher
2010-01-07 4:48 ` [net-next-2.6 PATCH 2/5] ixgbe: Make descriptor ring allocations NUMA-aware Jeff Kirsher
2010-01-08 8:21 ` David Miller
2010-01-08 8:25 ` Waskiewicz Jr, Peter P
2010-01-08 8:31 ` David Miller
2010-01-08 8:36 ` Waskiewicz Jr, Peter P
2010-01-07 4:49 ` [net-next-2.6 PATCH 3/5] ethtool: Introduce n-tuple filter programming support Jeff Kirsher
2010-01-08 8:23 ` David Miller
2010-01-08 8:34 ` Waskiewicz Jr, Peter P
2010-01-08 8:38 ` David Miller
2010-01-08 8:42 ` Waskiewicz Jr, Peter P
2010-01-11 19:32 ` Ben Hutchings
2010-01-12 19:13 ` Waskiewicz Jr, Peter P
2010-01-21 2:54 ` David Miller
2010-01-07 4:49 ` [net-next-2.6 PATCH 4/5] ixgbe: Add Flow Director configuration support as a mod parameter Jeff Kirsher
2010-01-08 8:24 ` David Miller
2010-01-08 8:28 ` Waskiewicz Jr, Peter P
2010-01-08 8:32 ` David Miller
2010-01-08 8:36 ` Waskiewicz Jr, Peter P
2010-01-07 4:49 ` [net-next-2.6 PATCH 5/5] ixgbe: Add support for the new ethtool n-tuple programming interface Jeff Kirsher
2010-01-08 8:26 ` David Miller
2010-01-14 11:02 ` Andi Kleen [this message]
2010-01-19 16:10 ` [net-next-2.6 PATCH 1/5] ixgbe: Allocate driver resources per NUMA node Waskiewicz Jr, Peter P
2010-01-19 19:34 ` Andi Kleen
2010-01-19 19:34 ` Waskiewicz Jr, Peter P
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=87y6k1dk5t.fsf@basil.nowhere.org \
--to=andi@firstfloor$(echo .)org \
--cc=davem@davemloft$(echo .)net \
--cc=gospo@redhat$(echo .)com \
--cc=jeffrey.t.kirsher@intel$(echo .)com \
--cc=netdev@vger$(echo .)kernel.org \
--cc=peter.p.waskiewicz.jr@intel$(echo .)com \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
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