VirtualBox

Changeset 72637 in vbox for trunk/src/VBox/Devices


Ignore:
Timestamp:
Jun 21, 2018 11:34:44 AM (7 years ago)
Author:
vboxsync
svn:sync-xref-src-repo-rev:
123141
Message:

DevATA: Yield early in the status polling from raw-mode & ring-0. Looks like previous changes caused a w2k install regression for raw-mode. bugref:1960

File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/src/VBox/Devices/Storage/DevATA.cpp

    r72589 r72637  
    298298     * Lower is more agressive. */
    299299    uint8_t                             cBusyStatusHackR3Rate;
    300     /** Defines the RZ yield rate by number of status requests before returning
    301      * to ring-3 and yielding there.  Lower is more agressive. */
     300    /** Defines the R0/RC yield rate by a mask (power of 2 minus one).
     301     * Lower is more agressive. */
    302302    uint8_t                             cBusyStatusHackRZRate;
    303303
     
    45284528                 * especially on SMP systems where we don't gain much by
    45294529                 * yielding the CPU to someone else. */
    4530                 if (++s->cBusyStatusHackRZ >= s->cBusyStatusHackRZRate)
     4530                if ((s->cBusyStatusHackRZ++ & s->cBusyStatusHackRZRate) == 1)
    45314531                {
    4532                     s->cBusyStatusHackRZ = 0;
    45334532                    s->cBusyStatusHackR3 = 0; /* Forces a yield. */
    45344533                    return VINF_IOM_R3_IOPORT_READ;
     
    65346533    {
    65356534        pIf->cBusyStatusHackR3Rate = 1;
    6536         pIf->cBusyStatusHackRZRate = 8;
     6535        pIf->cBusyStatusHackRZRate = 7;
    65376536    }
    65386537    else if (cCpus <= 2)
    65396538    {
    65406539        pIf->cBusyStatusHackR3Rate = 3;
    6541         pIf->cBusyStatusHackRZRate = 20;
     6540        pIf->cBusyStatusHackRZRate = 15;
    65426541    }
    65436542    else if (cCpus <= 4)
    65446543    {
    65456544        pIf->cBusyStatusHackR3Rate = 15;
    6546         pIf->cBusyStatusHackRZRate = 32;
     6545        pIf->cBusyStatusHackRZRate = 31;
    65476546    }
    65486547    else
    65496548    {
    65506549        pIf->cBusyStatusHackR3Rate = 127;
    6551         pIf->cBusyStatusHackRZRate = 128;
     6550        pIf->cBusyStatusHackRZRate = 127;
    65526551    }
    65536552
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