VirtualBox

Ignore:
Timestamp:
Nov 12, 2009 7:05:01 PM (15 years ago)
Author:
vboxsync
svn:sync-xref-src-repo-rev:
54772
Message:

AsyncCompletion: Implement new caching using the 2Q algorithm

File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/src/VBox/VMM/PDMAsyncCompletionFileInternal.h

    r24517 r24621  
    3333
    3434#include "PDMAsyncCompletionInternal.h"
     35
     36/** Enable the 2Q cache alogrithm. */
     37#define VBOX_WITH_2Q_CACHE 1
    3538
    3639/** @todo: Revise the caching of tasks. We have currently four caches:
     
    275278    /** Critical section protecting the cache. */
    276279    RTCRITSECT       CritSect;
     280#ifdef VBOX_WITH_2Q_CACHE
     281    uint32_t         cbRecentlyUsedInMax;
     282    uint32_t         cbRecentlyUsedOutMax;
     283    PDMACFILELRULIST LruRecentlyUsedIn;
     284    PDMACFILELRULIST LruRecentlyUsedOut;
     285    PDMACFILELRULIST LruFrequentlyUsed;
     286#else
    277287    /** Adaption parameter (p) */
    278288    uint32_t         uAdaptVal;
     
    285295    /** LRU list for evicted entries from T2 (B2) */
    286296    PDMACFILELRULIST LruFrequentlyGhost;
     297#endif
    287298#ifdef VBOX_WITH_STATISTICS
    288299    /** Hit counter. */
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