Fork us on GitHub Follow us on Facebook Follow us on Twitter

Changeset b68ae24 in mainline


Ignore:
Timestamp:
2012-07-11T05:47:44Z (10 years ago)
Author:
Adam Hraska <adam.hraska+hos@…>
Branches:
lfn, master, serial
Children:
1066041
Parents:
b23c88e
Message:

rcu: Fixed printing incorrect statistics.

File:
1 edited

Legend:

Unmodified
Added
Removed
  • kernel/generic/src/synch/rcu.c

    rb23c88e rb68ae24  
    639639}
    640640
    641 static void upd_stat_missed_gp(rcu_gp_t compl, rcu_gp_t cb_gp)
    642 {
    643         if (compl > cb_gp) {
    644                 CPU->rcu.stat_missed_gps += (size_t)(compl - cb_gp);
     641static void upd_stat_missed_gp(rcu_gp_t compl)
     642{
     643        if (CPU->rcu.cur_cbs_gp < compl) {
     644                CPU->rcu.stat_missed_gps += (size_t)(compl - CPU->rcu.cur_cbs_gp);
    645645        }
    646646}
     
    649649static void exec_completed_cbs(rcu_gp_t last_completed_gp)
    650650{
     651        upd_stat_missed_gp(last_completed_gp);
     652       
    651653        if (CPU->rcu.cur_cbs_gp <= last_completed_gp) {
    652                 upd_stat_missed_gp(last_completed_gp, CPU->rcu.cur_cbs_gp);
    653654                exec_cbs(&CPU->rcu.cur_cbs);
    654655        }
    655656       
    656657        if (CPU->rcu.next_cbs_gp <= last_completed_gp) {
    657                 upd_stat_missed_gp(last_completed_gp, CPU->rcu.next_cbs_gp);
    658658                exec_cbs(&CPU->rcu.next_cbs);   
    659659        }
     
    12891289                rcu.stat_delayed_cnt);
    12901290        printf("Preempt blocked GPs: %zu (waited for preempted readers; "
    1291                 "running or not)\n", rcu.stat_delayed_cnt);
     1291                "running or not)\n", rcu.stat_preempt_blocking_cnt);
     1292        printf("Smp calls:     %zu\n", rcu.stat_smp_call_cnt);
    12921293       
    12931294        printf("Max callbacks per GP:\n");
Note: See TracChangeset for help on using the changeset viewer.