Page MenuHomeFreeBSD

Hyper-V socket implementation for FreeBSD guest
ClosedPublic

Authored by whu on Mar 13 2020, 11:52 AM.
Tags
None
Referenced Files
Unknown Object (File)
Tue, Oct 1, 12:58 PM
Unknown Object (File)
Sat, Sep 28, 1:46 PM
Unknown Object (File)
Tue, Sep 24, 8:47 AM
Unknown Object (File)
Wed, Sep 18, 4:18 PM
Unknown Object (File)
Mon, Sep 16, 2:26 AM
Unknown Object (File)
Sep 10 2024, 12:43 PM
Unknown Object (File)
Sep 10 2024, 5:30 AM
Unknown Object (File)
Sep 7 2024, 3:37 AM

Details

Summary

Starting in Windows 10 Anniversary Update, anyone can make applications that communicate between the Hyper-V host and its virtual machines using Hyper-V sockets -- a Windows Socket with a new address family and specialized endpoint for targeting virtual machines. Details about Hyper-V socket can be found here:

https://docs.microsoft.com/en-us/virtualization/hyper-v-on-windows/user-guide/make-integration-service

This change adds Hyper-V socket feature in FreeBSD. New socket address family AF_HYPERV and its kernel support are added.

Tested on HP Z4 G4 Workstation with Xeon W-2123 cores and 32GB memory.

FreeBSD VM size 4vcpu and 6000MB memory.

Performance test with hvstress user program single thread, user set ehe send and recv buff

  • Guest - > Host

snd/recv buffer size on both sides | 128byte | 1KB | 4KB | 64KB
Throughput with 20KB ringbuffer size(MB/s) | 72 | 289 | 320 | 305

  • Host - > Guest

snd/recv buffer size on both sides | 128byte | 1KB | 4KB | 64KB
Throughput with 20KB ringbuffer size(MB/s) | 74 | 369 | 700 | 1103

Diff Detail

Repository
rS FreeBSD src repository - subversion
Lint
Lint Not Applicable
Unit
Tests Not Applicable

Event Timeline

whu edited the summary of this revision. (Show Details)

Out for broader review

whu edited the summary of this revision. (Show Details)
whu edited the summary of this revision. (Show Details)

Do you have performance test results for already existing linux implementation?
From a quick look it seems to me there will be bottleneck regarding locking that seems can be reduced using CK and epoch. But this task can be done in future, if you plan support this code.

In D24061#540008, @ae wrote:

Do you have performance test results for already existing linux implementation?
From a quick look it seems to me there will be bottleneck regarding locking that seems can be reduced using CK and epoch. But this task can be done in future, if you plan support this code.

Thanks Andrey and I am sorry for my late reply. I have been tied up with something at work.
The Lunix number is in this place:
https://git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git/commit/?h=v5.6-rc5&id=ac383f58f3c98de37fa67452acc5bd677396e9f3

The test was run on different hardware so it is not an apple to apple comparison. It seems a bottleneck from guest to host connection on FreeBSD. I do plan to support and maintain this code. Once I have more time I will spend more on this to improve.

This revision was not accepted when it landed; it landed in state Needs Review.May 20 2020, 11:04 AM
This revision was automatically updated to reflect the committed changes.