summaryrefslogtreecommitdiffstats
path: root/sys/sys/sched.h
diff options
context:
space:
mode:
authorjeff <jeff@FreeBSD.org>2008-03-12 06:31:06 +0000
committerjeff <jeff@FreeBSD.org>2008-03-12 06:31:06 +0000
commit3b1acbdce295a5ace27e22dba0ae318570aea5bf (patch)
tree20ec4b3ab190fc07828f6c3f536e039ecdead59a /sys/sys/sched.h
parentce12a09ced75026eed87f8a2a64d05ba98bb98d3 (diff)
downloadFreeBSD-src-3b1acbdce295a5ace27e22dba0ae318570aea5bf.zip
FreeBSD-src-3b1acbdce295a5ace27e22dba0ae318570aea5bf.tar.gz
- Pass the priority argument from *sleep() into sleepq and down into
sched_sleep(). This removes extra thread_lock() acquisition and allows the scheduler to decide what to do with the static boost. - Change the priority arguments to cv_* to match sleepq/msleep/etc. where 0 means no priority change. Catch -1 in cv_broadcastpri() and convert it to 0 for now. - Set a flag when sleeping in a way that is compatible with swapping since direct priority comparisons are meaningless now. - Add a sysctl to ule, kern.sched.static_boost, that defaults to on which controls the boost behavior. Turning it off gives better performance in some workloads but needs more investigation. - While we're modifying sleepq, change signal and broadcast to both return with the lock held as the lock was held on enter. Reviewed by: jhb, peter
Diffstat (limited to 'sys/sys/sched.h')
-rw-r--r--sys/sys/sched.h2
1 files changed, 1 insertions, 1 deletions
diff --git a/sys/sys/sched.h b/sys/sys/sched.h
index 57eebd9..ca7bfc9 100644
--- a/sys/sys/sched.h
+++ b/sys/sys/sched.h
@@ -100,7 +100,7 @@ void sched_lend_prio(struct thread *td, u_char prio);
void sched_lend_user_prio(struct thread *td, u_char pri);
fixpt_t sched_pctcpu(struct thread *td);
void sched_prio(struct thread *td, u_char prio);
-void sched_sleep(struct thread *td);
+void sched_sleep(struct thread *td, int prio);
void sched_switch(struct thread *td, struct thread *newtd, int flags);
void sched_throw(struct thread *td);
void sched_unlend_prio(struct thread *td, u_char prio);
OpenPOWER on IntegriCloud