#
57051fdc |
| 29-May-2006 |
Tor Egge <tegge@FreeBSD.org> |
Close race between vmspace_exitfree() and exit1() and races between vmspace_exitfree() and vmspace_free() which could result in the same vmspace being freed twice.
Factor out part of exit1() into ne
Close race between vmspace_exitfree() and exit1() and races between vmspace_exitfree() and vmspace_free() which could result in the same vmspace being freed twice.
Factor out part of exit1() into new function vmspace_exit(). Attach to vmspace0 to allow old vmspace to be freed earlier.
Add new function, vmspace_acquire_ref(), for obtaining a vmspace reference for a vmspace belonging to another process. Avoid changing vmspace refcount from 0 to 1 since that could also lead to the same vmspace being freed twice.
Change vmtotal() and swapout_procs() to use vmspace_acquire_ref().
Reviewed by: alc
show more ...
|
Revision tags: release/5.5.0_cvs, release/5.5.0, release/6.1.0_cvs, release/6.1.0 |
|
#
da61b9a6 |
| 16-Dec-2005 |
Alan Cox <alc@FreeBSD.org> |
Use sf_buf_alloc() instead of vm_map_find() on exec_map to create the ephemeral mappings that are used as the source for three copy operations from kernel space to user space. There are two reasons
Use sf_buf_alloc() instead of vm_map_find() on exec_map to create the ephemeral mappings that are used as the source for three copy operations from kernel space to user space. There are two reasons for making this change: (1) Under heavy load exec_map can fill up causing vm_map_find() to fail. When it fails, the nascent process is aborted (SIGABRT). Whereas, this reimplementation using sf_buf_alloc() sleeps. (2) Although it is possible to sleep on vm_map_find()'s failure until address space becomes available (see kmem_alloc_wait()), using sf_buf_alloc() is faster. Furthermore, the reimplementation uses a CPU private mapping, avoiding a TLB shootdown on multiprocessors.
Problem uncovered by: kris@ Reviewed by: tegge@ MFC after: 3 weeks
show more ...
|
Revision tags: release/6.0.0_cvs, release/6.0.0 |
|
#
d13ec713 |
| 24-May-2005 |
Stephan Uphoff <ups@FreeBSD.org> |
Use low level constructs borrowed from interrupt threads to wait for work in proc0. Remove the TDP_WAKEPROC0 workaround.
|
#
10c447fa |
| 22-May-2005 |
Alan Cox <alc@FreeBSD.org> |
Swap in can occur safely without Giant. Release Giant on entry to scheduler().
|
#
35cf2323 |
| 22-May-2005 |
Alan Cox <alc@FreeBSD.org> |
Remove GIANT_REQUIRED from swapout_procs().
|
Revision tags: release/5.4.0_cvs, release/5.4.0 |
|
#
75337a56 |
| 22-Jan-2005 |
Alan Cox <alc@FreeBSD.org> |
Guard against address wrap in kernacc(). Otherwise, a program accessing a bad address range through /dev/kmem can panic the machine.
Submitted by: Mark W. Krentel Reported by: Kris Kennaway MFC aft
Guard against address wrap in kernacc(). Otherwise, a program accessing a bad address range through /dev/kmem can panic the machine.
Submitted by: Mark W. Krentel Reported by: Kris Kennaway MFC after: 1 week
show more ...
|
Revision tags: release/4.11.0_cvs, release/4.11.0 |
|
#
60727d8b |
| 07-Jan-2005 |
Warner Losh <imp@FreeBSD.org> |
/* -> /*- for license, minor formatting changes
|
#
6004362e |
| 27-Nov-2004 |
David Schultz <das@FreeBSD.org> |
Don't include sys/user.h merely for its side-effect of recursively including other headers.
|
#
9799b417 |
| 20-Nov-2004 |
David Schultz <das@FreeBSD.org> |
Disable U area swapping and remove the routines that create, destroy, copy, and swap U areas.
Reviewed by: arch@
|
Revision tags: release/5.3.0_cvs, release/5.3.0 |
|
#
d19ef814 |
| 03-Nov-2004 |
Alan Cox <alc@FreeBSD.org> |
The synchronization provided by vm object locking has eliminated the need for most calls to vm_page_busy(). Specifically, most calls to vm_page_busy() occur immediately prior to a call to vm_page_re
The synchronization provided by vm object locking has eliminated the need for most calls to vm_page_busy(). Specifically, most calls to vm_page_busy() occur immediately prior to a call to vm_page_remove(). In such cases, the containing vm object is locked across both calls. Consequently, the setting of the vm page's PG_BUSY flag is not even visible to other threads that are following the synchronization protocol.
This change (1) eliminates the calls to vm_page_busy() that immediately precede a call to vm_page_remove() or functions, such as vm_page_free() and vm_page_rename(), that call it and (2) relaxes the requirement in vm_page_remove() that the vm page's PG_BUSY flag is set. Now, the vm page's PG_BUSY flag is set only when the vm object lock is released while the vm page is still in transition. Typically, this is when it is undergoing I/O.
show more ...
|
#
ddf4bb37 |
| 24-Oct-2004 |
Alan Cox <alc@FreeBSD.org> |
Use VM_ALLOC_NOBUSY instead of calling vm_page_wakeup().
|
#
8daa8c60 |
| 19-Sep-2004 |
David Schultz <das@FreeBSD.org> |
The zone from which proc structures are allocated is marked UMA_ZONE_NOFREE to guarantee type stability, so proc_fini() should never be called. Move an assertion from proc_fini() to proc_dtor() and
The zone from which proc structures are allocated is marked UMA_ZONE_NOFREE to guarantee type stability, so proc_fini() should never be called. Move an assertion from proc_fini() to proc_dtor() and garbage-collect the rest of the unreachable code. I have retained vm_proc_dispose(), since I consider its disuse a bug.
show more ...
|
#
94ddc707 |
| 03-Sep-2004 |
Alan Cox <alc@FreeBSD.org> |
Push Giant deep into vm_forkproc(), acquiring it only if the process has mapped System V shared memory segments (see shmfork_myhook()) or requires the allocation of an ldt (see vm_fault_wire()).
|
#
9be60284 |
| 30-Jul-2004 |
Alan Cox <alc@FreeBSD.org> |
Giant is no longer required by vm_waitproc() and vmspace_exitfree(). Eliminate it acquisition and release around vm_waitproc() in kern_wait().
|
#
1a276a3f |
| 27-Jul-2004 |
Alan Cox <alc@FreeBSD.org> |
- Use atomic ops for updating the vmspace's refcnt and exitingcnt. - Push down Giant into shmexit(). (Giant is acquired only if the vmspace contains shm segments.) - Eliminate the acquisition o
- Use atomic ops for updating the vmspace's refcnt and exitingcnt. - Push down Giant into shmexit(). (Giant is acquired only if the vmspace contains shm segments.) - Eliminate the acquisition of Giant from proc_rwmem(). - Reduce the scope of Giant in exit1(), uncovering the destruction of the address space.
show more ...
|
#
d202e0cc |
| 02-Jul-2004 |
John Baldwin <jhb@FreeBSD.org> |
- Don't use a variable to point to the user area that we only use once. Just use p2->p_uarea directly instead. - Remove an old and mostly bogus assertion regarding p2->p_sigacts. - Use RANGEOF macr
- Don't use a variable to point to the user area that we only use once. Just use p2->p_uarea directly instead. - Remove an old and mostly bogus assertion regarding p2->p_sigacts. - Use RANGEOF macro ala fork1() to clean up bzero/bcopy of p_stats.
show more ...
|
#
17d9d0d0 |
| 27-Jun-2004 |
David Schultz <das@FreeBSD.org> |
Update a stale comment. The heuristic to swap processes out based on the number of pages already paged out was broken in rev 1.10 and removed in rev 1.11.
|
#
fa885116 |
| 16-Jun-2004 |
Julian Elischer <julian@FreeBSD.org> |
Nice, is a property of a process as a whole.. I mistakenly moved it to the ksegroup when breaking up the process structure. Put it back in the proc structure.
|
Revision tags: release/4.10.0_cvs, release/4.10.0 |
|
#
d9b2500e |
| 07-May-2004 |
Brian Feldman <green@FreeBSD.org> |
In r1.190, vslock() and vsunlock() were bogusly made to do a "user wire" and a "system unwire." Make this a "system wire" and "system unwire."
Reviewed by: alc
|
#
05eb3785 |
| 06-Apr-2004 |
Warner Losh <imp@FreeBSD.org> |
Remove advertising clause from University of California Regent's license, per letter dated July 22, 1999.
Approved by: core
|
#
bb734798 |
| 15-Mar-2004 |
Don Lewis <truckman@FreeBSD.org> |
Make overflow/wraparound checking more robust and unbreak len=0 in vslock(), mlock(), and munlock().
Reviewed by: bde
|
#
f0ea4612 |
| 15-Mar-2004 |
Don Lewis <truckman@FreeBSD.org> |
Style(9) changes.
Pointed out by: bde
|
#
ce8660e3 |
| 15-Mar-2004 |
Don Lewis <truckman@FreeBSD.org> |
Revert to the original vslock() and vsunlock() API with the following exceptions: Retain the recently added vslock() error return.
The type of the len argument should be size_t, not u_int.
Sugges
Revert to the original vslock() and vsunlock() API with the following exceptions: Retain the recently added vslock() error return.
The type of the len argument should be size_t, not u_int.
Suggested by: bde
show more ...
|
#
fcffa790 |
| 07-Mar-2004 |
Alan Cox <alc@FreeBSD.org> |
Retire pmap_pinit2(). Alpha was the last platform that used it. However, ever since alpha/alpha/pmap.c revision 1.81 introduced the list allpmaps, there has been no reason for having this function
Retire pmap_pinit2(). Alpha was the last platform that used it. However, ever since alpha/alpha/pmap.c revision 1.81 introduced the list allpmaps, there has been no reason for having this function on Alpha. Briefly, when pmap_growkernel() relied upon the list of all processes to find and update the various pmaps to reflect a growth in the kernel's valid address space, pmap_init2() served to avoid a race between pmap initialization and pmap_growkernel(). Specifically, pmap_pinit2() was responsible for initializing the kernel portions of the pmap and pmap_pinit2() was called after the process structure contained a pointer to the new pmap for use by pmap_growkernel(). Thus, an update to the kernel's address space might be applied to the new pmap unnecessarily, but an update would never be lost.
show more ...
|
#
16929939 |
| 05-Mar-2004 |
Don Lewis <truckman@FreeBSD.org> |
Undo the merger of mlock()/vslock and munlock()/vsunlock() and the introduction of kern_mlock() and kern_munlock() in src/sys/kern/kern_sysctl.c 1.150 src/sys/vm/vm_extern.h
Undo the merger of mlock()/vslock and munlock()/vsunlock() and the introduction of kern_mlock() and kern_munlock() in src/sys/kern/kern_sysctl.c 1.150 src/sys/vm/vm_extern.h 1.69 src/sys/vm/vm_glue.c 1.190 src/sys/vm/vm_mmap.c 1.179 because different resource limits are appropriate for transient and "permanent" page wiring requests.
Retain the kern_mlock() and kern_munlock() API in the revived vslock() and vsunlock() functions.
Combine the best parts of each of the original sets of implementations with further code cleanup. Make the mclock() and vslock() implementations as similar as possible.
Retain the RLIMIT_MEMLOCK check in mlock(). Move the most strigent test, which can return EAGAIN, last so that requests that have no hope of ever being satisfied will not be retried unnecessarily.
Disable the test that can return EAGAIN in the vslock() implementation because it will cause the sysctl code to wedge.
Tested by: Cy Schubert <Cy.Schubert AT komquats.com>
show more ...
|