Print this page
NEX-4083 Upstream changes from illumos 5917 and 5995
Reviewed by: Matt Barden <matt.barden@nexenta.com>
Reviewed by: Kevin Crowe <kevin.crowe@nexenta.com>
Reviewed by: Yuri Pankov <yuri.pankov@nexenta.com>
SMB-50 User-mode SMB server
 Includes work by these authors:
 Thomas Keiser <thomas.keiser@nexenta.com>
 Albert Lee <trisk@nexenta.com>
re #13613 rb4516 Tunables needs volatile keyword

Split Close
Expand all
Collapse all
          --- old/usr/src/uts/common/sys/systm.h
          +++ new/usr/src/uts/common/sys/systm.h
↓ open down ↓ 19 lines elided ↑ open up ↑
  20   20   */
  21   21  
  22   22  /*      Copyright (c) 1984, 1986, 1987, 1988, 1989 AT&T */
  23   23  /*        All Rights Reserved   */
  24   24  
  25   25  /*
  26   26   * Copyright 2010 Sun Microsystems, Inc.  All rights reserved.
  27   27   * Use is subject to license terms.
  28   28   * Copyright 2016 Nexenta Systems, Inc.
  29   29   */
       30 +/*
       31 + * Copyright 2013 Nexenta Systems, Inc.  All rights reserved.
       32 + */
  30   33  
  31   34  #ifndef _SYS_SYSTM_H
  32   35  #define _SYS_SYSTM_H
  33   36  
  34   37  #include <sys/types.h>
  35   38  #include <sys/t_lock.h>
  36   39  #include <sys/proc.h>
  37   40  #include <sys/dditypes.h>
  38   41  
  39   42  #ifdef  __cplusplus
↓ open down ↓ 24 lines elided ↑ open up ↑
  64   67  extern struct vnode *rootdir;   /* pointer to vnode of root directory */
  65   68  extern struct vnode *devicesdir;        /* pointer to /devices vnode */
  66   69  extern int interrupts_unleashed;        /* set after the spl0() in main() */
  67   70  
  68   71  extern char runin;              /* scheduling flag */
  69   72  extern char runout;             /* scheduling flag */
  70   73  extern char wake_sched;         /* causes clock to wake swapper on next tick */
  71   74  extern char wake_sched_sec;     /* causes clock to wake swapper after a sec */
  72   75  
  73   76  extern pgcnt_t  maxmem;         /* max available memory (pages) */
  74      -extern pgcnt_t  physmem;        /* physical memory (pages) on this CPU */
       77 +extern volatile pgcnt_t physmem; /* physical memory (pages) on this CPU */
  75   78  extern pfn_t    physmax;        /* highest numbered physical page present */
  76   79  extern pgcnt_t  physinstalled;  /* physical pages including PROM/boot use */
  77   80  
  78   81  extern caddr_t  s_text;         /* start of kernel text segment */
  79   82  extern caddr_t  e_text;         /* end of kernel text segment */
  80   83  extern caddr_t  s_data;         /* start of kernel text segment */
  81   84  extern caddr_t  e_data;         /* end of kernel text segment */
  82   85  
  83   86  extern pgcnt_t  availrmem;      /* Available resident (not swapable)    */
  84   87                                  /* memory in pages.                     */
  85   88  extern pgcnt_t  availrmem_initial;      /* initial value of availrmem   */
  86      -extern pgcnt_t  segspt_minfree; /* low water mark for availrmem in seg_spt */
       89 +extern volatile pgcnt_t segspt_minfree; /* low water mark for availrmem */
       90 +                                        /* in seg_spt                   */
  87   91  extern pgcnt_t  freemem;        /* Current free memory.                 */
  88   92  
  89   93  extern dev_t    rootdev;        /* device of the root */
  90   94  extern struct vnode *rootvp;    /* vnode of root device */
  91   95  extern boolean_t root_is_ramdisk;       /* root is boot_archive ramdisk */
  92   96  extern uint32_t  ramdisk_size;          /* (KB) set only for sparc netboots */
  93   97  extern char *volatile panicstr; /* panic string pointer */
  94   98  extern va_list  panicargs;      /* panic arguments */
  95   99  extern volatile int quiesce_active;     /* quiesce(9E) is in progress */
  96  100  
  97      -extern int      rstchown;       /* 1 ==> restrictive chown(2) semantics */
      101 +extern volatile int rstchown;   /* 1 ==> restrictive chown(2) semantics */
  98  102  extern int      klustsize;
  99  103  
 100  104  extern int      abort_enable;   /* Platform input-device abort policy */
 101  105  
 102  106  extern int      audit_active;   /* Solaris Auditing module state */
 103  107  
 104  108  extern int      avenrun[];      /* array of load averages */
 105  109  
 106  110  extern char *isa_list;          /* For sysinfo's isalist option */
 107  111  
 108      -extern int noexec_user_stack;           /* patchable via /etc/system */
      112 +extern volatile int noexec_user_stack;  /* patchable via /etc/system */
 109  113  extern int noexec_user_stack_log;       /* patchable via /etc/system */
 110  114  
 111  115  /*
 112  116   * Use NFS client operations in the global zone only.  Under contract with
 113  117   * admin/install; do not change without coordinating with that consolidation.
 114  118   */
 115  119  extern int nfs_global_client_only;
 116  120  
 117  121  extern void report_stack_exec(proc_t *, caddr_t);
 118  122  
↓ open down ↓ 182 lines elided ↑ open up ↑
 301  305  #pragma unknown_control_flow(on_fault)
 302  306  
 303  307  struct timeval;
 304  308  extern void     uniqtime(struct timeval *);
 305  309  struct timeval32;
 306  310  extern void     uniqtime32(struct timeval32 *);
 307  311  
 308  312  uint_t page_num_pagesizes(void);
 309  313  size_t page_get_pagesize(uint_t n);
 310  314  
 311      -extern int maxusers;
 312      -extern int pidmax;
      315 +extern volatile int maxusers;
      316 +extern volatile int pidmax;
 313  317  
 314  318  extern void param_preset(void);
 315  319  extern void param_calc(int);
 316  320  extern void param_init(void);
 317  321  extern void param_check(void);
 318  322  
 319  323  #endif /* _KERNEL */
 320  324  
 321  325  /*
 322  326   * Structure of the system-entry table.
↓ open down ↓ 194 lines elided ↑ open up ↑
XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX