* [PATCH net-next 0/2] hv_netvsc: Implement NUMA aware memory allocation
@ 2015-05-29 0:07 K. Y. Srinivasan
2015-05-29 0:08 ` [PATCH V2 net-next 1/2] hv_netvsc: Allocate the receive buffer from the correct NUMA node K. Y. Srinivasan
2015-05-31 7:23 ` [PATCH net-next 0/2] hv_netvsc: Implement NUMA aware memory allocation David Miller
0 siblings, 2 replies; 4+ messages in thread
From: K. Y. Srinivasan @ 2015-05-29 0:07 UTC (permalink / raw)
To: davem, netdev, linux-kernel, devel, olaf, apw, jasowang; +Cc: K. Y. Srinivasan
Allocate both receive buffer and send buffer from the NUMA node assigned to the
primary channel.
K. Y. Srinivasan (2):
hv_netvsc: Allocate the receive buffer from the correct NUMA node
hv_netvsc: Allocate the sendbuf in a NUMA aware way
drivers/net/hyperv/netvsc.c | 11 +++++++++--
1 files changed, 9 insertions(+), 2 deletions(-)
--
1.7.4.1
^ permalink raw reply [flat|nested] 4+ messages in thread
* [PATCH V2 net-next 1/2] hv_netvsc: Allocate the receive buffer from the correct NUMA node
2015-05-29 0:07 [PATCH net-next 0/2] hv_netvsc: Implement NUMA aware memory allocation K. Y. Srinivasan
@ 2015-05-29 0:08 ` K. Y. Srinivasan
2015-05-29 0:08 ` [PATCH net-next 2/2] hv_netvsc: Allocate the sendbuf in a NUMA aware way K. Y. Srinivasan
2015-05-31 7:23 ` [PATCH net-next 0/2] hv_netvsc: Implement NUMA aware memory allocation David Miller
1 sibling, 1 reply; 4+ messages in thread
From: K. Y. Srinivasan @ 2015-05-29 0:08 UTC (permalink / raw)
To: davem, netdev, linux-kernel, devel, olaf, apw, jasowang
Allocate the receive bufer from the NUMA node assigned to the primary
channel.
Signed-off-by: K. Y. Srinivasan <kys@microsoft.com>
---
V2: Specify the tree for this patch.
drivers/net/hyperv/netvsc.c | 7 ++++++-
1 files changed, 6 insertions(+), 1 deletions(-)
diff --git a/drivers/net/hyperv/netvsc.c b/drivers/net/hyperv/netvsc.c
index b024968..d187965 100644
--- a/drivers/net/hyperv/netvsc.c
+++ b/drivers/net/hyperv/netvsc.c
@@ -227,13 +227,18 @@ static int netvsc_init_buf(struct hv_device *device)
struct netvsc_device *net_device;
struct nvsp_message *init_packet;
struct net_device *ndev;
+ int node;
net_device = get_outbound_net_device(device);
if (!net_device)
return -ENODEV;
ndev = net_device->ndev;
- net_device->recv_buf = vzalloc(net_device->recv_buf_size);
+ node = cpu_to_node(device->channel->target_cpu);
+ net_device->recv_buf = vzalloc_node(net_device->recv_buf_size, node);
+ if (!net_device->recv_buf)
+ net_device->recv_buf = vzalloc(net_device->recv_buf_size);
+
if (!net_device->recv_buf) {
netdev_err(ndev, "unable to allocate receive "
"buffer of size %d\n", net_device->recv_buf_size);
--
1.7.4.1
^ permalink raw reply related [flat|nested] 4+ messages in thread
* [PATCH net-next 2/2] hv_netvsc: Allocate the sendbuf in a NUMA aware way
2015-05-29 0:08 ` [PATCH V2 net-next 1/2] hv_netvsc: Allocate the receive buffer from the correct NUMA node K. Y. Srinivasan
@ 2015-05-29 0:08 ` K. Y. Srinivasan
0 siblings, 0 replies; 4+ messages in thread
From: K. Y. Srinivasan @ 2015-05-29 0:08 UTC (permalink / raw)
To: davem, netdev, linux-kernel, devel, olaf, apw, jasowang; +Cc: K. Y. Srinivasan
Allocate the send buffer in a NUMA aware way.
Signed-off-by: K. Y. Srinivasan <kys@microsoft.com>
---
drivers/net/hyperv/netvsc.c | 4 +++-
1 files changed, 3 insertions(+), 1 deletions(-)
diff --git a/drivers/net/hyperv/netvsc.c b/drivers/net/hyperv/netvsc.c
index d187965..06de98a 100644
--- a/drivers/net/hyperv/netvsc.c
+++ b/drivers/net/hyperv/netvsc.c
@@ -326,7 +326,9 @@ static int netvsc_init_buf(struct hv_device *device)
/* Now setup the send buffer.
*/
- net_device->send_buf = vzalloc(net_device->send_buf_size);
+ net_device->send_buf = vzalloc_node(net_device->send_buf_size, node);
+ if (!net_device->send_buf)
+ net_device->send_buf = vzalloc(net_device->send_buf_size);
if (!net_device->send_buf) {
netdev_err(ndev, "unable to allocate send "
"buffer of size %d\n", net_device->send_buf_size);
--
1.7.4.1
^ permalink raw reply related [flat|nested] 4+ messages in thread
* Re: [PATCH net-next 0/2] hv_netvsc: Implement NUMA aware memory allocation
2015-05-29 0:07 [PATCH net-next 0/2] hv_netvsc: Implement NUMA aware memory allocation K. Y. Srinivasan
2015-05-29 0:08 ` [PATCH V2 net-next 1/2] hv_netvsc: Allocate the receive buffer from the correct NUMA node K. Y. Srinivasan
@ 2015-05-31 7:23 ` David Miller
1 sibling, 0 replies; 4+ messages in thread
From: David Miller @ 2015-05-31 7:23 UTC (permalink / raw)
To: kys; +Cc: olaf, netdev, jasowang, linux-kernel, apw, devel
From: "K. Y. Srinivasan" <kys@microsoft.com>
Date: Thu, 28 May 2015 17:07:44 -0700
> Allocate both receive buffer and send buffer from the NUMA node assigned to the
> primary channel.
Series applied, thanks.
^ permalink raw reply [flat|nested] 4+ messages in thread
end of thread, other threads:[~2015-05-31 7:23 UTC | newest]
Thread overview: 4+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2015-05-29 0:07 [PATCH net-next 0/2] hv_netvsc: Implement NUMA aware memory allocation K. Y. Srinivasan
2015-05-29 0:08 ` [PATCH V2 net-next 1/2] hv_netvsc: Allocate the receive buffer from the correct NUMA node K. Y. Srinivasan
2015-05-29 0:08 ` [PATCH net-next 2/2] hv_netvsc: Allocate the sendbuf in a NUMA aware way K. Y. Srinivasan
2015-05-31 7:23 ` [PATCH net-next 0/2] hv_netvsc: Implement NUMA aware memory allocation 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).