Ignore:
Timestamp:
Jul 28, 2022, 12:04:25 PM (2 years ago)
Author:
Thierry Delisle <tdelisle@…>
Branches:
ADT, ast-experimental, master, pthread-emulation
Children:
32d1383, d0fcc82
Parents:
3f95dab (diff), 2af1943 (diff)
Note: this is a merge changeset, the changes displayed below correspond to the merge itself.
Use the (diff) links above to see all the changes relative to each parent.
Message:

Merge branch 'master' of plg.uwaterloo.ca:software/cfa/cfa-cc

File:
1 edited

Legend:

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

    r3f95dab rc4c8571  
    8181                                /* paranoid */ verify( i < lanes_count );
    8282                                // If we can't lock it retry
    83                         } while( !__atomic_try_acquire( &readyQ.data[i].lock ) );
     83                        } while( !__atomic_try_acquire( &readyQ.data[i].l.lock ) );
    8484                } else {
    8585                        do {
    8686                                i = __tls_rand() % lanes_count;
    87                         } while( !__atomic_try_acquire( &readyQ.data[i].lock ) );
     87                        } while( !__atomic_try_acquire( &readyQ.data[i].l.lock ) );
    8888                }
    8989        } else {
     
    9393                        /* paranoid */ verify( i < lanes_count );
    9494                        // If we can't lock it retry
    95                 } while( !__atomic_try_acquire( &readyQ.data[i].lock ) );
     95                } while( !__atomic_try_acquire( &readyQ.data[i].l.lock ) );
    9696        }
    9797
     
    100100
    101101        // Unlock and return
    102         __atomic_unlock( &readyQ.data[i].lock );
     102        __atomic_unlock( &readyQ.data[i].l.lock );
    103103
    104104        #if !defined(__CFA_NO_STATISTICS__)
     
    136136        else {
    137137                const unsigned target = proc->rdq.target;
    138                 __cfadbg_print_safe(ready_queue, "Kernel : %u considering helping %u, tcsc %llu\n", this, target, readyQ.tscs[target].tv);
    139                 /* paranoid */ verify( readyQ.tscs[target].tv != ULLONG_MAX );
     138                __cfadbg_print_safe(ready_queue, "Kernel : %u considering helping %u, tcsc %llu\n", this, target, readyQ.tscs[target].t.tv);
     139                /* paranoid */ verify( readyQ.tscs[target].t.tv != ULLONG_MAX );
    140140                if(target < lanes_count) {
    141141                        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].tv, readyQ.tscs[target].ma);
     142                        const unsigned long long age = moving_average(ctsc, readyQ.tscs[target].t.tv, readyQ.tscs[target].t.ma);
    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) {
     
    188188
    189189        // If we can't get the lock retry
    190         if( !__atomic_try_acquire(&lane.lock) ) {
     190        if( !__atomic_try_acquire(&lane.l.lock) ) {
    191191                return 0p;
    192192        }
     
    194194        // If list is empty, unlock and retry
    195195        if( is_empty(lane) ) {
    196                 __atomic_unlock(&lane.lock);
     196                __atomic_unlock(&lane.l.lock);
    197197                return 0p;
    198198        }
     
    206206        /* paranoid */ verify(thrd);
    207207        /* paranoid */ verify(ts_next);
    208         /* paranoid */ verify(lane.lock);
     208        /* paranoid */ verify(lane.l.lock);
    209209
    210210        // Unlock and return
    211         __atomic_unlock(&lane.lock);
     211        __atomic_unlock(&lane.l.lock);
    212212
    213213        // Update statistics
Note: See TracChangeset for help on using the changeset viewer.