Bug 195238

Summary: [Hyper-v] Enhance VMBUS and improve storage performance
Product: Base System Reporter: Kylie <kyliel>
Component: kernAssignee: freebsd-virtualization (Nobody) <virtualization>
Status: Closed FIXED    
Severity: Affects Some People CC: bsdic, decui, delphij, emaste, kyliel, timp87, virtualization, weh
Priority: --- Keywords: feature, patch
Version: CURRENT   
Hardware: Any   
OS: Any   
Attachments:
Description Flags
VMBUS and storage driver enhancements for Hyper-V none

Description Kylie 2014-11-21 05:41:46 UTC
Expect below features to enhance VMBUS and improve storage performance.
1) Signal optimization: The number of Interrupt for read/write is optimized.
2) Multi-channel: Originally, each device driver has one channel and all channels are bound to vCPU0. Now each device driver (util still uses vCPU0) could have one channel on one vCPU. 
3) Sub-channel for storage device: Get additional sub-chancel if having 5 and above vCPUs. 
4) Scatter/gather list handling for immediate I/O request in storage driver
Comment 1 Kylie 2014-11-21 05:46:40 UTC
We will attach patches soon here.
Comment 2 Wei Hu 2014-11-28 04:08:02 UTC
Created attachment 149948 [details]
VMBUS and storage driver enhancements for Hyper-V

The diff base is FreeBSD head taken on 11/13/2014
Comment 3 Xin LI freebsd_committer freebsd_triage 2015-02-03 06:20:26 UTC
(In reply to Wei Hu from comment #2)
Hi,

I have noticed that there is a different implementation in kern/196185, is that a newer version of this patchset?
Comment 4 Wei Hu 2015-02-03 06:55:26 UTC
(In reply to Xin LI from comment #3)
No. Fang Jun has just updated the Bug 196185, -- "The hyperv_support.S will not be used this time, we will delete it."

It turned out it is possible to add the feature without rebuilding the kernel. So we will not include the feature in the PORTS work.

The code added in apic_vector.s is in align with Xen's implementation. Xen also has the similar code segment in the same files.
Comment 5 commit-hook freebsd_committer freebsd_triage 2015-04-29 10:13:01 UTC
A commit references this bug:

Author: whu
Date: Wed Apr 29 10:12:36 UTC 2015
New revision: 282212
URL: https://svnweb.freebsd.org/changeset/base/282212

Log:
  Microsoft vmbus, storage and other related driver enhancements for HyperV.
      - Vmbus multi channel support.
      - Vector interrupt support.
      - Signal optimization.
      - Storvsc driver performance improvement.
      - Scatter and gather support for storvsc driver.
      - Minor bug fix for KVP driver.
  Thanks royger, jhb and delphij from FreeBSD community for the reviews
  and comments. Also thanks Hovy Xu from NetApp for the contributions to
  the storvsc driver.

  PR:     195238
  Submitted by:   whu
  Reviewed by:    royger, jhb, delphij
  Approved by:    royger
  MFC after:      2 weeks
  Relnotes:       yes
  Sponsored by:   Microsoft OSTC

Changes:
  head/sys/amd64/amd64/apic_vector.S
  head/sys/amd64/conf/GENERIC
  head/sys/amd64/conf/NOTES
  head/sys/conf/options.amd64
  head/sys/conf/options.i386
  head/sys/dev/hyperv/include/hyperv.h
  head/sys/dev/hyperv/storvsc/hv_storvsc_drv_freebsd.c
  head/sys/dev/hyperv/storvsc/hv_vstorage.h
  head/sys/dev/hyperv/utilities/hv_kvp.c
  head/sys/dev/hyperv/utilities/hv_util.c
  head/sys/dev/hyperv/vmbus/hv_channel.c
  head/sys/dev/hyperv/vmbus/hv_channel_mgmt.c
  head/sys/dev/hyperv/vmbus/hv_connection.c
  head/sys/dev/hyperv/vmbus/hv_hv.c
  head/sys/dev/hyperv/vmbus/hv_ring_buffer.c
  head/sys/dev/hyperv/vmbus/hv_vmbus_drv_freebsd.c
  head/sys/dev/hyperv/vmbus/hv_vmbus_priv.h
  head/sys/i386/conf/GENERIC
  head/sys/i386/i386/apic_vector.s
  head/sys/x86/include/apicvar.h
Comment 6 commit-hook freebsd_committer freebsd_triage 2015-05-22 09:04:52 UTC
A commit references this bug:

Author: whu
Date: Fri May 22 09:03:58 UTC 2015
New revision: 283280
URL: https://svnweb.freebsd.org/changeset/base/283280

Log:
  MFC r282212:

  Microsoft vmbus, storage and other related driver enhancements for HyperV.
      - Vmbus multi channel support.
      - Vector interrupt support.
      - Signal optimization.
      - Storvsc driver performance improvement.
      - Scatter and gather support for storvsc driver.
      - Minor bug fix for KVP driver.
  Thanks royger, jhb and delphij from FreeBSD community for the reviews
  and comments. Also thanks Hovy Xu from NetApp for the contributions to
  the storvsc driver.

  PR:     195238
  Submitted by:   whu
  Reviewed by:    royger
  Approved by:    royger
  Relnotes:       yes
  Sponsored by:   Microsoft OSTC
  Differential Revision:  https://reviews.freebsd.org/D2575

Changes:
_U  stable/10/
  stable/10/sys/amd64/amd64/apic_vector.S
  stable/10/sys/amd64/conf/GENERIC
  stable/10/sys/amd64/conf/NOTES
  stable/10/sys/amd64/include/apicvar.h
  stable/10/sys/conf/options.amd64
  stable/10/sys/conf/options.i386
  stable/10/sys/dev/hyperv/include/hyperv.h
  stable/10/sys/dev/hyperv/storvsc/hv_storvsc_drv_freebsd.c
  stable/10/sys/dev/hyperv/storvsc/hv_vstorage.h
  stable/10/sys/dev/hyperv/utilities/hv_kvp.c
  stable/10/sys/dev/hyperv/utilities/hv_util.c
  stable/10/sys/dev/hyperv/vmbus/hv_channel.c
  stable/10/sys/dev/hyperv/vmbus/hv_channel_mgmt.c
  stable/10/sys/dev/hyperv/vmbus/hv_connection.c
  stable/10/sys/dev/hyperv/vmbus/hv_hv.c
  stable/10/sys/dev/hyperv/vmbus/hv_ring_buffer.c
  stable/10/sys/dev/hyperv/vmbus/hv_vmbus_drv_freebsd.c
  stable/10/sys/dev/hyperv/vmbus/hv_vmbus_priv.h
  stable/10/sys/i386/conf/GENERIC
  stable/10/sys/i386/i386/apic_vector.s
Comment 7 Mark Linimon freebsd_committer freebsd_triage 2016-05-20 07:41:41 UTC
Already committed.