Revision tags: release/5.2.1_cvs, release/5.2.1 |
|
#
91d5354a |
| 04-Feb-2004 |
John Baldwin <jhb@FreeBSD.org> |
Locking for the per-process resource limits structure. - struct plimit includes a mutex to protect a reference count. The plimit structure is treated similarly to struct ucred in that is is always
Locking for the per-process resource limits structure. - struct plimit includes a mutex to protect a reference count. The plimit structure is treated similarly to struct ucred in that is is always copy on write, so having a reference to a structure is sufficient to read from it without needing a further lock. - The proc lock protects the p_limit pointer and must be held while reading limits from a process to keep the limit structure from changing out from under you while reading from it. - Various global limits that are ints are not protected by a lock since int writes are atomic on all the archs we support and thus a lock wouldn't buy us anything. - All accesses to individual resource limits from a process are abstracted behind a simple lim_rlimit(), lim_max(), and lim_cur() API that return either an rlimit, or the current or max individual limit of the specified resource from a process. - dosetrlimit() was renamed to kern_setrlimit() to match existing style of other similar syscall helper functions. - The alpha OSF/1 compat layer no longer calls getrlimit() and setrlimit() (it didn't used the stackgap when it should have) but uses lim_rlimit() and kern_setrlimit() instead. - The svr4 compat no longer uses the stackgap for resource limits calls, but uses lim_rlimit() and kern_setrlimit() instead. - The ibcs2 compat no longer uses the stackgap for resource limits. It also no longer uses the stackgap for accessing sysctl's for the ibcs2_sysconf() syscall but uses kernel_sysctl() instead. As a result, ibcs2_sysconf() no longer needs Giant. - The p_rlimit macro no longer exists.
Submitted by: mtm (mostly, I only did a few cleanups and catchups) Tested on: i386 Compiled on: alpha, amd64
show more ...
|
Revision tags: release/5.2.0_cvs, release/5.2.0, release/4.9.0_cvs, release/4.9.0 |
|
#
6caf7e9f |
| 05-Oct-2003 |
Alan Cox <alc@FreeBSD.org> |
Synchronize access to a vm page's valid field using the containing vm object's lock.
|
#
8b5905a4 |
| 04-Oct-2003 |
Jeff Roberson <jeff@FreeBSD.org> |
- Remove the backtrace() call from the *_vinvalbuf() functions. Thanks to a stack trace supplied by phk, I now understand what's going on here. The check for VI_XLOCK stops us from calling vi
- Remove the backtrace() call from the *_vinvalbuf() functions. Thanks to a stack trace supplied by phk, I now understand what's going on here. The check for VI_XLOCK stops us from calling vinvalbuf once the vnode has been partially torn down in vclean(). It is not clear that this would cause a problem. Document this in nfs_bio.c, which is where the other two filesystems copied this code from.
show more ...
|
#
ce1fb231 |
| 20-Sep-2003 |
Jeff Roberson <jeff@FreeBSD.org> |
- Remove interlock protection around VI_XLOCK. The interlock is not sufficient to guarantee that this race is not hit. The XLOCK will likely have to be redesigned due to the way reference cou
- Remove interlock protection around VI_XLOCK. The interlock is not sufficient to guarantee that this race is not hit. The XLOCK will likely have to be redesigned due to the way reference counting and mutexes work in FreeBSD. We currently can not be guaranteed that xlock was not set and cleared while we were blocked on the interlock while waiting to check for XLOCK. This would lead us to reference a vnode which was not the vnode we requested. - Add a backtrace() call inside of INVARIANTS in the hopes of finding out if this condition is ever hit. It should not, since we should be retaining a reference to the vnode in these cases. The reference would be sufficient to block recycling.
show more ...
|
#
a8d43c90 |
| 26-Jul-2003 |
Poul-Henning Kamp <phk@FreeBSD.org> |
Add a "int fd" argument to VOP_OPEN() which in the future will contain the filedescriptor number on opens from userland.
The index is used rather than a "struct file *" since it conveys a bit more i
Add a "int fd" argument to VOP_OPEN() which in the future will contain the filedescriptor number on opens from userland.
The index is used rather than a "struct file *" since it conveys a bit more information, which may be useful to in particular fdescfs and /dev/fd/*
For now pass -1 all over the place.
show more ...
|
#
82b8b189 |
| 19-Jun-2003 |
Alan Cox <alc@FreeBSD.org> |
Lock the vm object when freeing a vm page.
|
Revision tags: release/5.1.0_cvs, release/5.1.0, release/4.8.0_cvs, release/4.8.0 |
|
#
120d1b9e |
| 01-Apr-2003 |
Jeff Roberson <jeff@FreeBSD.org> |
- smb_td_intr takes a thread as an argument not a proc.
|
#
6f39c1a1 |
| 01-Apr-2003 |
Jeff Roberson <jeff@FreeBSD.org> |
- smb_proc_intr is now spelled smb_td_intr.
Noticed by: phk Pointy hat to: jeffr
|
#
521f364b |
| 02-Mar-2003 |
Dag-Erling Smørgrav <des@FreeBSD.org> |
More low-hanging fruit: kill caddr_t in calls to wakeup(9) / [mt]sleep(9).
|
#
8994a245 |
| 02-Mar-2003 |
Dag-Erling Smørgrav <des@FreeBSD.org> |
Clean up whitespace, s/register //, refrain from strong urge to ANSIfy.
|
#
c9524588 |
| 02-Mar-2003 |
Dag-Erling Smørgrav <des@FreeBSD.org> |
uiomove-related caddr_t -> void * (just the low-hanging fruit)
|
Revision tags: release/5.0.0_cvs, release/5.0.0 |
|
#
11de0c59 |
| 13-Dec-2002 |
Tim J. Robbins <tjr@FreeBSD.org> |
Store a reference to the parent directory's vnode in struct smbnode, not to the parent's smbnode, which may be freed during the lifetime of the child if the mount is forcibly unmounted. umount -f sho
Store a reference to the parent directory's vnode in struct smbnode, not to the parent's smbnode, which may be freed during the lifetime of the child if the mount is forcibly unmounted. umount -f should now work properly (ie. not panic) on smbfs mounts.
show more ...
|
#
a5b65058 |
| 14-Oct-2002 |
Kirk McKusick <mckusick@FreeBSD.org> |
Regularize the vop_stdlock'ing protocol across all the filesystems that use it. Specifically, vop_stdlock uses the lock pointed to by vp->v_vnlock. By default, getnewvnode sets up vp->v_vnlock to ref
Regularize the vop_stdlock'ing protocol across all the filesystems that use it. Specifically, vop_stdlock uses the lock pointed to by vp->v_vnlock. By default, getnewvnode sets up vp->v_vnlock to reference vp->v_lock. Filesystems that wish to use the default do not need to allocate a lock at the front of their node structure (as some still did) or do a lockinit. They can simply start using vn_lock/VOP_UNLOCK. Filesystems that wish to manage their own locks, but still use the vop_stdlock functions (such as nullfs) can simply replace vp->v_vnlock with a pointer to the lock that they wish to have used for the vnode. Such filesystems are responsible for setting the vp->v_vnlock back to the default in their vop_reclaim routine (e.g., vp->v_vnlock = &vp->v_lock).
In theory, this set of changes cleans up the existing filesystem lock interface and should have no function change to the existing locking scheme.
Sponsored by: DARPA & NAI Labs.
show more ...
|
Revision tags: release/4.7.0_cvs, release/4.6.2_cvs, release/4.6.2 |
|
#
e6e370a7 |
| 04-Aug-2002 |
Jeff Roberson <jeff@FreeBSD.org> |
- Replace v_flag with v_iflag and v_vflag - v_vflag is protected by the vnode lock and is used when synchronization with VOP calls is needed. - v_iflag is protected by interlock and is used for
- Replace v_flag with v_iflag and v_vflag - v_vflag is protected by the vnode lock and is used when synchronization with VOP calls is needed. - v_iflag is protected by interlock and is used for dealing with vnode management issues. These flags include X/O LOCK, FREE, DOOMED, etc. - All accesses to v_iflag and v_vflag have either been locked or marked with mp_fixme's. - Many ASSERT_VOP_LOCKED calls have been added where the locking was not clear. - Many functions in vfs_subr.c were restructured to provide for stronger locking.
Idea stolen from: BSD/OS
show more ...
|
#
1e7ce68f |
| 02-Aug-2002 |
Alan Cox <alc@FreeBSD.org> |
o Lock page queue accesses in nwfs and smbfs. o Assert that the page queues lock is held in vm_page_deactivate().
|
Revision tags: release/4.6.1, release/4.6.0_cvs |
|
#
b8815755 |
| 26-Apr-2002 |
Boris Popov <bp@FreeBSD.org> |
UIO_NOCOPY is not supported for now, so refuse read opeartion if this flag is set. The full emulation of bio are on its way...
|
#
959b83b9 |
| 23-Apr-2002 |
Boris Popov <bp@FreeBSD.org> |
Track nfs's getpages() changes:
Properly count v_vnodepgsin. Do not reread page if is already valid. Properly handle partially filled pages.
|
#
3f36e6f2 |
| 23-Apr-2002 |
Boris Popov <bp@FreeBSD.org> |
Get rid from extra #ifdefs.
|
#
a854ed98 |
| 27-Feb-2002 |
John Baldwin <jhb@FreeBSD.org> |
Simple p_ucred -> td_ucred changes to start using the per-thread ucred reference.
|
Revision tags: release/4.5.0_cvs, release/4.4.0_cvs |
|
#
b1c996c4 |
| 02-Dec-2001 |
Boris Popov <bp@FreeBSD.org> |
Catch up with KSE changes.
Submitted by: Max Khon <fjoe@iclub.nsu.ru>
|
#
70635953 |
| 18-Jul-2001 |
John Baldwin <jhb@FreeBSD.org> |
Grab the process lock around psignal().
Noticed by: tanimura
|
#
4a370459 |
| 04-Jul-2001 |
John Baldwin <jhb@FreeBSD.org> |
- Update the vmmeter statistics for vnode pageins and pageouts in getpages/putpages. - Use vm_page_undirty() instead of messing with pages' dirty fields directly.
|
#
f41325db |
| 13-Jun-2001 |
Peter Wemm <peter@FreeBSD.org> |
With this commit, I hereby pronounce gensetdefs past its use-by date.
Replace the a.out emulation of 'struct linker_set' with something a little more flexible. <sys/linker_set.h> now provides macro
With this commit, I hereby pronounce gensetdefs past its use-by date.
Replace the a.out emulation of 'struct linker_set' with something a little more flexible. <sys/linker_set.h> now provides macros for accessing elements and completely hides the implementation.
The linker_set.h macros have been on the back burner in various forms since 1998 and has ideas and code from Mike Smith (SET_FOREACH()), John Polstra (ELF clue) and myself (cleaned up API and the conversion of the rest of the kernel to use it).
The macros declare a strongly typed set. They return elements with the type that you declare the set with, rather than a generic void *.
For ELF, we use the magic ld symbols (__start_<setname> and __stop_<setname>). Thanks to Richard Henderson <rth@redhat.com> for the trick about how to force ld to provide them for kld's.
For a.out, we use the old linker_set struct.
NOTE: the item lists are no longer null terminated. This is why the code impact is high in certain areas.
The runtime linker has a new method to find the linker set boundaries depending on which backend format is in use.
linker sets are still module/kld unfriendly and should never be used for anything that may be modular one day.
Reviewed by: eivind
show more ...
|
#
d759827b |
| 03-May-2001 |
Boris Popov <bp@FreeBSD.org> |
Convert vnode_pager_freepage() to vm_free_page().
Forgotten by: alfred
|
#
a62615e5 |
| 01-May-2001 |
Poul-Henning Kamp <phk@FreeBSD.org> |
Implement vop_std{get|put}pages() and add them to the default vop[].
Un-copy&paste all the VOP_{GET|PUT}PAGES() functions which do nothing but the default.
|