Changeset 56924 in vbox for trunk/src/VBox/HostDrivers/Support
- Timestamp:
- Jul 13, 2015 12:34:53 PM (10 years ago)
- svn:sync-xref-src-repo-rev:
- 101627
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/src/VBox/HostDrivers/Support/SUPDrvGip.cpp
r55436 r56924 4082 4082 RTSpinlockRelease(pDevExt->hTscDeltaSpinlock); 4083 4083 4084 /* Simple adaptive timeout. */ 4085 if (cConsecutiveTimeouts++ == 10) 4086 { 4087 if (pDevExt->cMsTscDeltaTimeout == 1) /* 10 ms */ 4088 pDevExt->cMsTscDeltaTimeout = 10; 4089 else if (pDevExt->cMsTscDeltaTimeout == 10) /* +100 ms */ 4090 pDevExt->cMsTscDeltaTimeout = 100; 4091 else if (pDevExt->cMsTscDeltaTimeout == 100) /* +1000 ms */ 4092 pDevExt->cMsTscDeltaTimeout = 500; 4093 cConsecutiveTimeouts = 0; 4094 } 4095 rc = RTThreadUserWait(pDevExt->hTscDeltaThread, pDevExt->cMsTscDeltaTimeout); 4084 /* 4085 * Linux counts uninterruptible sleeps as load, hence we shall do a 4086 * regular, interruptible sleep here and ignore wake ups due to signals. 4087 * See task_contributes_to_load() in include/linux/sched.h in the Linux sources. 4088 */ 4089 rc = RTThreadUserWaitNoResume(pDevExt->hTscDeltaThread, pDevExt->cMsTscDeltaTimeout); 4096 4090 if ( RT_FAILURE(rc) 4097 && rc != VERR_TIMEOUT) 4091 && rc != VERR_TIMEOUT 4092 && rc != VERR_INTERRUPTED) 4098 4093 return supdrvTscDeltaThreadButchered(pDevExt, false /* fSpinlockHeld */, "RTThreadUserWait", rc); 4099 4094 RTThreadUserReset(pDevExt->hTscDeltaThread); … … 4108 4103 return supdrvTscDeltaThreadButchered(pDevExt, true /* fSpinlockHeld */, "RTSemEventSignal", rc); 4109 4104 RTSpinlockRelease(pDevExt->hTscDeltaSpinlock); 4110 pDevExt->cMsTscDeltaTimeout = 1;4111 4105 RTThreadSleep(1); 4112 4106 /* fall thru */ … … 4343 4337 { 4344 4338 pDevExt->enmTscDeltaThreadState = kTscDeltaThreadState_Creating; 4345 pDevExt->cMsTscDeltaTimeout = 1;4339 pDevExt->cMsTscDeltaTimeout = 60000; 4346 4340 rc = RTThreadCreate(&pDevExt->hTscDeltaThread, supdrvTscDeltaThread, pDevExt, 0 /* cbStack */, 4347 4341 RTTHREADTYPE_DEFAULT, RTTHREADFLAGS_WAITABLE, "VBoxTscThread");
Note:
See TracChangeset
for help on using the changeset viewer.