Ignore:
Timestamp:
Mar 15, 2022, 5:11:50 PM (2 years ago)
Author:
Thierry Delisle <tdelisle@…>
Branches:
ADT, ast-experimental, enum, master, pthread-emulation, qualifiedEnum
Children:
9d8124f
Parents:
a552a8c
Message:

Some more cleanup and grow/shrink now readjusts io timestamps.
(They are still unused).

File:
1 edited

Legend:

Unmodified
Added
Removed
  • libcfa/src/concurrency/ready_queue.cfa

    ra552a8c r708ae38  
    2424#include "bits/defs.hfa"
    2525#include "device/cpu.hfa"
    26 #include "kernel_private.hfa"
     26#include "kernel/cluster.hfa"
     27#include "kernel/private.hfa"
    2728
    2829#include "limits.hfa"
     
    122123        __cfadbg_print_safe(ready_queue, "Kernel : pop from %u\n", this);
    123124
    124         // Figure out the current cpu and make sure it is valid
    125         const int cpu = __kernel_getcpu();
    126         /* paranoid */ verify(cpu >= 0);
    127         /* paranoid */ verify(cpu < cpu_info.hthrd_count);
    128         unsigned this_cache = cpu_info.llc_map[cpu].cache;
    129 
    130         // Super important: don't write the same value over and over again
    131         // We want to maximise our chances that his particular values stays in cache
    132         if(caches[this / __shard_factor.readyq].id != this_cache)
    133                 __atomic_store_n(&caches[this / __shard_factor.readyq].id, this_cache, __ATOMIC_RELAXED);
    134 
     125        // Figure out the current cache is
     126        const unsigned this_cache = cache_id(cltr, this / __shard_factor.readyq);
    135127        const unsigned long long ctsc = rdtscl();
    136128
Note: See TracChangeset for help on using the changeset viewer.