Print this page
Add boot_hrtime to global and zone kstats.

Split Close
Expand all
Collapse all
          --- old/usr/src/uts/common/sys/zone.h
          +++ new/usr/src/uts/common/sys/zone.h
↓ open down ↓ 15 lines elided ↑ open up ↑
  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 (c) 2003, 2010, Oracle and/or its affiliates. All rights reserved.
  23   23   * Copyright 2013, Joyent, Inc. All rights reserved.
  24   24   * Copyright 2014 Nexenta Systems, Inc. All rights reserved.
  25   25   * Copyright 2014 Igor Kozhukhov <ikozhukhov@gmail.com>.
       26 + * Copyright 2016 Garrett D'Amore
  26   27   */
  27   28  
  28   29  #ifndef _SYS_ZONE_H
  29   30  #define _SYS_ZONE_H
  30   31  
  31   32  #include <sys/types.h>
  32   33  #include <sys/mutex.h>
  33   34  #include <sys/param.h>
  34   35  #include <sys/rctl.h>
  35   36  #include <sys/ipc_rctl.h>
↓ open down ↓ 356 lines elided ↑ open up ↑
 392  393          kstat_named_t   zm_avenrun15;
 393  394          kstat_named_t   zm_run_ticks;
 394  395          kstat_named_t   zm_run_wait;
 395  396          kstat_named_t   zm_fss_shr_pct;
 396  397          kstat_named_t   zm_fss_pri_hi;
 397  398          kstat_named_t   zm_fss_pri_avg;
 398  399          kstat_named_t   zm_ffcap;
 399  400          kstat_named_t   zm_ffnoproc;
 400  401          kstat_named_t   zm_ffnomem;
 401  402          kstat_named_t   zm_ffmisc;
      403 +        kstat_named_t   zm_boot_hrtime;
 402  404  } zone_misc_kstat_t;
 403  405  
 404  406  typedef struct zone {
 405  407          /*
 406  408           * zone_name is never modified once set.
 407  409           */
 408  410          char            *zone_name;     /* zone's configuration name */
 409  411          /*
 410  412           * zone_nodename and zone_domain are never freed once allocated.
 411  413           */
↓ open down ↓ 97 lines elided ↑ open up ↑
 509  511          struct cred     *zone_kcred;    /* kcred-like, zone-limited cred */
 510  512          /*
 511  513           * zone_pool is protected by pool_lock().
 512  514           */
 513  515          struct pool     *zone_pool;     /* pool the zone is bound to */
 514  516          hrtime_t        zone_pool_mod;  /* last pool bind modification time */
 515  517          /* zone_psetid is protected by cpu_lock */
 516  518          psetid_t        zone_psetid;    /* pset the zone is bound to */
 517  519  
 518  520          time_t          zone_boot_time; /* Similar to boot_time */
      521 +        hrtime_t        zone_boot_hrtime; /* gethrtime() at zone boot */
 519  522  
 520  523          /*
 521  524           * The following two can be read without holding any locks.  They are
 522  525           * updated under cpu_lock.
 523  526           */
 524  527          int             zone_ncpus;  /* zone's idea of ncpus */
 525  528          int             zone_ncpus_online; /* zone's idea of ncpus_online */
 526  529          /*
 527  530           * List of ZFS datasets exported to this zone.
 528  531           */
↓ open down ↓ 317 lines elided ↑ open up ↑
XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX