Print this page
patch clock-wakeup-remove

Split Close
Expand all
Collapse all
          --- old/usr/src/uts/common/os/clock.c
          +++ new/usr/src/uts/common/os/clock.c
↓ open down ↓ 893 lines elided ↑ open up ↑
 894  894                                  avenrun[i] = (int32_t)(hp_avenrun[i] >>
 895  895                                      (16 - FSHIFT));
 896  896                          else
 897  897                                  avenrun[i] = 0x7fffffff;
 898  898  
 899  899                  cpupart = cp_list_head;
 900  900                  do {
 901  901                          calcloadavg(genloadavg(&cpupart->cp_loadavg),
 902  902                              cpupart->cp_hp_avenrun);
 903  903                  } while ((cpupart = cpupart->cp_next) != cp_list_head);
 904      -
 905      -                /*
 906      -                 * Wake up the swapper thread if necessary.
 907      -                 */
 908      -                if (runin ||
 909      -                    (runout && (avefree < desfree || wake_sched_sec))) {
 910      -                        t = &t0;
 911      -                        thread_lock(t);
 912      -                        if (t->t_state == TS_STOPPED) {
 913      -                                runin = runout = 0;
 914      -                                wake_sched_sec = 0;
 915      -                                t->t_whystop = 0;
 916      -                                t->t_whatstop = 0;
 917      -                                t->t_schedflag &= ~TS_ALLSTART;
 918      -                                THREAD_TRANSITION(t);
 919      -                                setfrontdq(t);
 920      -                        }
 921      -                        thread_unlock(t);
 922      -                }
 923      -        }
 924      -
 925      -        /*
 926      -         * Wake up the swapper if any high priority swapped-out threads
 927      -         * became runable during the last tick.
 928      -         */
 929      -        if (wake_sched) {
 930      -                t = &t0;
 931      -                thread_lock(t);
 932      -                if (t->t_state == TS_STOPPED) {
 933      -                        runin = runout = 0;
 934      -                        wake_sched = 0;
 935      -                        t->t_whystop = 0;
 936      -                        t->t_whatstop = 0;
 937      -                        t->t_schedflag &= ~TS_ALLSTART;
 938      -                        THREAD_TRANSITION(t);
 939      -                        setfrontdq(t);
 940      -                }
 941      -                thread_unlock(t);
 942  904          }
 943  905  }
 944  906  
 945  907  void
 946  908  clock_init(void)
 947  909  {
 948  910          cyc_handler_t clk_hdlr, lbolt_hdlr;
 949  911          cyc_time_t clk_when, lbolt_when;
 950  912          int i, sz;
 951  913          intptr_t buf;
↓ open down ↓ 1709 lines elided ↑ open up ↑
XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX