Changeset 48441 in vbox for trunk/src/VBox/VMM/VMMAll
- Timestamp:
- Sep 11, 2013 5:35:55 PM (11 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/src/VBox/VMM/VMMAll/VMMAll.cpp
r48426 r48441 200 200 * and then by native thread id (page fusion case). 201 201 */ 202 /* RTMpCpuId had better be cheap. */ 203 Assert(!RTThreadPreemptIsEnabled(NIL_RTTHREAD)); 204 RTCPUID idHostCpu = RTMpCpuId(); 205 206 /** @todo optimize for large number of VCPUs when that becomes more common. */ 207 for (VMCPUID idCpu = 0; idCpu < pVM->cCpus; idCpu++) 208 { 209 PVMCPU pVCpu = &pVM->aCpus[idCpu]; 210 211 if (pVCpu->idHostCpu == idHostCpu) 212 return pVCpu->idCpu; 202 if (!RTThreadPreemptIsEnabled(NIL_RTTHREAD)) 203 { 204 /** @todo r=ramshankar: This doesn't buy us anything in terms of performance 205 * leaving it here for hysterical raisins and as a reference if we 206 * implemented a hashing approach in the future. */ 207 RTCPUID idHostCpu = RTMpCpuId(); 208 209 /** @todo optimize for large number of VCPUs when that becomes more common. */ 210 for (VMCPUID idCpu = 0; idCpu < pVM->cCpus; idCpu++) 211 { 212 PVMCPU pVCpu = &pVM->aCpus[idCpu]; 213 214 if (pVCpu->idHostCpu == idHostCpu) 215 return pVCpu->idCpu; 216 } 213 217 } 214 218 … … 263 267 * leaving it here for hysterical raisins and as a reference if we 264 268 * implemented a hashing approach in the future. */ 265 266 /* RTMpCpuId had better be cheap. */267 269 RTCPUID idHostCpu = RTMpCpuId(); 268 270
Note:
See TracChangeset
for help on using the changeset viewer.