Changeset 15879 in vbox for trunk/src/VBox
- Timestamp:
- Jan 8, 2009 6:39:41 PM (16 years ago)
- Location:
- trunk/src/VBox/Devices
- Files:
-
- 2 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/src/VBox/Devices/Storage/DevATA.cpp
r15855 r15879 409 409 uint32_t Alignment0; 410 410 #endif 411 412 /** Timestamp we started the reset. */ 413 uint64_t u64ResetTime; 411 414 412 415 /* Statistics */ … … 3731 3734 PDMCritSectLeave(&pCtl->lock); 3732 3735 3736 #ifndef RT_OS_WINDOWS 3737 /* 3738 * The thread might be stuck in an I/O operation 3739 * due to a high I/O load on the host. (see @bugref{3301}) 3740 * To perform the reset successfully 3741 * we interrupt the operation by sending a signal to the thread 3742 * if the thread didn't responded in 10ms. 3743 * This works only on POSIX hosts (Windows has a CancelSynchronousIo function which 3744 * does the same but it was introduced with Vista) but so far 3745 * this hang was only observed on Linux and Mac OS X. 3746 * 3747 * This is a workaround and needs to be solved properly. 3748 */ 3749 if (pCtl->fReset) 3750 { 3751 uint64_t u64ResetTimeStop = RTTimeMilliTS(); 3752 3753 if ((u64ResetTimeStop - pCtl->u64ResetTime) >= 10) 3754 { 3755 LogRel(("PIIX3 ATA: Async I/O thread probably stuck in operation, interrupting\n")); 3756 pCtl->u64ResetTime = u64ResetTimeStop; 3757 RTThreadPoke(pCtl->AsyncIOThread); 3758 } 3759 } 3760 #endif 3761 3733 3762 RTThreadYield(); 3734 3763 … … 3824 3853 } 3825 3854 3826 /* 3827 * The thread might be stuck in an I/O operation 3828 * due to a high I/O load on the host. (see @bugref{3301}) 3829 * To perform the reset successfully 3830 * we interrupt the operation by sending a signal to the thread. 3831 * This works only on POSIX hosts (Windows has a CancelSynchronousIo function which 3832 * does the same but it was introduced with Vista) but so far 3833 * this hang was only observed on Linux and Mac OS X. 3834 * 3835 * This is a workaround and needs to be solved properly. 3836 */ 3837 #ifndef RT_OS_WINDOWS 3838 RTThreadPoke(pCtl->AsyncIOThread); 3839 #endif 3855 /* Save the timestamp we started the reset. */ 3856 pCtl->u64ResetTime = RTTimeMilliTS(); 3840 3857 3841 3858 /* Issue the reset request now. */ -
trunk/src/VBox/Devices/testcase/tstDeviceStructSizeGC.cpp
r15855 r15879 750 750 GEN_CHECK_OFF(ATACONTROLLER, SuspendIOSem); 751 751 GEN_CHECK_OFF(ATACONTROLLER, DelayIRQMillies); 752 GEN_CHECK_OFF(ATACONTROLLER, u64ResetTime); 752 753 GEN_CHECK_OFF(ATACONTROLLER, StatAsyncOps); 753 754 GEN_CHECK_OFF(ATACONTROLLER, StatAsyncMinWait);
Note:
See TracChangeset
for help on using the changeset viewer.