msquic icon indicating copy to clipboard operation
msquic copied to clipboard

Kernel Platform Worker Support

Open nibanks opened this issue 1 year ago • 10 comments

Description

Extracts/refactors some of the code in #4023 to support platform worker threads, which is a prereq for kernel xdp support.

Testing

CI/CD

Documentation

N/A

nibanks avatar Oct 09 '24 13:10 nibanks

Codecov Report

Attention: Patch coverage is 50.00000% with 1 line in your changes missing coverage. Please review.

Project coverage is 87.00%. Comparing base (2e4a9f0) to head (a458629). Report is 13 commits behind head on main.

Files with missing lines Patch % Lines
src/core/worker.c 50.00% 1 Missing :warning:
Additional details and impacted files
@@            Coverage Diff             @@
##             main    #4605      +/-   ##
==========================================
- Coverage   87.45%   87.00%   -0.45%     
==========================================
  Files          59       59              
  Lines       18048    18061      +13     
==========================================
- Hits        15783    15714      -69     
- Misses       2265     2347      +82     

:umbrella: View full report in Codecov by Sentry.
:loudspeaker: Have feedback on the report? Share it here.

:rocket: New features to boost your workflow:
  • :snowflake: Test Analytics: Detect flaky tests, report on failures, and find test suite problems.

codecov[bot] avatar Oct 09 '24 14:10 codecov[bot]

Looks like the kernel BVTs are crashing. I will try to investigate later.

nibanks avatar Oct 09 '24 14:10 nibanks

Something seems broken in netperf runs. I can't tell if it's because of this or not. Needs to be investigated before merging.

nibanks avatar Nov 14 '24 11:11 nibanks

Is the netperf result reliable? wsk related failure is really few. others are more

ami-GS avatar Nov 15 '24 22:11 ami-GS

Converted this back to draft, because we need to switch to using NtCreateIoCompletion, NtSetIoCompletion, and NtRemoveIoCompletionEx.

nibanks avatar Nov 21 '24 15:11 nibanks

Converted this back to draft, because we need to switch to using NtCreateIoCompletion, NtSetIoCompletion, and NtRemoveIoCompletionEx.

I suggest using the Zw variants for KM, unless QUIC is calling on behalf of the user mode thread calling QUIC, and all in the same thread context.

mtfriesen avatar Nov 21 '24 19:11 mtfriesen

Because platform_winkernel.c copies from zwapi.h, quic_platform_winkernel.h does same.

ami-GS avatar Jan 16 '25 03:01 ami-GS

https://github.com/microsoft/msquic/blob/101f6b92eedd569e1022edb4175f6fe8b17d91a9/src/core/worker.c#L174 RegistrationClose doesn't return by here

Edit: QuicWorkerLoop is not called for some reason

ami-GS avatar Jan 17 '25 08:01 ami-GS

https://github.com/microsoft/msquic/blob/101f6b92eedd569e1022edb4175f6fe8b17d91a9/src/core/worker.c#L174

RegistrationClose doesn't return by here Edit: QuicWorkerLoop is not called for some reason

Likely means the worker thread isn't actually woken to clean up.

nibanks avatar Jan 17 '25 13:01 nibanks

Randomly hangs by WaitForSingleObject under Registration destructor

image

ami-GS avatar Jan 30 '25 00:01 ami-GS