mirror of
https://github.com/genodelabs/genode.git
synced 2024-12-18 21:27:56 +00:00
vbox: improve network tx throughput
When multiple threads (EMT-0..X + nic_ep) enter the very same critical section, the use of RTCritSectTryEnter may reflect the contention case to the Network Model (E1000). Since no one notifies the model, when the critical section is free again, solely the next packet/event triggered by the guest will resume the former operation. This may lead to long delays until packets are sent actually. Instead of using the RTCritSectTryEnter use RTCritSecEnter to avoid the situation. All of our network code is non blocking, so the network backend will only be contented a short time. Follow up commit to Issue #5045
This commit is contained in:
parent
342e48115e
commit
ce66e12699
@ -336,7 +336,7 @@ class Nic_client
|
||||
static DECLCALLBACK(int) drvNicNetworkUp_BeginXmit(PPDMINETWORKUP pInterface, bool fOnWorkerThread)
|
||||
{
|
||||
PDRVNIC pThis = PDMINETWORKUP_2_DRVNIC(pInterface);
|
||||
int rc = RTCritSectTryEnter(&pThis->XmitLock);
|
||||
int rc = RTCritSectEnter(&pThis->XmitLock);
|
||||
if (RT_FAILURE(rc))
|
||||
rc = VERR_TRY_AGAIN;
|
||||
return rc;
|
||||
|
@ -351,7 +351,7 @@ class Nic_client
|
||||
static DECLCALLBACK(int) drvNicNetworkUp_BeginXmit(PPDMINETWORKUP pInterface, bool fOnWorkerThread)
|
||||
{
|
||||
PDRVNIC pThis = PDMINETWORKUP_2_DRVNIC(pInterface);
|
||||
int rc = RTCritSectTryEnter(&pThis->XmitLock);
|
||||
int rc = RTCritSectEnter(&pThis->XmitLock);
|
||||
if (RT_FAILURE(rc))
|
||||
rc = VERR_TRY_AGAIN;
|
||||
return rc;
|
||||
|
Loading…
Reference in New Issue
Block a user