Print this page
XXXX pass in cpu_pause_func via pause_cpus

Split Close
Expand all
Collapse all
          --- old/usr/src/uts/common/disp/cmt.c
          +++ new/usr/src/uts/common/disp/cmt.c
↓ open down ↓ 347 lines elided ↑ open up ↑
 348  348                   */
 349  349                  return;
 350  350          }
 351  351  
 352  352          ASSERT(PG_NUM_CPUS((pg_t *)pg) >= PG_NUM_CPUS((pg_t *)parent));
 353  353  
 354  354          /*
 355  355           * We're changing around the hierarchy, which is actively traversed
 356  356           * by the dispatcher. Pause CPUS to ensure exclusivity.
 357  357           */
 358      -        pause_cpus(NULL);
      358 +        pause_cpus(NULL, NULL);
 359  359  
 360  360          /*
 361  361           * If necessary, update the parent's sibling set, replacing parent
 362  362           * with PG.
 363  363           */
 364  364          if (parent->cmt_siblings) {
 365  365                  if (group_remove(parent->cmt_siblings, parent, GRP_NORESIZE)
 366  366                      != -1) {
 367  367                          r = group_add(parent->cmt_siblings, pg, GRP_NORESIZE);
 368  368                          ASSERT(r != -1);
↓ open down ↓ 1179 lines elided ↑ open up ↑
1548 1548                                      GROUP_SIZE(&cmt_root->cl_pgs) + cap_needed);
1549 1549                                  cmt_root->cl_npgs += cap_needed;
1550 1550                          }
1551 1551                  }
1552 1552          }
1553 1553  
1554 1554          /*
1555 1555           * We're operating on the PG hierarchy. Pause CPUs to ensure
1556 1556           * exclusivity with respect to the dispatcher.
1557 1557           */
1558      -        pause_cpus(NULL);
     1558 +        pause_cpus(NULL, NULL);
1559 1559  
1560 1560          /*
1561 1561           * Prune all PG instances of the hardware sharing relationship
1562 1562           * represented by pg.
1563 1563           */
1564 1564          group_iter_init(&hw_iter);
1565 1565          while ((pg = group_iterate(hwset, &hw_iter)) != NULL) {
1566 1566  
1567 1567                  /*
1568 1568                   * Remove PG from it's group of siblings, if it's there.
↓ open down ↓ 99 lines elided ↑ open up ↑
1668 1668  /*
1669 1669   * Disable CMT scheduling
1670 1670   */
1671 1671  static void
1672 1672  pg_cmt_disable(void)
1673 1673  {
1674 1674          cpu_t           *cpu;
1675 1675  
1676 1676          ASSERT(MUTEX_HELD(&cpu_lock));
1677 1677  
1678      -        pause_cpus(NULL);
     1678 +        pause_cpus(NULL, NULL);
1679 1679          cpu = cpu_list;
1680 1680  
1681 1681          do {
1682 1682                  if (cpu->cpu_pg)
1683 1683                          group_empty(&cpu->cpu_pg->cmt_pgs);
1684 1684          } while ((cpu = cpu->cpu_next) != cpu_list);
1685 1685  
1686 1686          cmt_sched_disabled = 1;
1687 1687          start_cpus();
1688 1688          cmn_err(CE_NOTE, "!CMT thread placement optimizations unavailable");
↓ open down ↓ 277 lines elided ↑ open up ↑
XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX