Print this page
XXXX introduce drv_sectohz

Split Close
Expand all
Collapse all
          --- old/usr/src/uts/common/io/ib/adapters/hermon/hermon_stats.c
          +++ new/usr/src/uts/common/io/ib/adapters/hermon/hermon_stats.c
↓ open down ↓ 736 lines elided ↑ open up ↑
 737  737   *
 738  738   * Maintain 64 bit performance counters in software using the 32 bit
 739  739   * hardware counters.
 740  740   */
 741  741  static void
 742  742  hermon_kstat_perfcntr64_update_thread(void *arg)
 743  743  {
 744  744          hermon_state_t          *state = (hermon_state_t *)arg;
 745  745          hermon_ks_info_t        *ksi = state->hs_ks_info;
 746  746          uint_t                  i;
 747      -        clock_t                 delta = drv_usectohz(1000000);
      747 +        clock_t                 delta = drv_sectohz(1);
 748  748  
 749  749          mutex_enter(&ksi->hki_perfcntr64_lock);
 750  750          /*
 751  751           * Every one second update the values 64 bit software counters
 752  752           * for all ports. Exit if HERMON_PERFCNTR64_THREAD_EXIT flag is set.
 753  753           */
 754  754          while (!(ksi->hki_perfcntr64_flags & HERMON_PERFCNTR64_THREAD_EXIT)) {
 755  755                  for (i = 0; i < state->hs_cfg_profile->cp_num_ports; i++) {
 756  756                          if (ksi->hki_perfcntr64[i].hki64_enabled) {
 757  757                                  (void) hermon_kstat_perfcntr64_read(state,
↓ open down ↓ 224 lines elided ↑ open up ↑
XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX