Print this page
XXX Rearchitect and replace interrupt distribution

Split Close
Expand all
Collapse all
          --- old/usr/src/uts/common/os/main.c
          +++ new/usr/src/uts/common/os/main.c
↓ open down ↓ 79 lines elided ↑ open up ↑
  80   80  #include <sys/dc_ki.h>
  81   81  
  82   82  #include <c2/audit.h>
  83   83  #include <sys/bootprops.h>
  84   84  
  85   85  /* well known processes */
  86   86  proc_t *proc_sched;             /* memory scheduler */
  87   87  proc_t *proc_init;              /* init */
  88   88  proc_t *proc_pageout;           /* pageout daemon */
  89   89  proc_t *proc_fsflush;           /* fsflush daemon */
       90 +proc_t *proc_intrd;             /* interrupt daemon */
  90   91  
  91   92  pgcnt_t maxmem;         /* Maximum available memory in pages.   */
  92   93  pgcnt_t freemem;        /* Current available memory in pages.   */
  93   94  int     interrupts_unleashed;   /* set when we do the first spl0() */
  94   95  
  95   96  kmem_cache_t *process_cache;    /* kmem cache for proc structures */
  96   97  
  97   98  /*
  98   99   * Indicates whether the auditing module (c2audit) is loaded. Possible
  99  100   * values are:
↓ open down ↓ 256 lines elided ↑ open up ↑
 356  357          lwp_rtt();
 357  358  }
 358  359  
 359  360  void
 360  361  main(void)
 361  362  {
 362  363          proc_t          *p = ttoproc(curthread);        /* &p0 */
 363  364          int             (**initptr)();
 364  365          extern void     sched();
 365  366          extern void     fsflush();
      367 +        extern void     interrupt_balancer();
 366  368          extern int      (*init_tbl[])();
 367  369          extern int      (*mp_init_tbl[])();
 368  370          extern id_t     syscid, defaultcid;
 369  371          extern int      swaploaded;
 370  372          extern int      netboot;
 371  373          extern ib_boot_prop_t *iscsiboot_prop;
 372  374          extern void     vm_init(void);
 373  375          extern void     cbe_init_pre(void);
 374  376          extern void     cbe_init(void);
 375  377          extern void     clock_tick_init_pre(void);
↓ open down ↓ 239 lines elided ↑ open up ↑
 615  617          /* create pageout daemon */
 616  618          if (newproc(pageout, NULL, syscid, maxclsyspri - 1, NULL,
 617  619              FAMOUS_PID_PAGEOUT))
 618  620                  panic("main: unable to fork pageout()");
 619  621  
 620  622          /* create fsflush daemon */
 621  623          if (newproc(fsflush, NULL, syscid, minclsyspri, NULL,
 622  624              FAMOUS_PID_FSFLUSH))
 623  625                  panic("main: unable to fork fsflush()");
 624  626  
      627 +        /* create interrupt balancer process */
      628 +        if (newproc(interrupt_balancer, NULL, syscid, minclsyspri, NULL, 0))
      629 +                panic("main: unable to fork interrupt_balancer()");
      630 +
 625  631          /* create cluster process if we're a member of one */
 626  632          if (cluster_bootflags & CLUSTER_BOOTED) {
 627  633                  if (newproc(cluster_wrapper, NULL, syscid, minclsyspri,
 628  634                      NULL, 0)) {
 629  635                          panic("main: unable to fork cluster()");
 630  636                  }
 631  637          }
 632  638  
 633  639          /*
 634  640           * Create system threads (threads are associated with p0)
↓ open down ↓ 20 lines elided ↑ open up ↑
XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX