- Timestamp:
- Mar 21, 2012 4:11:19 PM (13 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/src/VBox/Main/src-server/Performance.cpp
r40536 r40568 490 490 * guest metrics collection, so we rely on this fact to detect blocked 491 491 * guests. If the guest has not finished processing the previous request 492 * we consider it blocked.492 * after half a second we consider it blocked. 493 493 */ 494 494 if (aRequest->getGuest() && aRequest->getGuest() == mGuestBeingCalled) 495 495 { 496 /* Request execution got stalled for this guest -- report an error */ 497 return E_FAIL; 496 /* 497 * Before we can declare a guest blocked we need to wait for a while 498 * and then check again as it may never had a chance to process 499 * the previous request. Half a second is an eternity for processes 500 * and is barely noticable by humans. 501 */ 502 LogAleksey(("{%p} " LOG_FN_FMT ": Suspecting %s is stalled. Waiting for .5 sec...\n", 503 this, __PRETTY_FUNCTION__, 504 aRequest->getGuest()->getVMName().c_str())); 505 RTThreadSleep(500 /* ms */); 506 if (aRequest->getGuest() == mGuestBeingCalled) { 507 LogAleksey(("{%p} " LOG_FN_FMT ": Request processing stalled for %s\n", 508 this, __PRETTY_FUNCTION__, 509 aRequest->getGuest()->getVMName().c_str())); 510 /* Request execution got stalled for this guest -- report an error */ 511 return E_FAIL; 512 } 498 513 } 499 514 mQueue.push(aRequest); … … 509 524 HRESULT rc = S_OK; 510 525 511 LogAleksey(("{%p} " LOG_FN_FMT ": Starting request processing loop... p\n",526 LogAleksey(("{%p} " LOG_FN_FMT ": Starting request processing loop...\n", 512 527 mgr, __PRETTY_FUNCTION__)); 513 528 while ((pReq = mgr->mQueue.pop()) != NULL)
Note:
See TracChangeset
for help on using the changeset viewer.