Skip to content

Commit 598c12d

Browse files
koct9idavem330
authored andcommitted
ovs: do not allocate memory from offline numa node
When openvswitch tries allocate memory from offline numa node 0: stats = kmem_cache_alloc_node(flow_stats_cache, GFP_KERNEL | __GFP_ZERO, 0) It catches VM_BUG_ON(nid < 0 || nid >= MAX_NUMNODES || !node_online(nid)) [ replaced with VM_WARN_ON(!node_online(nid)) recently ] in linux/gfp.h This patch disables numa affinity in this case. Signed-off-by: Konstantin Khlebnikov <khlebnikov@yandex-team.ru> Acked-by: Pravin B Shelar <pshelar@nicira.com> Signed-off-by: David S. Miller <davem@davemloft.net>
1 parent 93d08b6 commit 598c12d

File tree

1 file changed

+2
-1
lines changed

1 file changed

+2
-1
lines changed

net/openvswitch/flow_table.c

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -93,7 +93,8 @@ struct sw_flow *ovs_flow_alloc(void)
9393

9494
/* Initialize the default stat node. */
9595
stats = kmem_cache_alloc_node(flow_stats_cache,
96-
GFP_KERNEL | __GFP_ZERO, 0);
96+
GFP_KERNEL | __GFP_ZERO,
97+
node_online(0) ? 0 : NUMA_NO_NODE);
9798
if (!stats)
9899
goto err;
99100

0 commit comments

Comments
 (0)