Changeset 0fb3ee5
- Timestamp:
 - Jan 17, 2022, 7:47:29 PM (4 years ago)
 - Branches:
 - ADT, ast-experimental, enum, forall-pointer-decay, master, pthread-emulation, qualifiedEnum
 - Children:
 - f55f110
 - Parents:
 - 25337e0
 - Location:
 - libcfa/src/concurrency
 - Files:
 - 
      
- 2 edited
 
- 
          
  kernel.hfa (modified) (2 diffs)
 - 
          
  ready_queue.cfa (modified) (1 diff)
 
 
Legend:
- Unmodified
 - Added
 - Removed
 
- 
      
libcfa/src/concurrency/kernel.hfa
r25337e0 r0fb3ee5 68 68 unsigned last; 69 69 signed cpu; 70 // unsigned long long int cutoff;71 70 } rdq; 72 71 … … 154 153 }; 155 154 156 struct __attribute__((aligned(1 28))) __cache_id_t {155 struct __attribute__((aligned(16))) __cache_id_t { 157 156 volatile unsigned id; 158 157 };  - 
      
libcfa/src/concurrency/ready_queue.cfa
r25337e0 r0fb3ee5 399 399 /* paranoid */ verify(cpu < cpu_info.hthrd_count); 400 400 unsigned this_cache = cpu_info.llc_map[cpu].cache; 401 __atomic_store_n(&lanes.caches[this / READYQ_SHARD_FACTOR].id, this_cache, __ATOMIC_RELAXED); 401 402 // Super important: don't write the same value over and over again 403 // We want to maximise our chances that his particular values stays in cache 404 if(lanes.caches[this / READYQ_SHARD_FACTOR].id != this_cache) 405 __atomic_store_n(&lanes.caches[this / READYQ_SHARD_FACTOR].id, this_cache, __ATOMIC_RELAXED); 402 406 403 407 const unsigned long long ctsc = rdtscl();  
  Note:
 See   TracChangeset
 for help on using the changeset viewer.