sched_ule.c (177253) | sched_ule.c (177368) |
---|---|
1/*- 2 * Copyright (c) 2002-2007, Jeffrey Roberson <jeff@freebsd.org> 3 * All rights reserved. 4 * 5 * Redistribution and use in source and binary forms, with or without 6 * modification, are permitted provided that the following conditions 7 * are met: 8 * 1. Redistributions of source code must retain the above copyright --- 22 unchanged lines hidden (view full) --- 31 * 32 * etymology: 33 * ULE is the last three letters in schedule. It owes its name to a 34 * generic user created for a scheduling system by Paul Mikesell at 35 * Isilon Systems and a general lack of creativity on the part of the author. 36 */ 37 38#include <sys/cdefs.h> | 1/*- 2 * Copyright (c) 2002-2007, Jeffrey Roberson <jeff@freebsd.org> 3 * All rights reserved. 4 * 5 * Redistribution and use in source and binary forms, with or without 6 * modification, are permitted provided that the following conditions 7 * are met: 8 * 1. Redistributions of source code must retain the above copyright --- 22 unchanged lines hidden (view full) --- 31 * 32 * etymology: 33 * ULE is the last three letters in schedule. It owes its name to a 34 * generic user created for a scheduling system by Paul Mikesell at 35 * Isilon Systems and a general lack of creativity on the part of the author. 36 */ 37 38#include <sys/cdefs.h> |
39__FBSDID("$FreeBSD: head/sys/kern/sched_ule.c 177253 2008-03-16 10:58:09Z rwatson $"); | 39__FBSDID("$FreeBSD: head/sys/kern/sched_ule.c 177368 2008-03-19 06:19:01Z jeff $"); |
40 41#include "opt_hwpmc_hooks.h" 42#include "opt_sched.h" 43 44#include <sys/param.h> 45#include <sys/systm.h> 46#include <sys/kdb.h> 47#include <sys/kernel.h> --- 1790 unchanged lines hidden (view full) --- 1838 * Adjust thread priorities as a result of a nice request. 1839 */ 1840void 1841sched_nice(struct proc *p, int nice) 1842{ 1843 struct thread *td; 1844 1845 PROC_LOCK_ASSERT(p, MA_OWNED); | 40 41#include "opt_hwpmc_hooks.h" 42#include "opt_sched.h" 43 44#include <sys/param.h> 45#include <sys/systm.h> 46#include <sys/kdb.h> 47#include <sys/kernel.h> --- 1790 unchanged lines hidden (view full) --- 1838 * Adjust thread priorities as a result of a nice request. 1839 */ 1840void 1841sched_nice(struct proc *p, int nice) 1842{ 1843 struct thread *td; 1844 1845 PROC_LOCK_ASSERT(p, MA_OWNED); |
1846 PROC_SLOCK_ASSERT(p, MA_OWNED); | |
1847 1848 p->p_nice = nice; 1849 FOREACH_THREAD_IN_PROC(p, td) { 1850 thread_lock(td); 1851 sched_priority(td); 1852 sched_prio(td, td->td_base_user_pri); 1853 thread_unlock(td); 1854 } --- 136 unchanged lines hidden (view full) --- 1991void 1992sched_exit(struct proc *p, struct thread *child) 1993{ 1994 struct thread *td; 1995 1996 CTR3(KTR_SCHED, "sched_exit: %p(%s) prio %d", 1997 child, child->td_name, child->td_priority); 1998 | 1846 1847 p->p_nice = nice; 1848 FOREACH_THREAD_IN_PROC(p, td) { 1849 thread_lock(td); 1850 sched_priority(td); 1851 sched_prio(td, td->td_base_user_pri); 1852 thread_unlock(td); 1853 } --- 136 unchanged lines hidden (view full) --- 1990void 1991sched_exit(struct proc *p, struct thread *child) 1992{ 1993 struct thread *td; 1994 1995 CTR3(KTR_SCHED, "sched_exit: %p(%s) prio %d", 1996 child, child->td_name, child->td_priority); 1997 |
1999 PROC_SLOCK_ASSERT(p, MA_OWNED); | 1998 PROC_LOCK_ASSERT(p, MA_OWNED); |
2000 td = FIRST_THREAD_IN_PROC(p); 2001 sched_exit_thread(td, child); 2002} 2003 2004/* 2005 * Penalize another thread for the time spent on this one. This helps to 2006 * worsen the priority and interactivity of processes which schedule batch 2007 * jobs such as make. This has little effect on the make process itself but --- 573 unchanged lines hidden --- | 1999 td = FIRST_THREAD_IN_PROC(p); 2000 sched_exit_thread(td, child); 2001} 2002 2003/* 2004 * Penalize another thread for the time spent on this one. This helps to 2005 * worsen the priority and interactivity of processes which schedule batch 2006 * jobs such as make. This has little effect on the make process itself but --- 573 unchanged lines hidden --- |