VirtualBox

Changeset 93631 in vbox for trunk/src/VBox/VMM/include


Ignore:
Timestamp:
Feb 7, 2022 12:45:08 AM (3 years ago)
Author:
vboxsync
svn:sync-xref-src-repo-rev:
149776
Message:

VMM/PDMNetShaper: Don't start the unchoke thread unless there are are one or more bandwidth groups configured. Make the unchoke thread wait on an event sempahore so it can be woken up when needed and stop wasting cpu cycles and battery on lots of unnecessary wakups. Use a timer (real time clock) to wake up the unchoke timer when needed. bugref:10093 bugref:5582

File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/src/VBox/VMM/include/PDMInternal.h

    r93628 r93631  
    15141514    bool                            fStateLoaded;
    15151515    /** Alignment padding. */
    1516     bool                            afPadding[3];
     1516    bool                            afPadding1[3];
    15171517
    15181518    /** The tracing ID of the next device instance.
     
    15441544    /** @name Network Shaper
    15451545     * @{ */
    1546     /** Pending TX thread. */
    1547     PPDMTHREAD                      pNsTxThread;
    1548     uint32_t                        au32Padding[1+8];
     1546    /** Thread that processes choked filter drivers after
     1547     * the a PDM_NETSHAPER_MAX_LATENCY period has elapsed. */
     1548    PPDMTHREAD                      pNsUnchokeThread;
     1549    /** Semaphore that the TX thread waits on. */
     1550    RTSEMEVENT                      hNsUnchokeEvt;
     1551    /** Timer handle for waking up pNsUnchokeThread. */
     1552    TMTIMERHANDLE                   hNsUnchokeTimer;
     1553    /** Indicates whether the unchoke timer has been armed already or not. */
     1554    bool volatile                   fNsUnchokeTimerArmed;
     1555    /** Align aNsGroups on a cacheline.   */
     1556    bool                            afPadding2[19];
    15491557    /** Number of network shaper groups.
    15501558     * @note Marked volatile to prevent re-reading after validation. */
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