[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <F86E8680A7D9D74A99DC6345E35A6929502312B0@orsmsx503.amr.corp.intel.com>
Date: Tue, 19 Jan 2010 08:10:15 -0800
From: "Waskiewicz Jr, Peter P" <peter.p.waskiewicz.jr@...el.com>
To: Andi Kleen <andi@...stfloor.org>,
"Kirsher, Jeffrey T" <jeffrey.t.kirsher@...el.com>
CC: "davem@...emloft.net" <davem@...emloft.net>,
"netdev@...r.kernel.org" <netdev@...r.kernel.org>,
"gospo@...hat.com" <gospo@...hat.com>
Subject: RE: [net-next-2.6 PATCH 1/5] ixgbe: Allocate driver resources per
NUMA node
>-----Original Message-----
>From: Andi Kleen [mailto:andi@...stfloor.org]
>Sent: Thursday, January 14, 2010 3:02 AM
>To: Kirsher, Jeffrey T
>Cc: davem@...emloft.net; netdev@...r.kernel.org; gospo@...hat.com;
>Waskiewicz Jr, Peter P
>Subject: Re: [net-next-2.6 PATCH 1/5] ixgbe: Allocate driver resources
>per NUMA node
>
>Jeff Kirsher <jeffrey.t.kirsher@...el.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)
So you'd rather see us call kzalloc() if kzalloc_node() fails, instead of immediately failing out to err_out?
Thanks,
-PJ
--
To unsubscribe from this list: send the line "unsubscribe netdev" in
the body of a message to majordomo@...r.kernel.org
More majordomo info at http://vger.kernel.org/majordomo-info.html
Powered by blists - more mailing lists