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