#
0b556837 |
| 06-Apr-2003 |
Alan Cox <alc@FreeBSD.org> |
Remove an unnecessary trunc_page() from vmapbuf().
Reviewed by: tegge
|
#
08468b6a |
| 04-Apr-2003 |
Alan Cox <alc@FreeBSD.org> |
o Check the b_bufsize passed to vmapbuf() returning an error if it is invalid. o Remove a debugging printf() from vmapbuf().
Suggested by: tegge
|
Revision tags: release/4.8.0_cvs, release/4.8.0 |
|
#
d086f85a |
| 30-Mar-2003 |
Poul-Henning Kamp <phk@FreeBSD.org> |
Preparation commit before I start on the bioqueue lockdown:
Collect all the bits of bioqueue handing in subr_disk.c, vfs_bio.c is big enough as it is and disksort already lives in subr_disk.c.
|
#
5bbb8060 |
| 27-Mar-2003 |
Tor Egge <tegge@FreeBSD.org> |
Add support for reading directly from file to userland buffer when the O_DIRECT descriptor status flag is set and both offset and length is a multiple of the physical media sector size.
|
#
227f9a1c |
| 25-Mar-2003 |
Jake Burkholder <jake@FreeBSD.org> |
- Add vm_paddr_t, a physical address type. This is required for systems where physical addresses larger than virtual addresses, such as i386s with PAE. - Use this to represent physical addresses
- Add vm_paddr_t, a physical address type. This is required for systems where physical addresses larger than virtual addresses, such as i386s with PAE. - Use this to represent physical addresses in the MI vm system and in the i386 pmap code. This also changes the paddr parameter to d_mmap_t. - Fix printf formats to handle physical addresses >4G in the i386 memory detection code, and due to kvtop returning vm_paddr_t instead of u_long.
Note that this is a name change only; vm_paddr_t is still the same as vm_offset_t on all currently supported platforms.
Sponsored by: DARPA, Network Associates Laboratories Discussed with: re, phk (cdevsw change)
show more ...
|
#
b4b138c2 |
| 18-Mar-2003 |
Poul-Henning Kamp <phk@FreeBSD.org> |
Including <sys/stdint.h> is (almost?) universally only to be able to use %j in printfs, so put a newsted include in <sys/systm.h> where the printf prototype lives and save everybody else the trouble.
|
#
749ffa4e |
| 13-Mar-2003 |
Jeff Roberson <jeff@FreeBSD.org> |
- Add a lock for protecting against msleep(bp, ...) wakeup(bp) races. - Create a new function bdone() which sets B_DONE and calls wakup(bp). This is suitable for use as b_iodone for buf consumers
- Add a lock for protecting against msleep(bp, ...) wakeup(bp) races. - Create a new function bdone() which sets B_DONE and calls wakup(bp). This is suitable for use as b_iodone for buf consumers who are not going through the buf cache. - Create a new function bwait() which waits for the buf to be done at a set priority and with a specific wmesg. - Replace several cases where the above functionality was implemented without locking with the new functions.
show more ...
|
#
09f11da5 |
| 13-Mar-2003 |
Jeff Roberson <jeff@FreeBSD.org> |
- Remove a race between fsync like functions and flushbufqueues() by requiring locked bufs in vfs_bio_awrite(). Previously the buf could have been written out by fsync before we acquired the b
- Remove a race between fsync like functions and flushbufqueues() by requiring locked bufs in vfs_bio_awrite(). Previously the buf could have been written out by fsync before we acquired the buf lock if it weren't for giant. The cluster_wbuild() handles this race properly but the single write at the end of vfs_bio_awrite() would not. - Modify flushbufqueues() so there is only one copy of the loop. Pass a parameter in that says whether or not we should sync bufs with deps. - Call flushbufqueues() a second time and then break if we couldn't find any bufs without deps.
show more ...
|
#
7261f5f6 |
| 04-Mar-2003 |
Jeff Roberson <jeff@FreeBSD.org> |
- Add a new 'flags' parameter to getblk(). - Define one flag GB_LOCK_NOWAIT that tells getblk() to pass the LK_NOWAIT flag to the initial BUF_LOCK(). This will eventually be used in cases wer
- Add a new 'flags' parameter to getblk(). - Define one flag GB_LOCK_NOWAIT that tells getblk() to pass the LK_NOWAIT flag to the initial BUF_LOCK(). This will eventually be used in cases were we want to use a buffer only if it is not currently in use. - Convert all consumers of the getblk() api to use this extra parameter.
Reviwed by: arch Not objected to by: mckusick
show more ...
|
#
491081fa |
| 02-Mar-2003 |
Jeff Roberson <jeff@FreeBSD.org> |
- Hold the vnode interlock across calls to bgetvp instead of acquiring it internally. This is required to stop multiple bufs from being associated with a single lblkno.
|
#
bff5362b |
| 01-Mar-2003 |
Jeff Roberson <jeff@FreeBSD.org> |
- gc USE_BUFHASH. The smp locking of the buf cache renders this useless.
|
#
7e734c41 |
| 26-Feb-2003 |
Kirk McKusick <mckusick@FreeBSD.org> |
When doing cleanup of excessive buffers in bdwrite (see kern/vfs_bio.c delta 1.371) we must ensure that we do not get ourselves into a recursive trap endlessly trying to clean up after ourselves.
Re
When doing cleanup of excessive buffers in bdwrite (see kern/vfs_bio.c delta 1.371) we must ensure that we do not get ourselves into a recursive trap endlessly trying to clean up after ourselves.
Reported by: Attila Nagy <bra@fsn.hu> Sponsored by: DARPA & NAI Labs.
show more ...
|
#
2e3981a7 |
| 25-Feb-2003 |
Jeff Roberson <jeff@FreeBSD.org> |
- Add the missing NULL interlock argument to a recently added BUF_LOCK.
|
#
3a7053cb |
| 25-Feb-2003 |
Kirk McKusick <mckusick@FreeBSD.org> |
Prevent large files from monopolizing the system buffers. Keep track of the number of dirty buffers held by a vnode. When a bdwrite is done on a buffer, check the existing number of dirty buffers ass
Prevent large files from monopolizing the system buffers. Keep track of the number of dirty buffers held by a vnode. When a bdwrite is done on a buffer, check the existing number of dirty buffers associated with its vnode. If the number rises above vfs.dirtybufthresh (currently 90% of vfs.hidirtybuffers), one of the other (hopefully older) dirty buffers associated with the vnode is written (using bawrite). In the event that this approach fails to curb the growth in it the vnode's number of dirty buffers (due to soft updates rollback dependencies), the more drastic approach of doing a VOP_FSYNC on the vnode is used. This code primarily affects very large and actively written files such as snapshots. This change should eliminate hanging when taking snapshots or doing background fsck on very large filesystems.
Hopefully, one day it will be possible to cache filesystem metadata in the VM cache as is done with file data. As it stands, only the buffer cache can be used which limits total metadata storage to about 20Mb no matter how much memory is available on the system. This rather small memory gets badly thrashed causing a lot of extra I/O. For example, taking a snapshot of a 1Tb filesystem minimally requires about 35,000 write operations, but because of the cache thrashing (we only have about 350 buffers at our disposal) ends up doing about 237,540 I/O's thus taking twenty-five minutes instead of four if it could run entirely in the cache.
Reported by: Attila Nagy <bra@fsn.hu> Sponsored by: DARPA & NAI Labs.
show more ...
|
#
17661e5a |
| 25-Feb-2003 |
Jeff Roberson <jeff@FreeBSD.org> |
- Add an interlock argument to BUF_LOCK and BUF_TIMELOCK. - Remove the buftimelock mutex and acquire the buf's interlock to protect these fields instead. - Hold the vnode interlock while locking
- Add an interlock argument to BUF_LOCK and BUF_TIMELOCK. - Remove the buftimelock mutex and acquire the buf's interlock to protect these fields instead. - Hold the vnode interlock while locking bufs on the clean/dirty queues. This reduces some cases from one BUF_LOCK with a LK_NOWAIT and another BUF_LOCK with a LK_TIMEFAIL to a single lock.
Reviewed by: arch, mckusick
show more ...
|
#
a163d034 |
| 19-Feb-2003 |
Warner Losh <imp@FreeBSD.org> |
Back out M_* changes, per decision of the TRB.
Approved by: trb
|
#
71146186 |
| 16-Feb-2003 |
Jeff Roberson <jeff@FreeBSD.org> |
- Introduce a new function bremfreel() that does a bremfree with the buf queue lock already held. - In getblk() and flushbufqueues() use bremfreel() while we still have the buf queue lock held
- Introduce a new function bremfreel() that does a bremfree with the buf queue lock already held. - In getblk() and flushbufqueues() use bremfreel() while we still have the buf queue lock held to keep the lists consistent. - Add LK_NOWAIT to two cases where we're essentially asserting that the bufs are not locked while acquiring the locks. This will make sure that we get the appropriate panic() and not another one for sleeping with a lock held.
show more ...
|
#
25c43254 |
| 10-Feb-2003 |
Jeff Roberson <jeff@FreeBSD.org> |
- Add a comment about a race that will happen without Giant.
|
#
c7b716cc |
| 10-Feb-2003 |
Jeff Roberson <jeff@FreeBSD.org> |
- Unlock the nblock after the loop in bwillwrite().
|
#
7137d635 |
| 10-Feb-2003 |
Jeff Roberson <jeff@FreeBSD.org> |
- In getnewbuf() unlock the bq lock prior to sleeping when we're out of buffers.
Submitted by: tegge
|
#
3306adcf |
| 09-Feb-2003 |
Jeff Roberson <jeff@FreeBSD.org> |
- Correct another atomic op.
Spotted by: alc
|
#
69953c84 |
| 09-Feb-2003 |
Jeff Roberson <jeff@FreeBSD.org> |
- Move some code out from #ifdef INVARIANTS.
|
#
767b9a52 |
| 09-Feb-2003 |
Jeff Roberson <jeff@FreeBSD.org> |
- Cleanup unlocked accesses to buf flags by introducing a new b_vflag member that is protected by the vnode lock. - Move B_SCANNED into b_vflags and call it BV_SCANNED. - Create a vop_stdfsync()
- Cleanup unlocked accesses to buf flags by introducing a new b_vflag member that is protected by the vnode lock. - Move B_SCANNED into b_vflags and call it BV_SCANNED. - Create a vop_stdfsync() modeled after spec's sync. - Replace spec_fsync, msdos_fsync, and hpfs_fsync with the stdfsync and some fs specific processing. This gives all of these filesystems proper behavior wrt MNT_WAIT/NOWAIT and the use of the B_SCANNED flag. - Annotate the locking in buf.h
show more ...
|
#
15553af7 |
| 09-Feb-2003 |
Jeff Roberson <jeff@FreeBSD.org> |
- spell add 'add' and not 'subtract' in an atomic op.
Spotted by: alc Pointy hat to: jeff
|
#
d85be482 |
| 09-Feb-2003 |
Jeff Roberson <jeff@FreeBSD.org> |
- Lock down the buffer cache's infrastructure code. This includes locks on buf lists, synchronization variables, and atomic ops for the counters. This change does not remove giant from any cod
- Lock down the buffer cache's infrastructure code. This includes locks on buf lists, synchronization variables, and atomic ops for the counters. This change does not remove giant from any code although some pushdown may be possible. - In vfs_bio_awrite() don't access buf fields without the buf lock.
show more ...
|