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)
Feb 27 2024, 4:39 AM
Unknown Object (File)
Jan 24 2024, 6:51 AM
Unknown Object (File)
Jan 14 2024, 9:20 AM
Unknown Object (File)
Jan 7 2024, 9:59 AM
Unknown Object (File)
Jan 3 2024, 3:27 AM
Unknown Object (File)
Jan 2 2024, 7:04 PM
Unknown Object (File)
Dec 24 2023, 1:07 PM
Unknown Object (File)
Dec 23 2023, 7:49 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 Skipped
Unit
Tests Skipped
Build Status
Buildable 30514

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.