netdev.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
* [PATCH net-next] rps: NUMA flow limit allocations
@ 2013-12-18 14:46 Eric Dumazet
  2013-12-20  0:00 ` David Miller
  0 siblings, 1 reply; 2+ messages in thread
From: Eric Dumazet @ 2013-12-18 14:46 UTC (permalink / raw)
  To: David Miller; +Cc: netdev, Willem de Bruijn

From: Eric Dumazet <edumazet@google.com>

Given we allocate memory for each cpu, we can do this
using NUMA affinities, instead of using NUMA policies
of the process changing flow_limit_cpu_bitmap value.

Signed-off-by: Eric Dumazet <edumazet@google.com>
Cc: Willem de Bruijn <willemb@google.com>
---
 net/core/sysctl_net_core.c |    3 ++-
 1 file changed, 2 insertions(+), 1 deletion(-)

diff --git a/net/core/sysctl_net_core.c b/net/core/sysctl_net_core.c
index cca444190907..cf9cd13509a7 100644
--- a/net/core/sysctl_net_core.c
+++ b/net/core/sysctl_net_core.c
@@ -122,7 +122,8 @@ static int flow_limit_cpu_sysctl(struct ctl_table *table, int write,
 				synchronize_rcu();
 				kfree(cur);
 			} else if (!cur && cpumask_test_cpu(i, mask)) {
-				cur = kzalloc(len, GFP_KERNEL);
+				cur = kzalloc_node(len, GFP_KERNEL,
+						   cpu_to_node(i));
 				if (!cur) {
 					/* not unwinding previous changes */
 					ret = -ENOMEM;

^ permalink raw reply related	[flat|nested] 2+ messages in thread

* Re: [PATCH net-next] rps: NUMA flow limit allocations
  2013-12-18 14:46 [PATCH net-next] rps: NUMA flow limit allocations Eric Dumazet
@ 2013-12-20  0:00 ` David Miller
  0 siblings, 0 replies; 2+ messages in thread
From: David Miller @ 2013-12-20  0:00 UTC (permalink / raw)
  To: eric.dumazet; +Cc: netdev, willemb

From: Eric Dumazet <eric.dumazet@gmail.com>
Date: Wed, 18 Dec 2013 06:46:23 -0800

> From: Eric Dumazet <edumazet@google.com>
> 
> Given we allocate memory for each cpu, we can do this
> using NUMA affinities, instead of using NUMA policies
> of the process changing flow_limit_cpu_bitmap value.
> 
> Signed-off-by: Eric Dumazet <edumazet@google.com>

Applied, thanks Eric.

^ permalink raw reply	[flat|nested] 2+ messages in thread

end of thread, other threads:[~2013-12-20  0:00 UTC | newest]

Thread overview: 2+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2013-12-18 14:46 [PATCH net-next] rps: NUMA flow limit allocations Eric Dumazet
2013-12-20  0:00 ` David Miller

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).