#
4f506694 |
| 17-Jan-2007 |
Xin LI <delphij@FreeBSD.org> |
Use FOREACH_PROC_IN_SYSTEM instead of using its unrolled form.
|
Revision tags: release/6.2.0_cvs, release/6.2.0 |
|
#
ad1e7d28 |
| 06-Dec-2006 |
Julian Elischer <julian@FreeBSD.org> |
Threading cleanup.. part 2 of several.
Make part of John Birrell's KSE patch permanent.. Specifically, remove: Any reference of the ksegrp structure. This feature was never fully utilised and made t
Threading cleanup.. part 2 of several.
Make part of John Birrell's KSE patch permanent.. Specifically, remove: Any reference of the ksegrp structure. This feature was never fully utilised and made things overly complicated. All code in the scheduler that tried to make threaded programs fair to unthreaded programs. Libpthread processes will already do this to some extent and libthr processes already disable it.
Also: Since this makes such a big change to the scheduler(s), take the opportunity to rename some structures and elements that had to be moved anyhow. This makes the code a lot more readable.
The ULE scheduler compiles again but I have no idea if it works.
The 4bsd scheduler still reqires a little cleaning and some functions that now do ALMOST nothing will go away, but I thought I'd do that as a separate commit.
Tested by David Xu, and Dan Eischen using libthr and libpthread.
show more ...
|
#
fa0d3a32 |
| 20-Nov-2006 |
David Xu <davidxu@FreeBSD.org> |
Use scheduler API sched_user_prio() to adjust thread's userland priority, use td_base_user_prio to get real userland priority since POSIX priority mutex may adjust td_user_pri which is an effective p
Use scheduler API sched_user_prio() to adjust thread's userland priority, use td_base_user_prio to get real userland priority since POSIX priority mutex may adjust td_user_pri which is an effective priority.
show more ...
|
#
acd3428b |
| 06-Nov-2006 |
Robert Watson <rwatson@FreeBSD.org> |
Sweep kernel replacing suser(9) calls with priv(9) calls, assigning specific privilege names to a broad range of privileges. These may require some future tweaking.
Sponsored by: nCircle
Sweep kernel replacing suser(9) calls with priv(9) calls, assigning specific privilege names to a broad range of privileges. These may require some future tweaking.
Sponsored by: nCircle Network Security, Inc. Obtained from: TrustedBSD Project Discussed on: arch@ Reviewed (at least in part) by: mlaier, jmg, pjd, bde, ceri, Alex Lyashkov <umka at sevcity dot net>, Skip Ford <skip dot ford at verizon dot net>, Antoine Brodin <antoine dot brodin at laposte dot net>
show more ...
|
#
8460a577 |
| 26-Oct-2006 |
John Birrell <jb@FreeBSD.org> |
Make KSE a kernel option, turned on by default in all GENERIC kernel configs except sun4v (which doesn't process signals properly with KSE).
Reviewed by: davidxu@
|
#
73fa3e5b |
| 21-Sep-2006 |
David Xu <davidxu@FreeBSD.org> |
Replace system call thr_getscheduler, thr_setscheduler, thr_setschedparam with rtprio_thread, while rtprio system call is for process only, the new system call rtprio_thread is responsible for LWP.
|
#
776fc0e9 |
| 04-Aug-2006 |
Yaroslav Tykhiy <ytykhiy@gmail.com> |
Commit the results of the typo hunt by Darren Pilgrim. This change affects documentation and comments only, no real code involved.
PR: misc/101245 Submitted by: Darren Pilgrim <darren pilgrim bitfr
Commit the results of the typo hunt by Darren Pilgrim. This change affects documentation and comments only, no real code involved.
PR: misc/101245 Submitted by: Darren Pilgrim <darren pilgrim bitfreak org> Tested by: md5(1) MFC after: 1 week
show more ...
|
Revision tags: release/5.5.0_cvs, release/5.5.0, release/6.1.0_cvs, release/6.1.0 |
|
#
272601f8 |
| 11-Mar-2006 |
Poul-Henning Kamp <phk@FreeBSD.org> |
Go over calcru and friends once more.
Reintroduce the monotonicity for the normal case and make the two special cases behave in what is belived to be the most sensible fasion.
|
#
0f038c05 |
| 09-Mar-2006 |
Poul-Henning Kamp <phk@FreeBSD.org> |
Add slop to "backwards" cpu accounting messages, 3 usec or 1% whichever triggers.
This should eliminate all the trivial messages which result from minor increases in cpu_tick frequency.
Machines wh
Add slop to "backwards" cpu accounting messages, 3 usec or 1% whichever triggers.
This should eliminate all the trivial messages which result from minor increases in cpu_tick frequency.
Machines which don't du cpu clock fiddling shouldn't issue "backwards" messages now.
Laptops and other machines where the initial estimate of cputicks may be waaaay off will still issue warnings.
show more ...
|
#
8f95fc24 |
| 22-Feb-2006 |
John Baldwin <jhb@FreeBSD.org> |
Various style and comment fixes.
Submitted by: bde
|
#
6fc6433e |
| 21-Feb-2006 |
John Baldwin <jhb@FreeBSD.org> |
Split calcru() back into a calcru1() function shared with calccru() and a calcru() wrapper that passes a local rusage_ext on the stack that is a snapshot to do the calculations on. Now we can pass p
Split calcru() back into a calcru1() function shared with calccru() and a calcru() wrapper that passes a local rusage_ext on the stack that is a snapshot to do the calculations on. Now we can pass p->p_crux to calcru1() in calccru() again which fixes the issues with runtime going backwards messages when dead processes are harvested by init.
Reviewed by: phk Tested by: Stefan Ehmann shoesoft at gmx dot net
show more ...
|
#
e8444a7e |
| 11-Feb-2006 |
Poul-Henning Kamp <phk@FreeBSD.org> |
CPU time accounting speedup (step 2)
Keep accounting time (in per-cpu) cputicks and the statistics counts in the thread and summarize into struct proc when at context switch.
Don't reach across CPU
CPU time accounting speedup (step 2)
Keep accounting time (in per-cpu) cputicks and the statistics counts in the thread and summarize into struct proc when at context switch.
Don't reach across CPUs in calcru().
Add code to calibrate the top speed of cpu_tickrate() for variable cpu_tick hardware (like TSC on power managed machines).
Don't enforce monotonicity (at least for now) in calcru. While the calibrated cpu_tickrate ramps up it may not be true.
Use 27MHz counter on i386/Geode.
Use TSC on amd64 & i386 if present.
Use tick counter on sparc64
show more ...
|
#
5b1a8eb3 |
| 07-Feb-2006 |
Poul-Henning Kamp <phk@FreeBSD.org> |
Modify the way we account for CPU time spent (step 1)
Keep track of time spent by the cpu in various contexts in units of "cputicks" and scale to real-world microsec^H^H^H^H^H^H^H^Hclock_t only when
Modify the way we account for CPU time spent (step 1)
Keep track of time spent by the cpu in various contexts in units of "cputicks" and scale to real-world microsec^H^H^H^H^H^H^H^Hclock_t only when somebody wants to inspect the numbers.
For now "cputicks" are still derived from the current timecounter and therefore things should by definition remain sensible also on SMP machines. (The main reason for this first milestone commit is to verify that hypothesis.)
On slower machines, the avoided multiplications to normalize timestams at every context switch, comes out as a 5-7% better score on the unixbench/context1 microbenchmark. On more modern hardware no change in performance is seen.
show more ...
|
#
6807424d |
| 25-Jan-2006 |
Stephan Uphoff <ups@FreeBSD.org> |
Back out changes made in rev. 1.151. They were bogus.
Cluebat applied by: jhb@
|
#
03001f59 |
| 23-Jan-2006 |
Stephan Uphoff <ups@FreeBSD.org> |
Hopefully fix the "calcru: runtime went backwards from ..." problem by keeping the resource values locked (where needed) while we use them for calculations.
MFC after: 3 days
|
Revision tags: release/6.0.0_cvs, release/6.0.0 |
|
#
1471f287 |
| 02-Nov-2005 |
Paul Saab <ps@FreeBSD.org> |
Calling setrlimit from 32bit apps could potentially increase certain limits beyond what should be capiable in a 32bit process, so we must fixup the limits.
Reviewed by: jhb
|
#
b2149bde |
| 27-Sep-2005 |
John Baldwin <jhb@FreeBSD.org> |
Use the reference count API to manage the reference counts for process limit structures rather than using pool mutexes to protect the reference counts.
Tested on: i386, alpha, sparc64
|
#
f0e51320 |
| 01-Jun-2005 |
Alan Cox <alc@FreeBSD.org> |
Giant is no longer required in kern_setrlimit(); remove its acquisition and release.
Reviewed by: jhb
|
Revision tags: release/5.4.0_cvs, release/5.4.0, release/4.11.0_cvs, release/4.11.0 |
|
#
63710c4d |
| 30-Dec-2004 |
John Baldwin <jhb@FreeBSD.org> |
Stop explicitly touching td_base_pri outside of the scheduler and simply set a thread's priority via sched_prio() when that is the desired action. The schedulers will start managing td_base_pri inter
Stop explicitly touching td_base_pri outside of the scheduler and simply set a thread's priority via sched_prio() when that is the desired action. The schedulers will start managing td_base_pri internally shortly.
show more ...
|
Revision tags: release/5.3.0_cvs, release/5.3.0 |
|
#
78c85e8d |
| 05-Oct-2004 |
John Baldwin <jhb@FreeBSD.org> |
Rework how we store process times in the kernel such that we always store the raw values including for child process statistics and only compute the system and user timevals on demand.
- Fix the var
Rework how we store process times in the kernel such that we always store the raw values including for child process statistics and only compute the system and user timevals on demand.
- Fix the various kern_wait() syscall wrappers to only pass in a rusage pointer if they are going to use the result. - Add a kern_getrusage() function for the ABI syscalls to use so that they don't have to play stackgap games to call getrusage(). - Fix the svr4_sys_times() syscall to just call calcru() to calculate the times it needs rather than calling getrusage() twice with associated stackgap, etc. - Add a new rusage_ext structure to store raw time stats such as tick counts for user, system, and interrupt time as well as a bintime of the total runtime. A new p_rux field in struct proc replaces the same inline fields from struct proc (i.e. p_[isu]ticks, p_[isu]u, and p_runtime). A new p_crux field in struct proc contains the "raw" child time usage statistics. ruadd() has been changed to handle adding the associated rusage_ext structures as well as the values in rusage. Effectively, the values in rusage_ext replace the ru_utime and ru_stime values in struct rusage. These two fields in struct rusage are no longer used in the kernel. - calcru() has been split into a static worker function calcru1() that calculates appropriate timevals for user and system time as well as updating the rux_[isu]u fields of a passed in rusage_ext structure. calcru() uses a copy of the process' p_rux structure to compute the timevals after updating the runtime appropriately if any of the threads in that process are currently executing. It also now only locks sched_lock internally while doing the rux_runtime fixup. calcru() now only requires the caller to hold the proc lock and calcru1() only requires the proc lock internally. calcru() also no longer allows callers to ask for an interrupt timeval since none of them actually did. - calcru() now correctly handles threads executing on other CPUs. - A new calccru() function computes the child system and user timevals by calling calcru1() on p_crux. Note that this means that any code that wants child times must now call this function rather than reading from p_cru directly. This function also requires the proc lock. - This finishes the locking for rusage and friends so some of the Giant locks in exit1() and kern_wait() are now gone. - The locking in ttyinfo() has been tweaked so that a shared lock of the proctree lock is used to protect the process group rather than the process group lock. By holding this lock until the end of the function we now ensure that the process/thread that we pick to dump info about will no longer vanish while we are trying to output its info to the console.
Submitted by: bde (mostly) MFC after: 1 month
show more ...
|
#
6111dcd2 |
| 24-Sep-2004 |
John Baldwin <jhb@FreeBSD.org> |
A modest collection of various and sundry style, spelling, and whitespace fixes.
Submitted by: bde (mostly)
|
#
7eaec467 |
| 22-Sep-2004 |
John Baldwin <jhb@FreeBSD.org> |
Various small style fixes.
|
#
5dd3a4ed |
| 07-Aug-2004 |
Robert Watson <rwatson@FreeBSD.org> |
Push UIDINFO_UNLOCK() slightly earlier in chgsbize(), as it's not needed if we print the local variable version of the limit rather than the shared version.
|
#
1b93405c |
| 04-Aug-2004 |
Robert Watson <rwatson@FreeBSD.org> |
Remove spl's from kern_resource.c.
|
#
56f21b9d |
| 26-Jul-2004 |
Colin Percival <cperciva@FreeBSD.org> |
Rename suser_cred()'s PRISON_ROOT flag to SUSER_ALLOWJAIL. This is somewhat clearer, but more importantly allows for a consistent naming scheme for suser_cred flags.
The old name is still defined,
Rename suser_cred()'s PRISON_ROOT flag to SUSER_ALLOWJAIL. This is somewhat clearer, but more importantly allows for a consistent naming scheme for suser_cred flags.
The old name is still defined, but will be removed in a few days (unless I hear any complaints...)
Discussed with: rwatson, scottl Requested by: jhb
show more ...
|