Changeset d72c074
- Timestamp:
- Jun 24, 2020, 4:36:20 PM (5 years ago)
- Branches:
- ADT, arm-eh, ast-experimental, enum, forall-pointer-decay, jacob/cs343-translation, master, new-ast, new-ast-unique-expr, pthread-emulation, qualifiedEnum
- Children:
- 564148f
- Parents:
- 29cb302
- Location:
- libcfa/src/concurrency
- Files:
-
- 3 edited
Legend:
- Unmodified
- Added
- Removed
-
TabularUnified libcfa/src/concurrency/invoke.h ¶
r29cb302 rd72c074 168 168 struct $thread * prev; 169 169 volatile unsigned long long ts; 170 int preferred; 170 171 }; 171 172 -
TabularUnified libcfa/src/concurrency/ready_queue.cfa ¶
r29cb302 rd72c074 37 37 #endif 38 38 39 #define BIAS 839 #define BIAS 64 40 40 41 41 // returns the maximum number of processors the RWLock support … … 221 221 #if defined(BIAS) && !defined(__CFA_NO_STATISTICS__) 222 222 bool local = false; 223 int preferred = 224 //* 225 kernelTLS.this_processor ? kernelTLS.this_processor->id * 4 : -1; 226 /*/ 227 thrd->link.preferred * 4; 228 //*/ 229 230 223 231 #endif 224 232 … … 231 239 unsigned rlow = r % BIAS; 232 240 unsigned rhigh = r / BIAS; 233 if((0 != rlow) && kernelTLS.this_processor) {241 if((0 != rlow) && preferred >= 0) { 234 242 // (BIAS - 1) out of BIAS chances 235 243 // Use perferred queues 236 unsigned pid = kernelTLS.this_processor->id * 4; 237 i = pid + (rhigh % 4); 244 i = preferred + (rhigh % 4); 238 245 239 246 #if !defined(__CFA_NO_STATISTICS__) … … 411 418 #endif 412 419 420 // Update the thread bias 421 thrd->link.preferred = w / 4; 422 413 423 // return the popped thread 414 424 return thrd; -
TabularUnified libcfa/src/concurrency/thread.cfa ¶
r29cb302 rd72c074 38 38 link.next = 0p; 39 39 link.prev = 0p; 40 link.preferred = -1; 40 41 41 42 node.next = 0p;
Note: See TracChangeset
for help on using the changeset viewer.