VirtualBox

Changeset 17297 in vbox for trunk/src


Ignore:
Timestamp:
Mar 3, 2009 4:01:29 PM (16 years ago)
Author:
vboxsync
Message:

Experimental forced rescheduling to the recompiler for intensive access to the VGA mmio region.

Location:
trunk/src/VBox/Devices/Graphics
Files:
2 edited

Legend:

Unmodified
Added
Removed
  • trunk/src/VBox/Devices/Graphics/DevVGA.cpp

    r15977 r17297  
    128128#include <iprt/asm.h>
    129129#include <iprt/file.h>
     130#include <iprt/time.h>
    130131#include <iprt/string.h>
    131132
     
    13771378        VERIFY_VRAM_WRITE_OFF_RETURN(s, addr * 4 + 3);
    13781379
     1380#ifdef IN_RING0
     1381        if (((++s->cLatchAccesses) & 0x3ff) == 0x3ff)
     1382        {
     1383            uint64_t u64CurTime = RTTimeSystemNanoTS();
     1384            /* About 1000 accesses per 10 ms or more will trigger a reschedule
     1385             * to the recompiler
     1386             */
     1387            if (u64CurTime - s->u64LastLatchedAccess < 10000000)
     1388                return VINF_EM_RAW_EMULATE_IO_BLOCK;
     1389
     1390            s->u64LastLatchedAccess = u64CurTime;           
     1391        }
     1392#endif
     1393
    13791394        write_mode = s->gr[5] & 3;
    13801395        switch(write_mode) {
  • trunk/src/VBox/Devices/Graphics/DevVGA.h

    r15120 r17297  
    301301    STAMPROFILE                 StatR3MemoryWrite;
    302302
     303    /* Keep track of ring 0 latched accesses to the VGA MMIO memory. */
     304    uint64_t                    u64LastLatchedAccess;
     305    uint32_t                    cLatchAccesses;
     306
    303307#ifdef VBE_BYTEWISE_IO
    304308    /** VBE read/write data/index flags */
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