summaryrefslogtreecommitdiffstats
path: root/sys/kern/kern_fork.c (follow)
Commit message (Collapse)AuthorAgeFilesLines
...
* PHOLD/PRELE instead manual fiddling with p_holdcntart2000-11-091-3/+3
|
* last change was not tested on VM systemsderaadt2000-07-101-2/+2
|
* The rfork sharing of vmspace is .. special and was broken with UVM.art2000-07-071-4/+16
| | | | | Add a new flag to fork1 - FORK_VMNOSTACK that shares all of the vmspace except the stack and use it for rfork.
* Mark kernel threads as system processes. Make ps hide them by default,niklas2000-06-181-1/+4
| | | | | | show them with -k. Do not try to show RSS based values for them as they mess up column alignment. vmstat -f now shows kernel threads separately from rforks too.
* Don't reinitialize the tsleep and ITIMER_REAL timers all the time.art2000-03-231-3/+11
| | | | The function and the argument never change.
* Use the LIST_FIRST macro to get the head of zombproc list.art2000-03-031-2/+2
|
* Use LIST_ macros instead of internal field names to walk the allproc list.art2000-03-031-3/+3
|
* dead code and symbol pollution.art2000-02-211-1/+3
|
* re-add fixed vfork code from artderaadt2000-01-311-47/+55
|
* undo vfork changes, since non-UVM was not consideredderaadt2000-01-311-55/+47
|
* Change fork1() from taking forktype and rforkflags, into a single flagsart2000-01-281-47/+55
| | | | | argument. Let sys_rfork build the arguments to fork1() and do the sanity checks itself.
* New cpu_fork API to take a stack in which you point the child's stackpointerniklas1999-08-171-8/+12
| | | | | | to, at the bottom or the top, depending on your architecture's stack growth direction. This is in preparation for Linux' clone(2) emulation. port maintainers, please check that I did the work right.
* Adopt NetBSD fix for scheduler problems (nice was broken). From the NetBSDpjanzen1999-08-151-2/+3
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | commit messages: Scheduler bug fixes and reorganization * fix the ancient nice(1) bug, where nice +20 processes incorrectly steal 10 - 20% of the CPU, (or even more depending on load average) * provide a new schedclock() mechanism at a new clock at schedhz, so high platform hz values don't cause nice +0 processes to look like they are niced * change the algorithm slightly, and reorganize the code a lot * fix percent-CPU calculation bugs, and eliminate some no-op code === nice bug === Correctly divide the scheduler queues between niced and compute-bound processes. The current nice weight of two (sort of, see `algorithm change' below) neatly divides the USRPRI queues in half; this should have been used to clip p_estcpu, instead of UCHAR_MAX. Besides being the wrong amount, clipping an unsigned char to UCHAR_MAX is a no-op, and it was done after decay_cpu() which can only _reduce_ the value. It has to be kept <= NICE_WEIGHT * PRIO_MAX - PPQ or processes can scheduler-penalize themselves onto the same queue as nice +20 processes. (Or even a higher one.) === New schedclock() mechanism === Some platforms should be cutting down stathz before hitting the scheduler, since the scheduler algorithm only works right in the vicinity of 64 Hz. Rather than prescale hz, then scale back and forth by 4 every time p_estcpu is touched (each occurance an abstraction violation), use p_estcpu without scaling and require schedhz to be generated directly at the right frequency. Use a default stathz (well, actually, profhz) / 4, so nothing changes unless a platform defines schedhz and a new clock. [ To do: Define these for alpha, where hz==1024, and nice was totally broke.] === Algorithm change === The nice value used to be added to the exponentially-decayed scheduler history value p_estcpu, in _addition_ to be incorporated directly (with greater weight) into the priority calculation. At first glance, it appears to be a pointless increase of 1/8 the nice effect (pri = p_estcpu/4 + nice*2), but it's actually at least 3x that because it will ramp up linearly but be decayed only exponentially, thus converging to an additional .75 nice for a loadaverage of one. I killed this: it makes the behavior hard to control, almost impossible to analyze, and the effect (~~nothing at for the first second, then somewhat increased niceness after three seconds or more, depending on load average) pointless. === Other bugs === hz -> profhz in the p_pctcpu = f(p_cpticks) calcuation. Collect scheduler functionality. Try to put each abstraction in just one place.
* correct fork statistics for UVMart1999-07-171-6/+4
|
* vm_offset_t -> {v,p}addr_t ; vm_size_t -> {v,p}size_tart1999-07-151-2/+2
|
* in scheduler, bias parents for child cpu usage; ross@ghs.comderaadt1999-03-121-1/+8
|
* RFNOWAIT does not dissociate the child from its parent in any otherniklas1999-03-021-5/+3
| | | | | way than that the parent wait call will never get the status of this child, says Rob
* kmem allocation changes for uvm, and vm_fork -> uvm_fork (with one extra argument)art1999-02-261-1/+27
|
* update the comment about number of allowed processesart1999-02-231-5/+4
|
* Allow up to 5 (was 1) root processes when the process limit is reached.art1999-02-231-2/+2
| | | | | This gives root a bigger chance to fix any problem that caused the limit to be reached.
* Ooops! Move the allocation of the U area to after the limits checks.art1999-02-231-12/+12
| | | | That was a memory leak.
* Allocate the u-area early in fork1 instead of in vm_fork.art1999-02-191-1/+16
| | | | Now we can return ENOMEM instead of doing a panic when we run out of memory.
* just check rforkflags if ISRFORKniklas1999-01-111-2/+2
|
* Make RFNOWAIT work in rfork(2)niklas1999-01-101-10/+2
|
* only allow setuid if fd_refcnt == 1, due to rforkderaadt1997-08-011-3/+1
|
* disable RFFDG; long explanation...deraadt1997-08-011-1/+3
|
* count pages in forkstat, see "vmstat -f"kstailey1997-07-071-1/+6
|
* random pid generation, hehderaadt1997-06-051-6/+6
|
* cp P_SUGID/P_SUGIDEXEC to child, doh; half from freebsdderaadt1997-02-181-1/+2
|
* Rename nextpid to lastpid; make it a global with type pid_ttholo1996-09-021-15/+16
|
* From NetBSD: 960217 mergeniklas1996-03-031-5/+9
|
* Count number of forks, vforks, rforks; still need to count VM pages affectedtholo1996-02-191-2/+12
| | | | by the various fork types
* plan9-like rfork() implimentation by me based on some earlier incompletederaadt1996-01-101-8/+63
| | | | work by rminnich@Sarnoff.COM. still needs RFNOWAIT support.
* from netbsd:deraadt1995-12-141-9/+20
| | | | | | Only expect vm_fork() to return if __FORK_BRAINDAMAGE is defined. Use splstatclock() rather than splhigh() in one place. Eliminate unused third arg to vm_fork().
* initial import of NetBSD treederaadt1995-10-181-0/+284