Print this page
8115 parallel zfs mount

Split Close
Expand all
Collapse all
          --- old/usr/src/lib/libfakekernel/common/taskq.c
          +++ new/usr/src/lib/libfakekernel/common/taskq.c
↓ open down ↓ 17 lines elided ↑ open up ↑
  18   18   *
  19   19   * CDDL HEADER END
  20   20   */
  21   21  /*
  22   22   * Copyright 2010 Sun Microsystems, Inc.  All rights reserved.
  23   23   * Use is subject to license terms.
  24   24   */
  25   25  /*
  26   26   * Copyright 2012 Garrett D'Amore <garrett@damore.org>.  All rights reserved.
  27   27   * Copyright 2013 Nexenta Systems, Inc.  All rights reserved.
       28 + * Copyright 2017 RackTop Systems.
  28   29   */
  29   30  
  30   31  #include <sys/taskq_impl.h>
  31   32  
  32   33  #include <sys/class.h>
  33   34  #include <sys/debug.h>
  34   35  #include <sys/ksynch.h>
  35   36  #include <sys/kmem.h>
  36   37  #include <sys/time.h>
  37   38  #include <sys/systm.h>
  38   39  #include <sys/sysmacros.h>
  39   40  #include <sys/unistd.h>
  40   41  
       42 +/* avoid <sys/disp.h> */
       43 +#define   maxclsyspri     99
       44 +
  41   45  /* avoid <unistd.h> */
  42   46  extern long sysconf(int);
  43   47  
  44   48  /* avoiding <thread.h> */
  45   49  typedef unsigned int thread_t;
  46   50  typedef unsigned int thread_key_t;
  47   51  
  48   52  extern int thr_create(void *, size_t, void *(*)(void *), void *, long,
  49   53                          thread_t *);
  50   54  extern int thr_join(thread_t, thread_t *, void **);
↓ open down ↓ 205 lines elided ↑ open up ↑
 256  260  
 257  261  /*ARGSUSED*/
 258  262  taskq_t *
 259  263  taskq_create(const char *name, int nthr, pri_t pri, int minalloc,
 260  264      int maxalloc, uint_t flags)
 261  265  {
 262  266          return (taskq_create_proc(name, nthr, pri,
 263  267              minalloc, maxalloc, NULL, flags));
 264  268  }
 265  269  
      270 +/*ARGSUSED*/
      271 +taskq_t *
      272 +taskq_create_sysdc(const char *name, int nthr, int minalloc,
      273 +    int maxalloc, proc_t *proc, uint_t dc, uint_t flags)
      274 +{
      275 +        return (taskq_create_proc(name, nthr, maxclsyspri,
      276 +            minalloc, maxalloc, proc, flags));
      277 +}
      278 +
 266  279  /*ARGSUSED*/
 267  280  taskq_t *
 268  281  taskq_create_proc(const char *name, int nthreads, pri_t pri,
 269  282          int minalloc, int maxalloc, proc_t *proc, uint_t flags)
 270  283  {
 271  284          taskq_t *tq = kmem_zalloc(sizeof (taskq_t), KM_SLEEP);
 272  285          int t;
 273  286  
 274  287          if (flags & TASKQ_THREADS_CPU_PCT) {
 275  288                  int pct;
↓ open down ↓ 105 lines elided ↑ open up ↑
XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX