Print this page
OS-3088 need a lighterweight page invalidation mechanism for zone memcap
OS-750 improve RUSAGESYS_GETVMUSAGE for zoneadmd

Split Close
Expand all
Collapse all
          --- old/usr/src/uts/common/sys/vm_usage.h
          +++ new/usr/src/uts/common/sys/vm_usage.h
↓ open down ↓ 13 lines elided ↑ open up ↑
  14   14   * file and include the License file at usr/src/OPENSOLARIS.LICENSE.
  15   15   * If applicable, add the following below this CDDL HEADER, with the
  16   16   * fields enclosed by brackets "[]" replaced with your own identifying
  17   17   * information: Portions Copyright [yyyy] [name of copyright owner]
  18   18   *
  19   19   * CDDL HEADER END
  20   20   */
  21   21  /*
  22   22   * Copyright 2008 Sun Microsystems, Inc.  All rights reserved.
  23   23   * Use is subject to license terms.
       24 + * Copyright 2014 Joyent, Inc.  All rights reserved.
  24   25   */
  25   26  
  26   27  #ifndef _SYS_VM_USAGE_H
  27   28  #define _SYS_VM_USAGE_H
  28   29  
  29   30  #include <sys/types.h>
  30   31  
  31   32  #ifdef  __cplusplus
  32   33  extern "C" {
  33   34  #endif
↓ open down ↓ 38 lines elided ↑ open up ↑
  72   73  #define VMUSAGE_ALL_EUSERS      0x400   /* same as VMUSAGE_ALL_RUSERS, but by */
  73   74                                          /* euser */
  74   75  
  75   76  #define VMUSAGE_COL_PROJECTS    0x800   /* rss/swap for all projects in */
  76   77                                          /* all zones.  Collapse zoneid. */
  77   78  #define VMUSAGE_COL_RUSERS      0x1000  /* rss/swap for all users (by process */
  78   79                                          /* ruser), in all zones.  Collapse */
  79   80                                          /* zoneid */
  80   81  #define VMUSAGE_COL_EUSERS      0x2000  /* same as VMUSAGE_COL_RUSERS, but by */
  81   82                                          /* euser */
       83 +#define VMUSAGE_A_ZONE          0x4000  /* rss/swap for a specified zone */
  82   84  
  83      -#define VMUSAGE_MASK            0x3fff  /* all valid flags for getvmusage() */
       85 +#define VMUSAGE_MASK            0x7fff  /* all valid flags for getvmusage() */
  84   86  
  85   87  typedef struct vmusage {
  86   88          id_t    vmu_zoneid;             /* zoneid, or ALL_ZONES for */
  87   89                                          /* VMUSAGE_COL_* results */
  88   90                                          /* ALL_ZONES means that the result */
  89   91                                          /* reflects swap and rss usage for */
  90   92                                          /* a projid/uid across all zones */
  91   93          uint_t  vmu_type;               /* Entity type of result.  One of:  */
  92   94                                          /* VMUSAGE_(SYSTEM|ZONE|PROJECTS| */
  93   95                                          /* TASKS|RUSERS|EUSERS) */
↓ open down ↓ 7 lines elided ↑ open up ↑
 101  103          size_t  vmu_swap_shared;        /* swap reserved for shared mappings */
 102  104  
 103  105  } vmusage_t;
 104  106  
 105  107  extern int getvmusage(uint_t flags, time_t age, vmusage_t *buf, size_t *nres);
 106  108  
 107  109  #ifdef  _KERNEL
 108  110  
 109  111  int vm_getusage(uint_t, time_t, vmusage_t *, size_t *, int);
 110  112  void vm_usage_init();
      113 +int vm_map_inval(pid_t, caddr_t, size_t);
 111  114  
 112  115  #endif  /* _KERNEL */
 113  116  
 114  117  #ifdef  __cplusplus
 115  118  }
 116  119  #endif
 117  120  
 118  121  #endif  /* _SYS_VM_USAGE_H */
    
XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX