- Clean up comments to reflect the KSE pushout.

- Add the following functions to the api: sched_bind(), sched_unbind(),
   sched_pin(), and sched_unpin().  Bind/unbind are used for traditional
   cpu binding.  Pin and unpin are meant to allow the kernel to hold a thread
   on a particular cpu so that it may cache per-cpu data without fear of
   being migrated.
This commit is contained in:
Jeff Roberson 2003-11-04 07:18:18 +00:00
parent d62e006473
commit 09c01e4542
Notes: svn2git 2020-12-20 02:59:44 +00:00
svn path=/head/; revision=122036

View File

@ -51,11 +51,12 @@ void sched_fork_ksegrp(struct ksegrp *kg, struct ksegrp *child);
void sched_nice(struct ksegrp *kg, int nice);
/*
* Threads are switched in and out, block on resources, and have temporary
* priorities inherited from their ksegs.
* Threads are switched in and out, block on resources, have temporary
* priorities inherited from their ksegs, and use up cpu time.
*/
void sched_exit_thread(struct thread *td, struct thread *child);
void sched_fork_thread(struct thread *td, struct thread *child);
fixpt_t sched_pctcpu(struct thread *td);
void sched_prio(struct thread *td, u_char prio);
void sched_sleep(struct thread *td, u_char prio);
void sched_switch(struct thread *td);
@ -63,19 +64,27 @@ void sched_userret(struct thread *td);
void sched_wakeup(struct thread *td);
/*
* KSEs are moved on and off of run queues.
* Threads are moved on and off of run queues
*/
void sched_add(struct thread *td);
struct kse *sched_choose(void);
struct kse *sched_choose(void); /* XXX Should be thread * */
void sched_clock(struct thread *td);
void sched_exit_kse(struct kse *ke, struct kse *child);
void sched_fork_kse(struct kse *ke, struct kse *child);
void sched_rem(struct thread *td);
/*
* and they use up cpu time.
* Binding makes cpu affinity permanent while pinning is used to temporarily
* hold a thread on a particular CPU.
*/
fixpt_t sched_pctcpu(struct thread *td);
void sched_bind(struct thread *td, int cpu);
void sched_pin(struct thread *td);
void sched_unbind(struct thread *td);
void sched_unpin(struct thread *td);
/*
* These interfaces will eventually be removed.
*/
void sched_exit_kse(struct kse *ke, struct kse *child);
void sched_fork_kse(struct kse *ke, struct kse *child);
/*
* These procedures tell the process data structure allocation code how