Changeset 52619 in vbox
- Timestamp:
- Sep 5, 2014 12:10:24 PM (10 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/src/VBox/HostDrivers/Support/SUPDrv.c
r52618 r52619 112 112 /** Worker thread is done updating TSC delta info. */ 113 113 #define GIP_TSC_DELTA_SYNC_WORKER_DONE 3 114 /** When IPRT is isn't concurrent safe: Master is ready and will wait for slave114 /** When IPRT is isn't concurrent safe: Master is ready and will wait for worker 115 115 * with a timeout. */ 116 116 #define GIP_TSC_DELTA_SYNC_PRESTART_MASTER 4 … … 6036 6036 * is no guaranteed way of doing this on x86 CPUs. We try to minimize the 6037 6037 * measurement error by computing the minimum read time of the compare 6038 * statement in the slaveby taking TSC measurements across it. We also6038 * statement in the worker by taking TSC measurements across it. We also 6039 6039 * ignore the first few runs of the loop in order to prime the cache. 6040 6040 * 6041 6041 * It must be noted that the computed minimum read time is mostly to 6042 * eliminate huge deltas when the slaveis too early and doesn't by itself6042 * eliminate huge deltas when the worker is too early and doesn't by itself 6043 6043 * help produce more accurate deltas. We allow two times the computed 6044 6044 * minimum as an arbibtrary acceptable threshold. Therefore, it is still 6045 * possible to get negative deltas where there are none when the slaveis6045 * possible to get negative deltas where there are none when the worker is 6046 6046 * earlier. 6047 6047 */ … … 6163 6163 * Keep reading the TSC until we notice that the master has read his. Reading 6164 6164 * the TSC -after- the master has updated the memory is way too late. We thus 6165 * compensate by trying to measure how long it took for the slaveto notice6165 * compensate by trying to measure how long it took for the worker to notice 6166 6166 * the memory flushed from the master. 6167 6167 */
Note:
See TracChangeset
for help on using the changeset viewer.