Print this page
2831 svc.startd and svc.configd waste memory.

Split Close
Expand all
Collapse all
          --- old/usr/src/cmd/svc/configd/configd.c
          +++ new/usr/src/cmd/svc/configd/configd.c
↓ 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 2008 Sun Microsystems, Inc.  All rights reserved.
  23   23   * Use is subject to license terms.
  24   24   */
  25   25  
  26      -#pragma ident   "%Z%%M% %I%     %E% SMI"
       26 +/*
       27 + * Copyright (c) 2012, Joyent, Inc. All rights reserved.
       28 + */
  27   29  
  28   30  #include <assert.h>
  29   31  #include <door.h>
  30   32  #include <errno.h>
  31   33  #include <fcntl.h>
  32   34  #include <limits.h>
  33   35  #include <priv.h>
  34   36  #include <procfs.h>
  35   37  #include <pthread.h>
  36   38  #include <signal.h>
↓ open down ↓ 65 lines elided ↑ open up ↑
 102  104  static priv_set_t *privileged_privs;
 103  105  
 104  106  static int      log_to_syslog = 0;
 105  107  
 106  108  int             is_main_repository = 1;
 107  109  
 108  110  int             max_repository_backups = 4;
 109  111  
 110  112  #define CONFIGD_MAX_FDS         262144
 111  113  
      114 +const char *
      115 +_umem_options_init(void)
      116 +{
      117 +        /*
      118 +         * Like svc.startd, we set our UMEM_OPTIONS to indicate that we do not
      119 +         * wish to have per-CPU magazines to reduce our memory footprint.  And
      120 +         * as with svc.startd, if svc.configd is so MT-hot that this becomes a
      121 +         * scalability problem, there are deeper issues...
      122 +         */
      123 +        return ("nomagazines");         /* UMEM_OPTIONS setting */
      124 +}
      125 +
 112  126  /*
 113  127   * Thanks, Mike
 114  128   */
 115  129  void
 116  130  abort_handler(int sig, siginfo_t *sip, ucontext_t *ucp)
 117  131  {
 118  132          struct sigaction act;
 119  133  
 120  134          (void) sigemptyset(&act.sa_mask);
 121  135          act.sa_handler = SIG_DFL;
↓ open down ↓ 650 lines elided ↑ open up ↑
XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX