sched_4bsd.c (177085) | sched_4bsd.c (177091) |
---|---|
1/*- 2 * Copyright (c) 1982, 1986, 1990, 1991, 1993 3 * The Regents of the University of California. All rights reserved. 4 * (c) UNIX System Laboratories, Inc. 5 * All or some portions of this file are derived from material licensed 6 * to the University of California by American Telephone and Telegraph 7 * Co. or Unix System Laboratories, Inc. and are reproduced herein with 8 * the permission of UNIX System Laboratories, Inc. --- 19 unchanged lines hidden (view full) --- 28 * OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) 29 * HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT 30 * LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY 31 * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF 32 * SUCH DAMAGE. 33 */ 34 35#include <sys/cdefs.h> | 1/*- 2 * Copyright (c) 1982, 1986, 1990, 1991, 1993 3 * The Regents of the University of California. All rights reserved. 4 * (c) UNIX System Laboratories, Inc. 5 * All or some portions of this file are derived from material licensed 6 * to the University of California by American Telephone and Telegraph 7 * Co. or Unix System Laboratories, Inc. and are reproduced herein with 8 * the permission of UNIX System Laboratories, Inc. --- 19 unchanged lines hidden (view full) --- 28 * OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) 29 * HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT 30 * LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY 31 * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF 32 * SUCH DAMAGE. 33 */ 34 35#include <sys/cdefs.h> |
36__FBSDID("$FreeBSD: head/sys/kern/sched_4bsd.c 177085 2008-03-12 06:31:06Z jeff $"); | 36__FBSDID("$FreeBSD: head/sys/kern/sched_4bsd.c 177091 2008-03-12 10:12:01Z jeff $"); |
37 38#include "opt_hwpmc_hooks.h" 39 40#include <sys/param.h> 41#include <sys/systm.h> 42#include <sys/cpuset.h> 43#include <sys/kernel.h> 44#include <sys/ktr.h> --- 333 unchanged lines hidden (view full) --- 378 /* Do not clear TSF_DIDRUN */ 379 } else if (ts->ts_flags & TSF_DIDRUN) { 380 awake = 1; 381 ts->ts_flags &= ~TSF_DIDRUN; 382 } 383 384 /* 385 * ts_pctcpu is only for ps and ttyinfo(). | 37 38#include "opt_hwpmc_hooks.h" 39 40#include <sys/param.h> 41#include <sys/systm.h> 42#include <sys/cpuset.h> 43#include <sys/kernel.h> 44#include <sys/ktr.h> --- 333 unchanged lines hidden (view full) --- 378 /* Do not clear TSF_DIDRUN */ 379 } else if (ts->ts_flags & TSF_DIDRUN) { 380 awake = 1; 381 ts->ts_flags &= ~TSF_DIDRUN; 382 } 383 384 /* 385 * ts_pctcpu is only for ps and ttyinfo(). |
386 * Do it per td_sched, and add them up at the end? 387 * XXXKSE | |
388 */ 389 ts->ts_pctcpu = (ts->ts_pctcpu * ccpu) >> FSHIFT; 390 /* 391 * If the td_sched has been idle the entire second, 392 * stop recalculating its priority until 393 * it wakes up. 394 */ 395 if (ts->ts_cpticks != 0) { --- 1034 unchanged lines hidden --- | 386 */ 387 ts->ts_pctcpu = (ts->ts_pctcpu * ccpu) >> FSHIFT; 388 /* 389 * If the td_sched has been idle the entire second, 390 * stop recalculating its priority until 391 * it wakes up. 392 */ 393 if (ts->ts_cpticks != 0) { --- 1034 unchanged lines hidden --- |