Print this page
4045 zfs write throttle & i/o scheduler performance work
Reviewed by: George Wilson <george.wilson@delphix.com>
Reviewed by: Adam Leventhal <ahl@delphix.com>
Reviewed by: Christopher Siden <christopher.siden@delphix.com>

Split Close
Expand all
Collapse all
          --- old/usr/src/lib/libzpool/common/sys/zfs_context.h
          +++ new/usr/src/lib/libzpool/common/sys/zfs_context.h
↓ open down ↓ 157 lines elided ↑ open up ↑
 158  158   * twice, so it should not have side effects (e.g. something like:
 159  159   * "return (SET_ERROR(log_error(EINVAL, info)));" would log the error twice).
 160  160   */
 161  161  #define SET_ERROR(err) (ZFS_SET_ERROR(err), err)
 162  162  
 163  163  /*
 164  164   * Threads
 165  165   */
 166  166  #define curthread       ((void *)(uintptr_t)thr_self())
 167  167  
      168 +#define kpreempt(x)     yield()
      169 +
 168  170  typedef struct kthread kthread_t;
 169  171  
 170  172  #define thread_create(stk, stksize, func, arg, len, pp, state, pri)     \
 171  173          zk_thread_create(func, arg)
 172  174  #define thread_exit() thr_exit(NULL)
 173  175  #define thread_join(t)  panic("libzpool cannot join threads")
 174  176  
 175  177  #define newproc(f, a, cid, pri, ctp, pid)       (ENOSYS)
 176  178  
 177  179  /* in libzpool, p0 exists only to have its address taken */
↓ open down ↓ 500 lines elided ↑ open up ↑
XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX