FreeBSD Bugzilla – Attachment 225299 Details for
Bug 168298
VirtualBox using AIO on a zvol crashes
Home
|
New
|
Browse
|
Search
|
[?]
|
Reports
|
Help
|
New Account
|
Log In
Remember
[x]
|
Forgot Password
Login:
[x]
[patch]
a small ugly patch to make vbox stop trying for more AIO resources than it can have
patch-src_VBox_VMM_VMMR3_PDMAsyncCompletionFileNormal.cpp (text/plain), 3.08 KB, created by
Tom Rushworth
on 2021-05-27 04:10:03 UTC
(
hide
)
Description:
a small ugly patch to make vbox stop trying for more AIO resources than it can have
Filename:
MIME Type:
Creator:
Tom Rushworth
Created:
2021-05-27 04:10:03 UTC
Size:
3.08 KB
patch
obsolete
>--- src/VBox/VMM/VMMR3/PDMAsyncCompletionFileNormal.cpp.orig 2021-04-19 21:33:04.000000000 -0700 >+++ src/VBox/VMM/VMMR3/PDMAsyncCompletionFileNormal.cpp 2021-05-18 11:45:08.396136000 -0700 >@@ -27,6 +27,13 @@ > #include <iprt/string.h> > #include <iprt/assert.h> > #include <VBox/log.h> >+/* TBR: we need a complicated crawl through the data structure to get the AIO system limits >+ to check when considering growing the number of active AIO requests.... */ >+/* We need the PDMInternal *before* the UVM, or it isn't visible afterwards. (src/VBox/VMM/include/PDMInternal.h) */ >+#include <PDMInternal.h> >+#include <VBox/vmm/uvm.h> >+#include <VBox/vmm/vm.h> >+/* TBR: end of extra includes. */ > > #include "PDMAsyncCompletionFileInternal.h" > >@@ -1120,8 +1127,40 @@ > */ > pdmacFileAioMgrNormalBalanceLoad(pAioMgr); > #else >- /* Grow the I/O manager */ >- pAioMgr->enmState = PDMACEPFILEMGRSTATE_GROWING; >+ /* TBR: Check the global AIO system limit before growing. >+ This is the complicateds crawl through the data structure mentioned >+ near the start of this file. >+ There HAS to be a better way and better time to get this limit! */ >+ PPDMASYNCCOMPLETIONEPCLASS pEpClass = NULL; >+ PCPDMASYNCCOMPLETIONEPCLASSOPS pEndpointOps = NULL; >+ PDMASYNCCOMPLETIONEPCLASSTYPE enmClassType; >+ PPDMASYNCCOMPLETIONEPCLASSFILE pEpClassFile = NULL; >+ PVM pVM = NULL; >+ PUVM pUVM = NULL; >+ unsigned int aio_system_reqests_max = RTFILEAIO_UNLIMITED_REQS; >+ pEpClass = pEndpoint->Core.pEpClass; >+ AssertMsg((NULL != pEpClass),("ep->class is NULL")); >+ pEndpointOps = pEpClass->pEndpointOps; >+ AssertMsg((NULL != pEndpointOps),("ep->class->ops is NULL")); >+ enmClassType = pEndpointOps->enmClassType; >+ AssertMsg((PDMASYNCCOMPLETIONEPCLASSTYPE_FILE == enmClassType), >+ ("ep->class->ops->type != PDMASYNCCOMPLETIONEPCLASSTYPE_FILE")); >+ pVM = pEpClass->pVM; >+ AssertMsg((NULL != pVM),("ep->class->VM is NULL")); >+ pUVM = pVM->pUVM; >+ AssertMsg((NULL != pUVM),("ep->class->VM->UVM is NULL")); >+ pEpClassFile = (PPDMASYNCCOMPLETIONEPCLASSFILE) (pUVM->pdm.s.apAsyncCompletionEndpointClass[enmClassType]); >+ AssertMsg((NULL != pEpClassFile),("ep->class->VM->UVM->pdn[globals] is NULL")); >+ aio_system_reqests_max = pEpClassFile->cReqsOutstandingMax; >+#if 0 >+ /* A one time check during development to verify getting the right number. */ >+ AssertMsg((256 != aio_system_reqests_max), >+ ("aio_system_reqests_max != 256 (val=%u)",aio_system_reqests_max)); >+#endif >+ if (RT_UNLIKELY( aio_system_reqests_max == RTFILEAIO_UNLIMITED_REQS >+ || (pAioMgr->cRequestsActiveMax+PDMACEPFILEMGR_REQS_STEP) <= aio_system_reqests_max)) >+ /* Grow the I/O manager */ >+ pAioMgr->enmState = PDMACEPFILEMGRSTATE_GROWING; > #endif > } > }
You cannot view the attachment while viewing its details because your browser does not support IFRAMEs.
View the attachment on a separate page
.
View Attachment As Diff
View Attachment As Raw
Actions:
View
|
Diff
Attachments on
bug 168298
:
193335
|
218039
| 225299