Print this page
XXXX introduce drv_sectohz

Split Close
Expand all
Collapse all
          --- old/usr/src/uts/common/os/sunmdi.c
          +++ new/usr/src/uts/common/os/sunmdi.c
↓ open down ↓ 108 lines elided ↑ open up ↑
 109  109   * taskq interface definitions
 110  110   */
 111  111  #define MDI_TASKQ_N_THREADS     8
 112  112  #define MDI_TASKQ_PRI           minclsyspri
 113  113  #define MDI_TASKQ_MINALLOC      (4*mdi_taskq_n_threads)
 114  114  #define MDI_TASKQ_MAXALLOC      (500*mdi_taskq_n_threads)
 115  115  
 116  116  taskq_t                         *mdi_taskq;
 117  117  static uint_t                   mdi_taskq_n_threads = MDI_TASKQ_N_THREADS;
 118  118  
 119      -#define TICKS_PER_SECOND        (drv_usectohz(1000000))
      119 +#define TICKS_PER_SECOND        drv_sectohz(1)
 120  120  
 121  121  /*
 122  122   * The data should be "quiet" for this interval (in seconds) before the
 123  123   * vhci cached data is flushed to the disk.
 124  124   */
 125  125  static int mdi_vhcache_flush_delay = 10;
 126  126  
 127  127  /* number of seconds the vhcache flush daemon will sleep idle before exiting */
 128  128  static int mdi_vhcache_flush_daemon_idle_time = 60;
 129  129  
↓ open down ↓ 3063 lines elided ↑ open up ↑
3193 3193  
3194 3194          while (MDI_PI(pip)->pi_ref_cnt != 0) {
3195 3195                  /*
3196 3196                   * Give a chance for pending I/Os to complete.
3197 3197                   */
3198 3198                  MDI_DEBUG(1, (MDI_NOTE, ct->ct_dip,
3199 3199                      "!%d cmds still pending on path: %s %p",
3200 3200                      MDI_PI(pip)->pi_ref_cnt,
3201 3201                      mdi_pi_spathname(pip), (void *)pip));
3202 3202                  if (cv_reltimedwait(&MDI_PI(pip)->pi_ref_cv,
3203      -                    &MDI_PI(pip)->pi_mutex, drv_usectohz(60 * 1000000),
     3203 +                    &MDI_PI(pip)->pi_mutex, drv_sectohz(60),
3204 3204                      TR_CLOCK_TICK) == -1) {
3205 3205                          /*
3206 3206                           * The timeout time reached without ref_cnt being zero
3207 3207                           * being signaled.
3208 3208                           */
3209 3209                          MDI_DEBUG(1, (MDI_NOTE, ct->ct_dip,
3210 3210                              "!Timeout reached on path %s %p without the cond",
3211 3211                              mdi_pi_spathname(pip), (void *)pip));
3212 3212                          MDI_DEBUG(1, (MDI_NOTE, ct->ct_dip,
3213 3213                              "!%d cmds still pending on path %s %p",
↓ open down ↓ 645 lines elided ↑ open up ↑
3859 3859  
3860 3860          while (MDI_PI(pip)->pi_ref_cnt != 0) {
3861 3861                  /*
3862 3862                   * Give a chance for pending I/Os to complete.
3863 3863                   */
3864 3864                  MDI_DEBUG(1, (MDI_NOTE, ct->ct_dip,
3865 3865                      "!%d cmds still pending on path %s %p",
3866 3866                      MDI_PI(pip)->pi_ref_cnt, mdi_pi_spathname(pip),
3867 3867                      (void *)pip));
3868 3868                  if (cv_reltimedwait(&MDI_PI(pip)->pi_ref_cv,
3869      -                    &MDI_PI(pip)->pi_mutex, drv_usectohz(60 * 1000000),
     3869 +                    &MDI_PI(pip)->pi_mutex, drv_sectohz(60),
3870 3870                      TR_CLOCK_TICK) == -1) {
3871 3871                          /*
3872 3872                           * The timeout time reached without ref_cnt being zero
3873 3873                           * being signaled.
3874 3874                           */
3875 3875                          MDI_DEBUG(1, (MDI_NOTE, ct->ct_dip,
3876 3876                              "!Timeout reached on path %s %p without the cond",
3877 3877                              mdi_pi_spathname(pip), (void *)pip));
3878 3878                          MDI_DEBUG(1, (MDI_NOTE, ct->ct_dip,
3879 3879                              "!%d cmds still pending on path %s %p",
↓ open down ↓ 5866 lines elided ↑ open up ↑
XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX