From: Vlastimil Babka <vbabka@suse.cz>
To: Konstantin Khlebnikov <khlebnikov@yandex-team.ru>,
dev@openvswitch.org, Pravin Shelar <pshelar@nicira.com>,
"David S. Miller" <davem@davemloft.net>
Cc: netdev@vger.kernel.org, linux-kernel@vger.kernel.org, linux-mm@kvack.org
Subject: Re: [PATCH] ovs: do not allocate memory from offline numa node
Date: Mon, 5 Oct 2015 15:59:20 +0200 [thread overview]
Message-ID: <56128238.8010305@suse.cz> (raw)
In-Reply-To: <20151002101822.12499.27658.stgit@buzz>
On 10/02/2015 12:18 PM, Konstantin Khlebnikov wrote:
> 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>
...
> diff --git a/net/openvswitch/flow_table.c b/net/openvswitch/flow_table.c
> index f2ea83ba4763..c7f74aab34b9 100644
> --- a/net/openvswitch/flow_table.c
> +++ b/net/openvswitch/flow_table.c
> @@ -93,7 +93,8 @@ struct sw_flow *ovs_flow_alloc(void)
>
> /* Initialize the default stat node. */
> stats = kmem_cache_alloc_node(flow_stats_cache,
> - GFP_KERNEL | __GFP_ZERO, 0);
> + GFP_KERNEL | __GFP_ZERO,
> + node_online(0) ? 0 : NUMA_NO_NODE);
Stupid question: can node 0 become offline between this check, and the
VM_WARN_ON? :) BTW what kind of system has node 0 offline?
> if (!stats)
> goto err;
>
>
--
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>
WARNING: multiple messages have this Message-ID (diff)
From: Vlastimil Babka <vbabka@suse.cz>
To: Konstantin Khlebnikov <khlebnikov@yandex-team.ru>,
dev@openvswitch.org, Pravin Shelar <pshelar@nicira.com>,
"David S. Miller" <davem@davemloft.net>
Cc: netdev@vger.kernel.org, linux-kernel@vger.kernel.org, linux-mm@kvack.org
Subject: Re: [PATCH] ovs: do not allocate memory from offline numa node
Date: Mon, 5 Oct 2015 15:59:20 +0200 [thread overview]
Message-ID: <56128238.8010305@suse.cz> (raw)
In-Reply-To: <20151002101822.12499.27658.stgit@buzz>
On 10/02/2015 12:18 PM, Konstantin Khlebnikov wrote:
> 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>
...
> diff --git a/net/openvswitch/flow_table.c b/net/openvswitch/flow_table.c
> index f2ea83ba4763..c7f74aab34b9 100644
> --- a/net/openvswitch/flow_table.c
> +++ b/net/openvswitch/flow_table.c
> @@ -93,7 +93,8 @@ struct sw_flow *ovs_flow_alloc(void)
>
> /* Initialize the default stat node. */
> stats = kmem_cache_alloc_node(flow_stats_cache,
> - GFP_KERNEL | __GFP_ZERO, 0);
> + GFP_KERNEL | __GFP_ZERO,
> + node_online(0) ? 0 : NUMA_NO_NODE);
Stupid question: can node 0 become offline between this check, and the
VM_WARN_ON? :) BTW what kind of system has node 0 offline?
> if (!stats)
> goto err;
>
>
next prev parent reply other threads:[~2015-10-05 13:59 UTC|newest]
Thread overview: 25+ messages / expand[flat|nested] mbox.gz Atom feed top
2015-10-02 10:18 [PATCH] ovs: do not allocate memory from offline numa node Konstantin Khlebnikov
2015-10-02 10:18 ` Konstantin Khlebnikov
2015-10-02 22:38 ` Pravin Shelar
2015-10-02 22:38 ` Pravin Shelar
2015-10-05 13:44 ` David Miller
2015-10-05 13:44 ` David Miller
2015-10-05 13:59 ` Vlastimil Babka [this message]
2015-10-05 13:59 ` Vlastimil Babka
2015-10-05 20:25 ` Alexander Duyck
2015-10-05 20:25 ` Alexander Duyck
2015-10-07 1:01 ` [ovs-dev] " Jesse Gross
2015-10-07 1:01 ` Jesse Gross
2015-10-07 17:47 ` Jarno Rajahalme
2015-10-07 17:47 ` Jarno Rajahalme
2015-10-08 23:03 ` Jesse Gross
2015-10-08 23:03 ` Jesse Gross
2015-10-09 15:54 ` Jarno Rajahalme
2015-10-09 15:54 ` Jarno Rajahalme
2015-10-09 22:11 ` [ovs-dev] " Jesse Gross
2015-10-09 22:11 ` Jesse Gross
2015-10-10 0:02 ` Jarno Rajahalme
2015-10-20 17:58 ` Jarno Rajahalme
2015-10-21 8:55 ` Vlastimil Babka
2015-10-21 8:55 ` Vlastimil Babka
2015-10-21 8:55 ` Vlastimil Babka
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=56128238.8010305@suse.cz \
--to=vbabka@suse.cz \
--cc=davem@davemloft.net \
--cc=dev@openvswitch.org \
--cc=khlebnikov@yandex-team.ru \
--cc=linux-kernel@vger.kernel.org \
--cc=linux-mm@kvack.org \
--cc=netdev@vger.kernel.org \
--cc=pshelar@nicira.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 an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.