VirtualBox

Changeset 92343 in vbox for trunk/src


Ignore:
Timestamp:
Nov 11, 2021 12:41:46 AM (3 years ago)
Author:
vboxsync
Message:

VMM/GMM: Put the chunk ID allocation under a separate spinlock so we can get one early in gmmR0RegisterChunk and reduce the amount of work done while owning the giant mutex a tiny bit. [build fix] bugref:10093

File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/src/VBox/VMM/VMMR0/GMMR0.cpp

    r92342 r92343  
    20282028        {
    20292029            idChunk = ASMBitNextClear(&pGMM->bmChunkId[0], GMM_CHUNKID_LAST + 1, idChunk);
    2030             if (idChunk > NIL_GMM_CHUNKID)
     2030            if (   idChunk > NIL_GMM_CHUNKID
     2031                && (uint32_t)idChunk <= GMM_CHUNKID_LAST)
    20312032            {
    20322033                AssertMsgReturnStmt(!ASMAtomicBitTestAndSet(&pGMM->bmChunkId[0], idChunk), ("%#x\n", idChunk),
     
    20452046     */
    20462047    idChunk = ASMBitFirstClear(&pGMM->bmChunkId[0], GMM_CHUNKID_LAST + 1);
    2047     AssertMsgReturnStmt(idChunk > NIL_GMM_CHUNKID && idChunk <= GMM_CHUNKID_LAST, ("%#x\n", idChunk),
     2048    AssertMsgReturnStmt(idChunk > NIL_GMM_CHUNKID && (uint32_t)idChunk <= GMM_CHUNKID_LAST, ("%#x\n", idChunk),
    20482049                        RTSpinlockRelease(pGMM->hSpinLockChunkId), NIL_GVM_HANDLE);
    20492050    AssertMsgReturnStmt(!ASMAtomicBitTestAndSet(&pGMM->bmChunkId[0], idChunk), ("%#x\n", idChunk),
Note: See TracChangeset for help on using the changeset viewer.

© 2024 Oracle Support Privacy / Do Not Sell My Info Terms of Use Trademark Policy Automated Access Etiquette