Print this page
XXXX introduce drv_sectohz

Split Close
Expand all
Collapse all
          --- old/usr/src/uts/common/crypto/api/kcf_cbufcall.c
          +++ new/usr/src/uts/common/crypto/api/kcf_cbufcall.c
↓ open down ↓ 281 lines elided ↑ open up ↑
 282  282                           * Wait 30 seconds for queue space to become available.
 283  283                           * This number is reasonable as it does not cause
 284  284                           * much CPU overhead. We could wait on a condition
 285  285                           * variable and the global software dequeue routine can
 286  286                           * signal us. But, it adds overhead to that routine
 287  287                           * which we want to avoid. Also, the client is prepared
 288  288                           * to wait any way.
 289  289                           */
 290  290                          CALLB_CPR_SAFE_BEGIN(&cprinfo);
 291  291                          mutex_exit(&cbuf_list_lock);
 292      -                        delay(30 * drv_usectohz(1000000));
      292 +                        delay(drv_sectohz(30));
 293  293                          mutex_enter(&cbuf_list_lock);
 294  294                          CALLB_CPR_SAFE_END(&cprinfo, &cbuf_list_lock);
 295  295                  }
 296  296  
 297  297                  /* Wait for new work to arrive */
 298  298                  if (cbuf_list_head == NULL) {
 299  299                          CALLB_CPR_SAFE_BEGIN(&cprinfo);
 300  300                          cv_wait(&cbuf_list_cv, &cbuf_list_lock);
 301  301                          CALLB_CPR_SAFE_END(&cprinfo, &cbuf_list_lock);
 302  302                  }
 303  303          }
 304  304  }
    
XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX