Print this page
XXXX introduce drv_sectohz

Split Close
Expand all
Collapse all
          --- old/usr/src/uts/common/io/ib/adapters/tavor/tavor_stats.c
          +++ new/usr/src/uts/common/io/ib/adapters/tavor/tavor_stats.c
↓ open down ↓ 673 lines elided ↑ open up ↑
 674  674          while (!(ksi->tki_perfcntr64_flags & TAVOR_PERFCNTR64_THREAD_EXIT)) {
 675  675                  for (i = 0; i < state->ts_cfg_profile->cp_num_ports; i++) {
 676  676                          if (ksi->tki_perfcntr64[i].tki64_enabled) {
 677  677                                  (void) tavor_kstat_perfcntr64_read(state,
 678  678                                      i + 1, 1);
 679  679                          }
 680  680                  }
 681  681                  /* sleep for a second */
 682  682                  (void) cv_timedwait(&ksi->tki_perfcntr64_cv,
 683  683                      &ksi->tki_perfcntr64_lock,
 684      -                    ddi_get_lbolt() + drv_usectohz(1000000));
      684 +                    ddi_get_lbolt() + drv_sectohz(1));
 685  685          }
 686  686          ksi->tki_perfcntr64_flags = 0;
 687  687          mutex_exit(&ksi->tki_perfcntr64_lock);
 688  688  }
 689  689  
 690  690  /*
 691  691   * tavor_kstat_perfcntr64_thread_create()
 692  692   *    Context: Called from the kstat context
 693  693   *
 694  694   * Create a thread that maintains 64 bit performance counters in software.
↓ open down ↓ 155 lines elided ↑ open up ↑
XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX