Skip to content

Commit

Permalink
do not mess with noworkcount
Browse files Browse the repository at this point in the history
  • Loading branch information
ProjectsByJackHe committed Aug 17, 2024
1 parent 3d76134 commit 26040c0
Showing 1 changed file with 2 additions and 6 deletions.
8 changes: 2 additions & 6 deletions src/perf/lib/Tcp.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -241,7 +241,7 @@ void TcpWorker::Shutdown()
BOOLEAN
TcpWorker::DoWork(
_Inout_ void* Context,
_Inout_ CXPLAT_EXECUTION_STATE* State
_Inout_ CXPLAT_EXECUTION_STATE*
)
{
TcpWorker* This = (TcpWorker*)Context;
Expand All @@ -266,18 +266,14 @@ TcpWorker::DoWork(
Connection->Process();
Connection->Release();
This->ExecutionContext.Ready = TRUE; // We just did work, let's keep this thread hot.
State->NoWorkCount = 0; // TODO: Figure out why adding this line makes lowlat tcp work?
}
return TRUE;
}

CXPLAT_THREAD_CALLBACK(TcpWorker::WorkerThread, Context)
{
TcpWorker* This = (TcpWorker*)Context;
CXPLAT_EXECUTION_STATE DummyState = {
0, CxPlatTimeUs64(), UINT32_MAX, 0, CxPlatCurThreadID()
};
while (DoWork(This, &DummyState)) {
while (DoWork(This, nullptr)) {
if (This->ExecutionContext.Ready == FALSE) { // No work for the moment, but more will come.
CxPlatEventWaitForever(This->WakeEvent);
}
Expand Down

0 comments on commit 26040c0

Please sign in to comment.