Print this page
6583 remove whole-process swapping

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