[Hyper-V] hv_netvsc: Eliminate memory allocation in the packet send path

Bug #1452074 reported by Joshua R. Poulson
20
This bug affects 3 people
Affects Status Importance Assigned to Milestone
linux (Ubuntu)
In Progress
High
Joseph Salisbury
Trusty
In Progress
High
Joseph Salisbury
Utopic
In Progress
High
Joseph Salisbury
Vivid
In Progress
High
Joseph Salisbury
Wily
In Progress
High
Joseph Salisbury

Bug Description

K. Y. Srinivasan (2):
  hyperv: Cleanup the test for freeing skb when we use sendbuf
    mechanism
  hyperv: Eliminate memory allocation in the packet send path

 drivers/net/hyperv/hyperv_net.h | 3 +-
 drivers/net/hyperv/netvsc.c | 9 ++++-
 drivers/net/hyperv/netvsc_drv.c | 70 ++++++++++++++++++++++++++----------
 drivers/net/hyperv/rndis_filter.c | 2 +
 4 files changed, 61 insertions(+), 23 deletions(-)

These have landed in net-next by David Miller

https://git.kernel.org/cgit/linux/kernel/git/davem/net-next.git/commit/?id=3271e4f18d9a4ec9ac5568f94444dac08f29c5a0
https://git.kernel.org/cgit/linux/kernel/git/davem/net-next.git/commit/?id=b08cc79155fc26d0d112b1470d1ece5034651a4b
https://git.kernel.org/cgit/linux/kernel/git/davem/net-next.git/commit/?id=cbacec76bcd03ff21b37ac331e652b5a8f3ea644

Patch to a patch ->

Commit b08cc79155fc26d0d112b1470d1ece5034651a4b eliminated memory
allocation in the packet send path:

    "hv_netvsc: Eliminate memory allocation in the packet send path

    The network protocol used to communicate with the host is the remote ndis (rndis)
    protocol. We need to decorate each outgoing packet with a rndis header and
    additional rndis state (rndis per-packet state). To manage this state, we
    currently allocate memory in the transmit path. Eliminate this allocation by
    requesting additional head room in the skb."

This commit introduced a bug since it did not account for the case if the skb
was cloned. Fix this bug.

https://git.kernel.org/cgit/linux/kernel/git/davem/net-next.git/commit/?id=b56fc3c536541c8081cd5f1f1d101a16c002a365

Revision history for this message
Joshua R. Poulson (jrp) wrote :

This kernel patch applies to 15.10, 15.04, 14.10, 14.04, and 14.04 HWE

Revision history for this message
Brad Figg (brad-figg) wrote : Missing required logs.

This bug is missing log files that will aid in diagnosing the problem. From a terminal window please run:

apport-collect 1452074

and then change the status of the bug to 'Confirmed'.

If, due to the nature of the issue you have encountered, you are unable to run this command, please add a comment stating that fact and change the bug status to 'Confirmed'.

This change has been made by an automated script, maintained by the Ubuntu Kernel Team.

Changed in linux (Ubuntu):
status: New → Incomplete
Robert C Jennings (rcj)
tags: added: kernel-hyper-v
Revision history for this message
Joshua R. Poulson (jrp) wrote :

These are upstream commits, not a apport-based report.

Changed in linux (Ubuntu):
status: Incomplete → Confirmed
Revision history for this message
Joshua R. Poulson (jrp) wrote :
Changed in linux (Ubuntu):
importance: Undecided → Medium
importance: Medium → High
tags: added: kernel-da-key
Changed in linux (Ubuntu):
status: Confirmed → Triaged
Changed in linux (Ubuntu Vivid):
status: New → Triaged
importance: Undecided → High
tags: added: vivid
Revision history for this message
Joshua R. Poulson (jrp) wrote :

This needs to go to 15.10, 15.04, 14.10, 14.04, and 14.04 HWE.

Changed in linux (Ubuntu Utopic):
status: New → Triaged
Changed in linux (Ubuntu Trusty):
status: New → Triaged
Changed in linux (Ubuntu Utopic):
importance: Undecided → High
Changed in linux (Ubuntu Trusty):
importance: Undecided → High
tags: added: trusty utopic wily
Revision history for this message
Joseph Salisbury (jsalisbury) wrote :

I was able to build a test kernel with the three requested commits. The test kernel can be downloaded from:
http://kernel.ubuntu.com/~jsalisbury/lp1452074/

However, the three requested commits required three additional commits as prerequisites. Here are the details:

Prereq for hv_netvsc_packet->xmit_more:
7c3877fhv_netvsc: Implement batching in send buffer

Requested:
cbacec7 hv_netvsc: Cleanup the test for freeing skb when we use sendbuf mechanism
Requested:
b08cc79 hv_netvsc: Eliminate memory allocation in the packet send path

Prereq for definition of netvsc_xmit_completion:
ee90b81 hv_netvsc: Fix the packet free when it is in skb headroom

Prereq for implementing partial copies.
aa0a34b hv_netvsc: Implement partial copy into send buffer

Requested:
b56fc3c hv_netvsc: Fix a bug in netvsc_start_xmit()

Can you see if the test kernel resolves the bug?

Revision history for this message
Joshua R. Poulson (jrp) wrote :

Hrm, I had thought those other commits had been requested previously, sorry I missed them in the roundup. We'll look at testing the kernel right away. There is another skb-related fix that is still in review upstream and is not yet committed as well.

Changed in linux (Ubuntu Trusty):
status: Triaged → In Progress
Changed in linux (Ubuntu Utopic):
status: Triaged → In Progress
Changed in linux (Ubuntu Vivid):
status: Triaged → In Progress
Changed in linux (Ubuntu Wily):
status: Triaged → In Progress
Changed in linux (Ubuntu Trusty):
assignee: nobody → Joseph Salisbury (jsalisbury)
Changed in linux (Ubuntu Utopic):
assignee: nobody → Joseph Salisbury (jsalisbury)
Changed in linux (Ubuntu Vivid):
assignee: nobody → Joseph Salisbury (jsalisbury)
Changed in linux (Ubuntu Wily):
assignee: nobody → Joseph Salisbury (jsalisbury)
Revision history for this message
Joseph Salisbury (jsalisbury) wrote :

@Joshua, just curious if you had a chance to have the test kernel tested?

Revision history for this message
Joshua R. Poulson (jrp) wrote :

@jsalisbury We encountered unexpected performance regressions which we were not able to diagnose (a 10% decrease in throughput). Is it possible to rebase on 3.19.0-20 and release a new test kernel?

Revision history for this message
Joseph Salisbury (jsalisbury) wrote :

I built a new test kernel, which was rebased to 3.19.0-20. The test kernel can be downloaded from:
http://kernel.ubuntu.com/~jsalisbury/lp1452074/

Revision history for this message
Joshua R. Poulson (jrp) wrote :

This kernel looks good.

Revision history for this message
Joseph Salisbury (jsalisbury) wrote :

Are the issues caused by this bug the same reliability issues we were talking about in bug 1445195 and bug 1454758 ?

Revision history for this message
Joshua R. Poulson (jrp) wrote :

This patch affects networking and not storage, so it should not have an effect on storage reliability. It may be more appropriate to open a new issue to investigate the remaining instability.

Revision history for this message
Joseph Salisbury (jsalisbury) wrote :

The new bug is bug 1470250 . Let's now use that bug to focus on the VSS Backup issues.

Revision history for this message
Joseph Salisbury (jsalisbury) wrote :

The patch requested in bug 1454892 has all the commits in this bug as pre-reqs. Is it okay to mark this bug as a duplicate of bug 1454892 so all these commits can be sent together as one SRU request?

It looks like testing is good for both bugs in Vivid. I'll work on building test kernels for Utopic, Trusty and Precise.

Thanks in advance!

Revision history for this message
Joshua R. Poulson (jrp) wrote :

Yes, It is okay to mark this as a duplicate since the other request encapsulates these commits.

To post a comment you must log in.
This report contains Public information  
Everyone can see this information.

Other bug subscribers

Remote bug watches

Bug watches keep track of this bug in other bug trackers.