Ignore:
Timestamp:
Sep 29, 2022, 11:57:28 AM (4 months ago)
Author:
Thierry Delisle <tdelisle@…>
Branches:
master
Children:
77125cc
Parents:
1756e08
Message:

Added strict flag to moving average to keep track of which timestamps need to be correct

File:
1 edited

Legend:

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

    r1756e08 r5f9c42b  
    139139                /* paranoid */ verify( readyQ.tscs[target].t.tv != ULLONG_MAX );
    140140                if(target < lanes_count) {
    141                         const unsigned long long cutoff = calc_cutoff(ctsc, proc->rdq.id, lanes_count, cltr->sched.readyQ.data, cltr->sched.readyQ.tscs, __shard_factor.readyq);
    142                         const unsigned long long age = moving_average(ctsc, readyQ.tscs[target].t.tv, readyQ.tscs[target].t.ma);
     141                        const unsigned long long cutoff = calc_cutoff(ctsc, proc->rdq.id, lanes_count, cltr->sched.readyQ.data, cltr->sched.readyQ.tscs, __shard_factor.readyq, true);
     142                        const unsigned long long age = moving_average(ctsc, readyQ.tscs[target].t.tv, readyQ.tscs[target].t.ma, false);
    143143                        __cfadbg_print_safe(ready_queue, "Kernel : Help attempt on %u from %u, age %'llu vs cutoff %'llu, %s\n", target, this, age, cutoff, age > cutoff ? "yes" : "no");
    144144                        if(age > cutoff) {
     
    214214        __STATS( stats.success++; )
    215215
    216         touch_tsc(readyQ.tscs, w, ts_prev, ts_next);
     216        touch_tsc(readyQ.tscs, w, ts_prev, ts_next, true);
    217217
    218218        thrd->preferred = w / __shard_factor.readyq;
Note: See TracChangeset for help on using the changeset viewer.