VirtualBox

Changeset 59448 in vbox for trunk/include/VBox


Ignore:
Timestamp:
Jan 22, 2016 6:45:31 PM (9 years ago)
Author:
vboxsync
svn:sync-xref-src-repo-rev:
105199
Message:

Devices/Storage: More work on the new I/O interface

Implement a new memory manager for allocating I/O buffers using a modified buddy algorithm.
The difference is that when both buddies are freed they don't coalesce automatically. This is to avoid
always splitting blocks up when the guest just wants to do 4KB transfers all the time. The defragmentation
will be done in one step if they allocator notices that it can't allocate enough memory from the correct bin
or bins which contain bigger blocks even though there is enough free memory (needs to be implemented).
The amount of I/O memory is static while the VM is running which makes the memory consumption by the I/O
stack more predictable. If requests can't allocate enough memory they need to chop up the transfer into smaller
parts. In case they can't allocate any I/O memory they are placed on a waiting list and are processed
when there is memory again.
The amount of usable I/O memory can be tuned with the "IoBufMax" CFGM key to accomodate for different workloads
and defaults to 5MB.

File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/include/VBox/vmm/pdmstorageifs.h

    r59305 r59448  
    629629     * @param   pvIoReqAlloc    The allocator specific memory for this request.
    630630     * @param   offDst          The destination offset from the start to write the data to.
    631      * @param   pvSrc           Where to read the data from.
     631     * @param   pSgBuf          The S/G buffer to read the data from.
    632632     * @param   cbCopy          How many bytes to copy.
    633633     */
    634634    DECLR3CALLBACKMEMBER(int, pfnIoReqCopyFromBuf, (PPDMIMEDIAEXPORT pInterface, PDMMEDIAEXIOREQ hIoReq,
    635                                                     void *pvIoReqAlloc, uint32_t offDst, const void *pvSrc,
     635                                                    void *pvIoReqAlloc, uint32_t offDst, PRTSGBUF pSgBuf,
    636636                                                    size_t cbCopy));
    637637
     
    645645     * @param   pvIoReqAlloc    The allocator specific memory for this request.
    646646     * @param   offSrc          The offset from the start of the buffer to read the data from.
    647      * @param   pvDst           Where to store the data.
     647     * @param   pSgBuf          The S/G buffer to write the data to.
    648648     * @param   cbCopy          How many bytes to copy.
    649649     */
    650650    DECLR3CALLBACKMEMBER(int, pfnIoReqCopyToBuf, (PPDMIMEDIAEXPORT pInterface, PDMMEDIAEXIOREQ hIoReq,
    651                                                   void *pvIoReqAlloc, uint32_t offSrc, void *pvDst,
     651                                                  void *pvIoReqAlloc, uint32_t offSrc, PRTSGBUF pSgBuf,
    652652                                                  size_t cbCopy));
    653653
     
    655655
    656656/** PDMIMEDIAAEXPORT interface ID. */
    657 #define PDMIMEDIAEXPORT_IID                  "03c197d8-953c-4e24-b5bf-477379471cca"
     657#define PDMIMEDIAEXPORT_IID                  "1385d27b-8648-4174-ac73-02148c479c90"
    658658
    659659
Note: See TracChangeset for help on using the changeset viewer.

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