Ignore:
Timestamp:
Apr 19, 2021, 5:07:16 PM (2 years ago)
Author:
Thierry Delisle <tdelisle@…>
Branches:
arm-eh, enum, forall-pointer-decay, jacob/cs343-translation, master, new-ast-unique-expr, pthread-emulation, qualifiedEnum
Children:
59f3f61, 665edf40, ddd473f
Parents:
4aa495f
Message:

Changed stats to make sense with relaxed fifo and work stealing

File:
1 edited

Legend:

Unmodified
Added
Removed
  • libcfa/src/concurrency/stats.hfa

    r4aa495f rd2fadeb  
    1616        static inline void __print_stats( struct __stats_t *, int, const char *, const char *, void * ) {}
    1717#else
     18        struct __stats_readyQ_pop_t {
     19                // number of attemps at poping something
     20                volatile uint64_t attempt;
    1821
    19         struct __attribute__((aligned(64))) __stats_readQ_t {
     22                // number of successes at poping
     23                volatile uint64_t success;
     24
     25                // number of attempts failed due to the lock being held
     26                volatile uint64_t elock;
     27
     28                // number of attempts failed due to the queue being empty (lock held)
     29                volatile uint64_t eempty;
     30
     31                // number of attempts failed due to the queue looking empty (lock not held)
     32                volatile uint64_t espec;
     33        };
     34
     35        struct __attribute__((aligned(64))) __stats_readyQ_t {
     36                // Push statistic
    2037                struct {
    21                         // Push statistic
    2238                        struct {
    23                                 // number of attemps at pushing something
     39                                // number of attemps at pushing something to preferred queues
    2440                                volatile uint64_t attempt;
    2541
    26                                 // number of successes at pushing
     42                                // number of successes at pushing to preferred queues
    2743                                volatile uint64_t success;
     44                        }
     45                        // Stats for local queue within cluster
     46                        local,
    2847
    29                                 // number of attemps at pushing something to preferred queues
    30                                 volatile uint64_t local;
     48                        // Stats for non-local queues within cluster
     49                        share,
    3150
    32                                 // number of successes at pushing to preferred queues
    33                                 volatile uint64_t lsuccess;
    34                         } push;
     51                        // Stats from outside cluster
     52                        extrn;
     53                } push;
    3554
    36                         struct {
    37                                 // number of attemps at pushing something
    38                                 volatile uint64_t attempt;
     55                // Pop statistic
     56                struct {
     57                        // pop from local queue
     58                        __stats_readyQ_pop_t local;
    3959
    40                                 // number of successes at pushing
    41                                 volatile uint64_t success;
     60                        // pop before looking at local queue
     61                        __stats_readyQ_pop_t help;
    4262
    43                                 // number of attemps at pushing something to preferred queues
    44                                 volatile uint64_t local;
     63                        // pop from some other queue
     64                        __stats_readyQ_pop_t steal;
    4565
    46                                 // number of successes at pushing to preferred queues
    47                                 volatile uint64_t lsuccess;
    48                         } ext;
     66                        // pop when searching queues sequentially
     67                        __stats_readyQ_pop_t search;
     68                } pop;
    4969
    50                         // Pop statistic
    51                         struct {
    52                                 // number of reads of the mask
    53                                 // picking an empty __cfa_readyQ_mask_t counts here
    54                                 // but not as an attempt
    55                                 volatile uint64_t probe;
    56 
    57                                 // number of attemps at poping something
    58                                 volatile uint64_t attempt;
    59 
    60                                 // number of successes at poping
    61                                 volatile uint64_t success;
    62 
    63                                 // number of attemps at poping something to preferred queues
    64                                 volatile uint64_t local;
    65 
    66                                 // number of successes at poping to preferred queues
    67                                 volatile uint64_t lsuccess;
    68                         } pop;
    69                 } pick;
    7070                struct {
    7171                        volatile uint64_t migration;
     
    119119
    120120        struct __attribute__((aligned(128))) __stats_t {
    121                 __stats_readQ_t ready;
     121                __stats_readyQ_t ready;
    122122                #if defined(CFA_HAVE_LINUX_IO_URING_H)
    123123                        __stats_io_t    io;
Note: See TracChangeset for help on using the changeset viewer.