Changeset 57233 in vbox for trunk/src/VBox/HostDrivers/Support
- Timestamp:
- Aug 7, 2015 9:33:40 AM (10 years ago)
- svn:sync-xref-src-repo-rev:
- 101987
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/src/VBox/HostDrivers/Support/SUPDrvGip.cpp
r57224 r57233 2195 2195 * See @bugref{6710#c67}. 2196 2196 */ 2197 /** @todo Could we drop the fud ing there now that we initializes the history2197 /** @todo Could we drop the fudging there now that we initializes the history 2198 2198 * with nominal TSC frequency values? */ 2199 2199 if ( u32TransactionId > 23 /* 7 + (8 * 2) */ … … 2286 2286 * 2287 2287 * @param pDevExt The device extension. 2288 * @param u64NanoTS The current nanosecond times amp.2289 * @param u64TSC The current TSC times amp.2288 * @param u64NanoTS The current nanosecond timestamp. 2289 * @param u64TSC The current TSC timestamp. 2290 2290 * @param idCpu The CPU ID. 2291 2291 * @param iTick The current timer tick. … … 2329 2329 * Recalc the update frequency every 0x800th time. 2330 2330 */ 2331 if ( pGip->u32Mode != SUPGIPMODE_INVARIANT_TSC /* cuz we're not recalculating the frequency on invariant shosts. */2331 if ( pGip->u32Mode != SUPGIPMODE_INVARIANT_TSC /* cuz we're not recalculating the frequency on invariant hosts. */ 2332 2332 && !(pGipCpu->u32TransactionId & (GIP_UPDATEHZ_RECALC_FREQ * 2 - 2))) 2333 2333 { … … 2367 2367 * 2368 2368 * @param pDevExt The device extension. 2369 * @param u64NanoTS The current nanosecond times amp.2370 * @param u64TSC The current TSC timesa mp.2369 * @param u64NanoTS The current nanosecond timestamp. 2370 * @param u64TSC The current TSC timesaver. 2371 2371 * @param idCpu The CPU ID. 2372 2372 * @param idApic The APIC id for the CPU index. … … 2451 2451 * We could maybe on some platforms try cross calling a CPU with a 2452 2452 * working delta here, but it's not worth the hassle since the 2453 * likel yhood of this happening is really low. On Windows, Linux, and2453 * likelihood of this happening is really low. On Windows, Linux, and 2454 2454 * Solaris timers fire on the CPU they were registered/started on. 2455 2455 * Darwin timers doesn't necessarily (they are high priority threads). … … 2528 2528 2529 2529 /** 2530 * TSC delta measur ment algorithm \#2 result entry.2530 * TSC delta measurement algorithm \#2 result entry. 2531 2531 */ 2532 2532 typedef struct SUPDRVTSCDELTAMETHOD2ENTRY … … 2538 2538 2539 2539 /** 2540 * TSC delta measur ment algorithm \#2 Data.2540 * TSC delta measurement algorithm \#2 Data. 2541 2541 */ 2542 2542 typedef struct SUPDRVTSCDELTAMETHOD2 … … 2551 2551 SUPDRVTSCDELTAMETHOD2ENTRY aResults[64]; 2552 2552 } SUPDRVTSCDELTAMETHOD2; 2553 /** Pointer to the data for TSC delta me surment algorithm \#2 .*/2553 /** Pointer to the data for TSC delta measurement algorithm \#2 .*/ 2554 2554 typedef SUPDRVTSCDELTAMETHOD2 *PSUPDRVTSCDELTAMETHOD2; 2555 2555 … … 2558 2558 * The TSC delta synchronization struct, version 2. 2559 2559 * 2560 * The sync rhonization variable is completely isolated in its own cache line2560 * The synchronization variable is completely isolated in its own cache line 2561 2561 * (provided our max cache line size estimate is correct). 2562 2562 */ … … 2592 2592 /** Go! */ 2593 2593 #define GIP_TSC_DELTA_SYNC2_GO UINT32_C(0x1002) 2594 /** Used by the ver fication test. */2594 /** Used by the verification test. */ 2595 2595 #define GIP_TSC_DELTA_SYNC2_GO_GO UINT32_C(0x1003) 2596 2596 … … 3011 3011 #ifdef GIP_TSC_DELTA_METHOD_1 3012 3012 /** 3013 * TSC delta measur ment algorithm \#1 (GIP_TSC_DELTA_METHOD_1).3013 * TSC delta measurement algorithm \#1 (GIP_TSC_DELTA_METHOD_1). 3014 3014 * 3015 3015 * … … 3204 3204 3205 3205 /** 3206 * The core function of the 2nd TSC delta me surment algorithm.3206 * The core function of the 2nd TSC delta measurement algorithm. 3207 3207 * 3208 3208 * The idea here is that we have the two CPUs execute the exact same code … … 3213 3213 * The @a fLag parameter is used to modify the execution a tiny bit on one or 3214 3214 * both of the CPUs. When @a fLag differs between the CPUs, it is thought that 3215 * it will help with making the CPUs enter lock step execution occa tionally.3215 * it will help with making the CPUs enter lock step execution occasionally. 3216 3216 * 3217 3217 */ … … 3246 3246 3247 3247 /** 3248 * TSC delta measur ment algorithm \#2 (GIP_TSC_DELTA_METHOD_2).3248 * TSC delta measurement algorithm \#2 (GIP_TSC_DELTA_METHOD_2). 3249 3249 * 3250 3250 * See supdrvTscDeltaMethod2CollectData for algorithm details. … … 3710 3710 3711 3711 /* 3712 * End the synchroniz iation dance. We tell the other that we're done,3712 * End the synchronization dance. We tell the other that we're done, 3713 3713 * then wait for the same kind of reply. 3714 3714 */ … … 3791 3791 3792 3792 /* 3793 * One measurement at a ttime, at least for now. We might be using3793 * One measurement at a time, at least for now. We might be using 3794 3794 * broadcast IPIs so, so be nice to the rest of the system. 3795 3795 */ … … 3807 3807 * ASSUMES related threads have adjacent APIC IDs. ASSUMES two threads per core. 3808 3808 * 3809 * We skip this on AMDs for now as their HTT is different from intel's and3809 * We skip this on AMDs for now as their HTT is different from Intel's and 3810 3810 * it doesn't seem to have any favorable effect on the results. 3811 3811 * … … 4455 4455 * @retval VERR_INTERRUPTED if interrupted while waiting. 4456 4456 * @retval VERR_SUPDRV_TSC_DELTA_MEASUREMENT_FAILED if we were unable to get a 4457 * measur ment.4457 * measurement. 4458 4458 * @retval VERR_CPU_OFFLINE if the specified CPU is offline. 4459 4459 * … … 4712 4712 4713 4713 /* 4714 * If we're lucky we've got a delta, but no predic itions here4714 * If we're lucky we've got a delta, but no predictions here 4715 4715 * as this I/O control is normally only used when the TSC delta 4716 4716 * is set to INT64_MAX.
Note:
See TracChangeset
for help on using the changeset viewer.