summaryrefslogtreecommitdiffstats
path: root/sys/kern/vfs_cluster.c
Commit message (Collapse)AuthorAgeFilesLines
...
* Make our v_usecount vnode reference count work identically to thedyson1998-01-061-6/+13
| | | | | | | | | | | | | | | | | | | | | | | | | | | original BSD code. The association between the vnode and the vm_object no longer includes reference counts. The major difference is that vm_object's are no longer freed gratuitiously from the vnode, and so once an object is created for the vnode, it will last as long as the vnode does. When a vnode object reference count is incremented, then the underlying vnode reference count is incremented also. The two "objects" are now more intimately related, and so the interactions are now much less complex. When vnodes are now normally placed onto the free queue with an object still attached. The rundown of the object happens at vnode rundown time, and happens with exactly the same filesystem semantics of the original VFS code. There is absolutely no need for vnode_pager_uncache and other travesties like that anymore. A side-effect of these changes is that SMP locking should be much simpler, the I/O copyin/copyout optimizations work, NFS should be more ponderable, and further work on layered filesystems should be less frustrating, because of the totally coherent management of the vnode objects and vnodes. Please be careful with your system while running this code, but I would greatly appreciate feedback as soon a reasonably possible.
* Remove a bunch of variables which were unused both in GENERIC and LINT.phk1997-11-071-2/+2
| | | | Found by: -Wunused
* Removed unused #includes.bde1997-08-021-5/+1
|
* Fix a problem with the VN device. Specifically, the VN device candyson1997-06-151-1/+2
| | | | | | | | | | cause a problem of spiraling death due to buffer resource limitations. The vfs_bio code in general had little ability to handle buffer resource management, and now it does. Also, there are a lot more knobs for tuning the vfs_bio code now. The knobs came free because of the need that there always be some immediately available buffers (non-delayed or locked) for use. Note that the buffer cache code is much less likely to get bogged down with lots of delayed writes, even more so than before.
* Don't zero b_dirtyoff and b_dirtyend on error.dfr1997-04-251-3/+3
| | | | Submitted by: Hidetoshi Shimokawa <simokawa@sat.t.u-tokyo.ac.jp>
* Don't allow partial buffers to be cluster-comitted.dfr1997-04-181-1/+2
| | | | | | | Zero the b_dirty{off,end} after cluster-comitting a group of buffers. With these fixes, I was able to complete a 'make world' with remote src and obj directories.
* Use OID_AUTO instead of magic number for the old sysctl debug.rcluster.bde1997-04-011-16/+3
| | | | | | | | The magic number conflicted with the rotting disabled one in ext2fs for debug.doasyncfree. Removed messy debugging variable/constant/sysctl debug.doreallocblks. Lite2 removed it, and we don't use the code that it controls.
* Remove unnecessary check for vp->v_mount being null. Pointeddyson1997-03-071-2/+2
| | | | out by BDE.
* Back out part 1 of the MCFH that changed $Id$ to $FreeBSD$. We are notpeter1997-02-221-1/+1
| | | | ready for it yet.
* Make the long-awaited change from $Id$ to $FreeBSD$jkh1997-01-141-1/+1
| | | | | | | | This will make a number of things easier in the future, as well as (finally!) avoiding the Id-smashing problem which has plagued developers for so long. Boy, I'm glad we're not using sup anymore. This update would have been insane otherwise.
* This commit is the embodiment of some VFS read clustering improvements.dyson1996-12-291-127/+181
| | | | | | | | | | | | Firstly, now our read-ahead clustering is on a file descriptor basis and not on a per-vnode basis. This will allow multiple processes reading the same file to take advantage of read-ahead clustering. Secondly, there previously was a problem with large reads still using the ramp-up algorithm. Of course, that was bogus, and now we read the entire "chunk" off of the disk in one operation. The read-ahead clustering algorithm should use less CPU than the previous also (I hope :-)). NOTE: THAT LKMS MUST BE REBUILT!!!
* Implement a new totally dynamic (up to MAXPHYS) buffer kva allocationdyson1996-11-301-1/+9
| | | | | | | | | | | | | | | scheme. Additionally, add the capability for checking for unexpected kernel page faults. The maximum amount of kva space for buffers hasn't been decreased from where it is, but it will now be possible to do so. This scheme manages the kva space similar to the buffers themselves. If there isn't enough kva space because of usage or fragementation, buffers will be reclaimed until a buffer allocation is successful. This scheme should be very resistant to fragmentation problems until/if the LFS code is fixed and uses the bogus buffer locking scheme -- but a 'fixed' LFS is not likely to use such a scheme. Now there should be NO problem allocating buffers up to MAXPHYS.
* Fix 4 problems:dyson1996-10-061-4/+10
| | | | | | | | | | | Major: When blocking occurs in allocbuf() for VMIO files, excess wire counts could accumulate. Major: Pages are incorrectly accumulated into the physical buffer for clustered reads. This happens when bogus page is needed. Minor: When reclaiming buffers, the async flag on the buffer needs to be zero, or the reclaim is not optimal. Minor: The age flag should be cleared, if a buffer is wanted.
* Modification to vfs_cluster to allow clustering of NFS delayed writes.dyson1996-07-271-3/+14
| | | | Submitted by: Doug Rabson <dfr@render.com>
* Fix an error when B_MALLOC buffers are returned from the cluster readdyson1996-06-031-3/+4
| | | | | | code without the B_READ flag being set. This is a problem when the data is not cached, and the result will be a bogus attempted write. Submitted by: Kato Takenori <kato@eclogite.eps.nagoya-u.ac.jp>
* 1) Fix a bug that a buffer is removed from a queue, but thedyson1996-03-021-3/+3
| | | | | | | | | | | | | | | queue type is not set to QUEUE_NONE. This appears to have caused a hang bug that has been lurking. 2) Fix bugs that brelse'ing locked buffers do not "free" them, but the code assumes so. This can cause hangs when LFS is used. 3) Use malloced memory for directories when applicable. The amount of malloced memory is seriously limited, but should decrease the amount of memory used by an average directory to 1/4 - 1/2 previous. This capability is fully tunable. (Note that there is no config parameter, and might never be.) 4) Bias slightly the buffer cache usage towards non-VMIO buffers. Since the data in VMIO buffers is not lost when the buffer is reclaimed, this will help performance. This is adjustable also.
* An earlier modification had decreased CPU usage, but alsodyson1996-01-281-4/+4
| | | | decreased performance. This essentially undoes that change.
* Previous commit to vfs_cluster accidentally disabled read-ahead. Problemdyson1996-01-201-1/+2
| | | | | fixed by initializing "alreadyincore" to 0 in the case of sequential reads.
* Eliminated many redundant vm_map_lookup operations for vm_mmap.dyson1996-01-191-31/+26
| | | | | | | | | | | | | | | | | | | | | | | | | Speed up for vfs_bio -- addition of a routine bqrelse to greatly diminish overhead for merged cache. Efficiency improvement for vfs_cluster. It used to do alot of redundant calls to cluster_rbuild. Correct the ordering for vrele of .text and release of credentials. Use the selective tlb update for 486/586/P6. Numerous fixes to the size of objects allocated for files. Additionally, fixes in the various pagers. Fixes for proper positioning of vnode_pager_setsize in msdosfs and ext2fs. Fixes in the swap pager for exhausted resources. The pageout code will not as readily thrash. Change the page queue flags (PG_ACTIVE, PG_INACTIVE, PG_FREE, PG_CACHE) into page queue indices (PQ_ACTIVE, PQ_INACTIVE, PQ_FREE, PQ_CACHE), thereby improving efficiency of several routines. Eliminate even more unnecessary vm_page_protect operations. Significantly speed up process forks. Make vm_object_page_clean more efficient, thereby eliminating the pause that happens every 30seconds. Make sequential clustered writes B_ASYNC instead of B_DELWRI even in the case of filesystems mounted async. Fix a panic with busy pages when write clustering is done for non-VMIO buffers.
* Fixed bugs and finished staticization for things inside `#ifdef DEBUG'.bde1995-12-221-20/+22
| | | | | Moved most of these things inside `#ifdef notyet_block_reallocation_enabled' where they may never be used again.
* Changes to support 1Tb filesizes. Pages are now named by andyson1995-12-111-105/+112
| | | | (object,index) pair instead of (object,offset) pair.
* Untangled the vm.h include file spaghetti.dg1995-12-071-1/+3
|
* Yet another small block FS bug fix.dyson1995-11-201-2/+2
|
* Fix more clustering bugs for FSes with block sizes < PAGE_SIZE.dyson1995-11-201-6/+2
|
* Changed an incorrect splhigh to splbio.dyson1995-11-191-2/+2
|
* General fixes to the vfs clustring code:dyson1995-11-191-115/+77
| | | | | | | | | | | 1) Make cluster buffer list be a non-malloced chain. This eliminates yet another 'evil' M_WAITOK and generally cleans up the code. 2) Fix write clustering for ext2fs. It was just broken. Also, ffs clustering had an efficiency problem that more bawrites were happening than should have been. 3) Make changes to buf.h to support the above, plus remove b_pfcent at the request of David Greenman. Reviewed by: davidg (partially)
* Change some of the debug sysctl vars. The semantics of these will change.phk1995-11-141-2/+2
|
* Second batch of cleanup changes.phk1995-10-291-5/+1
| | | | | This time mostly making a lot of things static and some unused variables here and there.
* Work-around a problem in the clustering code on non-VMIO buffers. Thedyson1995-10-091-2/+3
| | | | | write-side needs rewriting, but this makes a ktrace panic go away for now.
* These changes fix a bug in the clustering code that I made worse when addingdyson1995-09-231-6/+15
| | | | | | | | | | | support for EXT2FS. Note that the Sig-11 problems appear to be caused by this, but there is still probably an underlying VM problem that let this clustering bug cause vnode objects to appear to be corrupted. The direct manifestation of this bug would have been severely mis-read files. It is possible that processes would Sig-11 on very damaged input files and might explain the mysterious differences in system behaviour when phk's malloc is being used.
* Added VOP_GETPAGES/VOP_PUTPAGES and also the "backwards" block countdyson1995-09-041-3/+3
| | | | for VOP_BMAP. Updated affected filesystems...
* VOP_BMAP will eventually need an additional argument, but not yet. Thisdyson1995-09-031-3/+3
| | | | | backs out that modification to minimize the window during which this is not yet correct.
* Improvements to the cluster code, minor vfs_bio efficiency:dyson1995-09-031-84/+163
| | | | | | | | | Better performance -- more aggressive read-ahead under certain circumstanses. Mods to support clustering on small ( < PAGE_SIZE) block size filesystems (e.g. ext2fs, msdosfs.)
* Don't include vm_pageout.h.dg1995-06-281-2/+1
|
* Remove trailing whitespace.rgrimes1995-05-301-3/+3
|
* Check for case of blkno already known to avoid unnecessary VOP_BMAP's.dg1995-04-041-1/+2
| | | | Submitted by: John Dyson
* Fix from Doug Rabson: Don't try to release a pbuf we didn't get.dg1995-03-191-4/+5
| | | | Minor style change by me.
* Add and move declarations to fix all of the warnings from `gcc -Wimplicit'bde1995-03-161-4/+3
| | | | | | (except in netccitt, netiso and netns) and most of the warnings from `gcc -Wnested-externs'. Fix all the bugs found. There were no serious ones.
* Removed obsolete vtrace() remnants.dg1995-03-041-2/+1
|
* Don't try to cluster busy buffers.dg1995-03-021-16/+35
| | | | Submitted by: John Dyson
* vfs_cluster.c:dg1995-02-221-17/+18
| | | | | | | | | Various more tweaks from John Dyson to improve read ahead calculations. vfs_subr.c: Only wakeup if numoutput is 0 in vwakeup(). Submitted by: John Dyson
* Fixed a variety of deadlock and panic bugs, removed the bypass code, anddg1995-01-241-11/+28
| | | | | | | | implemented the ability to limit bufferspace by memory consumed. (vfs_bio.c) Fixed recently introduced bugs that caused extra I/O to happen in some cases. (vfs_cluster.c) Submitted by: John Dyson
* These changes embody the support of the fully coherent merged VM buffer cache,dg1995-01-091-387/+264
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | much higher filesystem I/O performance, and much better paging performance. It represents the culmination of over 6 months of R&D. The majority of the merged VM/cache work is by John Dyson. The following highlights the most significant changes. Additionally, there are (mostly minor) changes to the various filesystem modules (nfs, msdosfs, etc) to support the new VM/buffer scheme. vfs_bio.c: Significant rewrite of most of vfs_bio to support the merged VM buffer cache scheme. The scheme is almost fully compatible with the old filesystem interface. Significant improvement in the number of opportunities for write clustering. vfs_cluster.c, vfs_subr.c Upgrade and performance enhancements in vfs layer code to support merged VM/buffer cache. Fixup of vfs_cluster to eliminate the bogus pagemove stuff. vm_object.c: Yet more improvements in the collapse code. Elimination of some windows that can cause list corruption. vm_pageout.c: Fixed it, it really works better now. Somehow in 2.0, some "enhancements" broke the code. This code has been reworked from the ground-up. vm_fault.c, vm_page.c, pmap.c, vm_object.c Support for small-block filesystems with merged VM/buffer cache scheme. pmap.c vm_map.c Dynamic kernel VM size, now we dont have to pre-allocate excessive numbers of kernel PTs. vm_glue.c Much simpler and more effective swapping code. No more gratuitous swapping. proc.h Fixed the problem that the p_lock flag was not being cleared on a fork. swap_pager.c, vnode_pager.c Removal of old vfs_bio cruft to support the past pseudo-coherency. Now the code doesn't need it anymore. machdep.c Changes to better support the parameter values for the merged VM/buffer cache scheme. machdep.c, kern_exec.c, vm_glue.c Implemented a seperate submap for temporary exec string space and another one to contain process upages. This eliminates all map fragmentation problems that previously existed. ffs_inode.c, ufs_inode.c, ufs_readwrite.c Changes for merged VM/buffer cache. Add "bypass" support for sneaking in on busy buffers. Submitted by: John Dyson and David Greenman
* Fix possible off by one in b_save allocation size.dg1994-12-181-2/+2
|
* Cosmetics: added ()'s and fixed prinf-formats to make gcc silent.phk1994-10-081-6/+6
|
* Temporarily (?) disable block reallocation until either the real bug isdg1994-09-241-3/+3
| | | | found or we throw out the vfs cluster code entirely.
* Changed B_AGE policy to work correctly in a world with relatively largedg1994-08-081-2/+2
| | | | buffer caches. The old policy generally ended up caching nothing.
* Added $Id$dg1994-08-021-0/+1
|
* The big 4.4BSD Lite to FreeBSD 2.0.0 (Development) patch.rgrimes1994-05-251-1/+2
| | | | | Reviewed by: Rodney W. Grimes Submitted by: John Dyson and David Greenman
* BSD 4.4 Lite Kernel Sourcesrgrimes1994-05-241-0/+746
OpenPOWER on IntegriCloud