#
b90816f1 |
| 08-Jun-2003 |
Jeff Roberson <jeff@FreeBSD.org> |
- When a new thread is added to a kseq the load is incremented prior to adding it to the nice tables. Therefore, in kseq_add_nice, we should keep in mind that the load will be 1 if we are the
- When a new thread is added to a kseq the load is incremented prior to adding it to the nice tables. Therefore, in kseq_add_nice, we should keep in mind that the load will be 1 if we are the only thread, and not 0. - Assert that the sched lock is held in all the appropriate places. - Increase the scope of the sched lock in sched_pctcpu_update(). - Hold the sched lock in sched_runnable(). It is not held by the caller.
show more ...
|
Revision tags: release/5.1.0_cvs, release/5.1.0 |
|
#
43fdafb1 |
| 02-May-2003 |
Julian Elischer <julian@FreeBSD.org> |
Fix typo in last commit
|
#
b1ac98d8 |
| 02-May-2003 |
Julian Elischer <julian@FreeBSD.org> |
Move the flag that indicates an idle thread from the KSE to the thread. It was always referenced via the thread anyhow.
Reviewed by: jhb (a LOOOOONG time ago)
|
#
2056d0a1 |
| 23-Apr-2003 |
John Baldwin <jhb@FreeBSD.org> |
Add lock assertions for various proc/thread/kse/ksegroup fields to the scheduler functions.
|
#
0b5318c8 |
| 22-Apr-2003 |
John Baldwin <jhb@FreeBSD.org> |
- Assert that the proc lock and sched_lock are held in sched_nice(). - For the 4BSD scheduler, this means that all callers of the static function resetpriority() now always hold sched_lock, so don'
- Assert that the proc lock and sched_lock are held in sched_nice(). - For the 4BSD scheduler, this means that all callers of the static function resetpriority() now always hold sched_lock, so don't lock sched_lock explicitly in that function.
show more ...
|
#
828e7683 |
| 22-Apr-2003 |
John Baldwin <jhb@FreeBSD.org> |
Protect p_swtime with the sched_lock.
|
#
7cd650a9 |
| 18-Apr-2003 |
Jeff Roberson <jeff@FreeBSD.org> |
- Set the ke_cpu field in sched_add() for interrupt and realtime threads since they are going on the current cpu and not their previously assigned cpu. - sched_runnable() should only return tr
- Set the ke_cpu field in sched_add() for interrupt and realtime threads since they are going on the current cpu and not their previously assigned cpu. - sched_runnable() should only return true in the SMP case if the other processor has more than one thread that is runnable. We can not steal curthread. - Change kseq_print() to accept the cpuid instead of a kseq pointer. This makes use of this function in ddb much easier.
show more ...
|
#
a5f099d0 |
| 13-Apr-2003 |
Jeff Roberson <jeff@FreeBSD.org> |
- Unbreak priority prop. for timeshare threads. Always place something on the current queue if its priority is really elevated. This needs more work as there are cases where a next queue kse
- Unbreak priority prop. for timeshare threads. Always place something on the current queue if its priority is really elevated. This needs more work as there are cases where a next queue kse could be holding up what would be a curr queue kse, and thus hurting interactivity. Also, when a thread with an elevated priority has its priority lowered it should be placed back on the next queue.
show more ...
|
#
9bca28a7 |
| 12-Apr-2003 |
Jeff Roberson <jeff@FreeBSD.org> |
- Clean up some debug code left over from my earlier megacommit.
|
#
b5c4c4a7 |
| 12-Apr-2003 |
Jeff Roberson <jeff@FreeBSD.org> |
- We only care about the base priority. Ignore the SCHED_FIFO_BIT so that we dont get confused.
Reported and debugged by: Steve Kargl <sgk@troutmask.apl.washington.edu>
|
#
141ad61c |
| 11-Apr-2003 |
Jeff Roberson <jeff@FreeBSD.org> |
- Add sched_exit_* - Call sched_exit_kse() from sched_exit() instead of implementing it here.
|
#
58177de2 |
| 11-Apr-2003 |
Jeff Roberson <jeff@FreeBSD.org> |
- Only select kseqs with more than one kse to steal. The running kse is reflected in the load now and you can't very well migrate that.
|
#
c36ccfa2 |
| 11-Apr-2003 |
Jeff Roberson <jeff@FreeBSD.org> |
- When migrating a kse from one kseq to the next actually insert it onto the second kseq's run queue so that it is referenced by the kse when it is switched out. - Spell ksq_rslices properly.
- When migrating a kse from one kseq to the next actually insert it onto the second kseq's run queue so that it is referenced by the kse when it is switched out. - Spell ksq_rslices properly.
Reported by: Ian Freislich <ianf@za.uu.net>
show more ...
|
#
15dc847e |
| 11-Apr-2003 |
Jeff Roberson <jeff@FreeBSD.org> |
- Add a SYSCTL node for the ule scheduler. - Allow user adjustable min and max time slices (suggested by hiten). - Change the SLP_RUN_MAX to 100ms from 2 seconds so that we learn whether a proce
- Add a SYSCTL node for the ule scheduler. - Allow user adjustable min and max time slices (suggested by hiten). - Change the SLP_RUN_MAX to 100ms from 2 seconds so that we learn whether a process is interactive or not much more quickly. - Place a process on the current run queue if it is interactive or if it is running at an interrupt thread priority due to priority prop. - Use the 'current' timeshare queue for interrupt threads, realtime threads, and idle threads that are running at higher priority due to priority prop. This fixes problems where priorities would have been elevated but we would not check the timeshare run queue until other lower priority tasks were no longer runnable. - Keep an array of loads indexed by the priority class as well as a global load. - Keep an bucket of nice values with a count of the number of kses currently runnable with that nice value. - Keep track of the minimum nice value of any running thread. - Remove the unused short term sleep accounting. I was attempting to use this for load balancing but it didn't work out. - Define a kseq_print() for use with debugging. - Add KTR debugging at useful places so we can easily debug slice and priority assignment. - Decouple the runq assignment from the kseq assignment. kseq_add now keeps track of statistics. This is done so that the nice and load is still tracked for the currently running process. Previously if a niced process was added while a non nice process was running the niced process would still get a slice since it was not aware of the unnice process. - Make adjustments for the sched api changes.
show more ...
|
#
060563ec |
| 10-Apr-2003 |
Julian Elischer <julian@FreeBSD.org> |
Move the _oncpu entry from the KSE to the thread. The entry in the KSE still exists but it's purpose will change a bit when we add the ability to lock a KSE to a cpu.
|
Revision tags: release/4.8.0_cvs, release/4.8.0 |
|
#
a8949de2 |
| 03-Apr-2003 |
Jeff Roberson <jeff@FreeBSD.org> |
- Keep seperate statistics and run queues for different scheduling classes. - Treat each class specially in kseq_{choose,add,rem}. Let the rest of the code be less aware of scheduling classes.
- Keep seperate statistics and run queues for different scheduling classes. - Treat each class specially in kseq_{choose,add,rem}. Let the rest of the code be less aware of scheduling classes. - Skip the interactivity calculation for non TIMESHARE ksegrps. - Move slice and runq selection into kseq_add(). Uninline it now that it's big.
show more ...
|
#
5053d272 |
| 02-Apr-2003 |
Jeff Roberson <jeff@FreeBSD.org> |
- Make the interactivity calculator decay faster. - Make the pcpu estimator update faster.
|
#
98c9b132 |
| 02-Apr-2003 |
Jeff Roberson <jeff@FreeBSD.org> |
- I meant divide by two and not shift by two in SCHED_PRI_NHALF.
|
#
245f3abf |
| 02-Apr-2003 |
Jeff Roberson <jeff@FreeBSD.org> |
- Add in support for KSEs with 0 slice values on the run queue. If we try to select a KSE with a slice of 0 we will update its slice and insert it onto the next queue. - Pass the KSE instead
- Add in support for KSEs with 0 slice values on the run queue. If we try to select a KSE with a slice of 0 we will update its slice and insert it onto the next queue. - Pass the KSE instead of the ksegrp into sched_slice(). This more accurately reflects the behavior of the code. Slices are granted to kses. - Add a function kseq_nice_min() which finds the smallest nice value assigned to the kseg of any KSE on the queue. - Rewrite the logic in sched_slice(). Add a large comment describing the new slice selection scheme. To summarize, slices are assigned based on the nice value. Priorities are still calculated based on the nice and interactivity of a process. Slice sizes of 0 may be granted for KSEs whos nice is 20 or futher away from the lowest nice on the run queue. Other nice values are scaled across the range [min, min+20]. This fixes ULEs bad behavior with positively niced processes.
show more ...
|
#
e1f89c22 |
| 04-Mar-2003 |
Jeff Roberson <jeff@FreeBSD.org> |
- Create a function sched_interact_score() which decides on the interactivity of a kseg and assigns it a value of 0 through 100. - Use sched_interact_score() to determine the dynamic priority. -
- Create a function sched_interact_score() which decides on the interactivity of a kseg and assigns it a value of 0 through 100. - Use sched_interact_score() to determine the dynamic priority. - Define SCHED_CURR() in terms of sched_interact_score(). - Adjust the maximum slice back down to 100ms. - Remove redundant clearing of ke_runq in sched_wakeup() - Clean up #defines and comment them.
show more ...
|
#
65c8760d |
| 03-Mar-2003 |
Jeff Roberson <jeff@FreeBSD.org> |
- Shift the tick count by 10 and back around sched_pctcpu_update() calculations. Keep this changes local to the function so the tick count is in its natural form otherwise. Previously 1000 wa
- Shift the tick count by 10 and back around sched_pctcpu_update() calculations. Keep this changes local to the function so the tick count is in its natural form otherwise. Previously 1000 was added each time a tick fired and we divided by 1000 when it was reported. This is done to reduce rounding errors.
show more ...
|
#
a6ed4186 |
| 03-Mar-2003 |
Jeff Roberson <jeff@FreeBSD.org> |
- In sched_add() special case PRI_TIMESHARE and PRI_ITHD|PRI_REALTIME. We always place ITHD & REALTIME threads on the current queue of the current cpu. Prior to this change an interrupt threa
- In sched_add() special case PRI_TIMESHARE and PRI_ITHD|PRI_REALTIME. We always place ITHD & REALTIME threads on the current queue of the current cpu. Prior to this change an interrupt thread would only ever run on one cpu.
show more ...
|
#
f1e8dc4a |
| 03-Mar-2003 |
Jeff Roberson <jeff@FreeBSD.org> |
- Refrain from setting the td_priority in sched_wakeup(). It will be reset before we return to user space.
|
#
ac2e4153 |
| 27-Feb-2003 |
Julian Elischer <julian@FreeBSD.org> |
Change the process flags P_KSES to be P_THREADED. This is just a cosmetic change but I've been meaning to do it for about a year.
|
#
4a338afd |
| 17-Feb-2003 |
Julian Elischer <julian@FreeBSD.org> |
Move a bunch of flags from the KSE to the thread. I was in two minds as to where to put them in the first case.. I should have listenned to the other mind.
Submitted by: parts by davidxu@ Reviewed
Move a bunch of flags from the KSE to the thread. I was in two minds as to where to put them in the first case.. I should have listenned to the other mind.
Submitted by: parts by davidxu@ Reviewed by: jeff@ mini@
show more ...
|