summaryrefslogtreecommitdiffstats
path: root/sys/kern/vfs_export.c
Commit message (Collapse)AuthorAgeFilesLines
* Back out DIAGNOSTIC changes.eivind1998-02-061-2/+1
|
* 1) Start using a cleaner and more consistant page allocator insteaddyson1998-02-051-5/+6
| | | | | | | | | | | | | | | | | | | | | | | | of the various ad-hoc schemes. 2) When bringing in UPAGES, the pmap code needs to do another vm_page_lookup. 3) When appropriate, set the PG_A or PG_M bits a-priori to both avoid some processor errata, and to minimize redundant processor updating of page tables. 4) Modify pmap_protect so that it can only remove permissions (as it originally supported.) The additional capability is not needed. 5) Streamline read-only to read-write page mappings. 6) For pmap_copy_page, don't enable write mapping for source page. 7) Correct and clean-up pmap_incore. 8) Cluster initial kern_exec pagin. 9) Removal of some minor lint from kern_malloc. 10) Correct some ioopt code. 11) Remove some dead code from the MI swapout routine. 12) Correct vm_object_deallocate (to remove backing_object ref.) 13) Fix dead object handling, that had problems under heavy memory load. 14) Add minor vm_page_lookup improvements. 15) Some pages are not in objects, and make sure that the vm_page.c can properly support such pages. 16) Add some more page deficit handling. 17) Some minor code readability improvements.
* Turn DIAGNOSTIC into a new-style option.eivind1998-02-041-1/+2
|
* Update freevnodes when adding a vnode to the head of the free list.tegge1998-01-311-2/+4
|
* Add better support for larger I/O clusters, including larger physicaldyson1998-01-241-1/+2
| | | | | I/O. The support is not mature yet, and some of the underlying implementation needs help. However, support does exist for IDE devices now.
* VM level code cleanups.dyson1998-01-221-3/+7
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | 1) Start using TSM. Struct procs continue to point to upages structure, after being freed. Struct vmspace continues to point to pte object and kva space for kstack. u_map is now superfluous. 2) vm_map's don't need to be reference counted. They always exist either in the kernel or in a vmspace. The vmspaces are managed by reference counts. 3) Remove the "wired" vm_map nonsense. 4) No need to keep a cache of kernel stack kva's. 5) Get rid of strange looking ++var, and change to var++. 6) Change more data structures to use our "zone" allocator. Added struct proc, struct vmspace and struct vnode. This saves a significant amount of kva space and physical memory. Additionally, this enables TSM for the zone managed memory. 7) Keep ioopt disabled for now. 8) Remove the now bogus "single use" map concept. 9) Use generation counts or id's for data structures residing in TSM, where it allows us to avoid unneeded restart overhead during traversals, where blocking might occur. 10) Account better for memory deficits, so the pageout daemon will be able to make enough memory available (experimental.) 11) Fix some vnode locking problems. (From Tor, I think.) 12) Add a check in ufs_lookup, to avoid lots of unneeded calls to bcmp. (experimental.) 13) Significantly shrink, cleanup, and make slightly faster the vm_fault.c code. Use generation counts, get rid of unneded collpase operations, and clean up the cluster code. 14) Make vm_zone more suitable for TSM. This commit is partially as a result of discussions and contributions from other people, including DG, Tor Egge, PHK, and probably others that I have forgotten to attribute (so let me know, if I forgot.) This is not the infamous, final cleanup of the vnode stuff, but a necessary step. Vnode mgmt should be correct, but things might still change, and there is still some missing stuff (like ioopt, and physical backing of non-merged cache files, debugging of layering concepts.)
* Tie up some loose ends in vnode/object management. Remove an unneededdyson1998-01-171-12/+23
| | | | | | | config option in pmap. Fix a problem with faulting in pages. Clean-up some loose ends in swap pager memory management. The system should be much more stable, but all subtile bugs aren't fixed yet.
* Fix another vnode leak.dyson1998-01-121-2/+4
|
* Fix some vnode management problems, and better mgmt of vnode free list.dyson1998-01-121-8/+51
| | | | | | | | | | | | | | | Fix the UIO optimization code. Fix an assumption in vm_map_insert regarding allocation of swap pagers. Fix an spl problem in the collapse handling in vm_object_deallocate. When pages are freed from vnode objects, and the criteria for putting the associated vnode onto the free list is reached, either put the vnode onto the list, or put it onto an interrupt safe version of the list, for further transfer onto the actual free list. Some minor syntax changes changing pre-decs, pre-incs to post versions. Remove a bogus timeout (that I added for debugging) from vn_lock. PHK will likely still have problems with the vnode list management, and so do I, but it is better than it was.
* Disable io optimizations again, minor bug found, and will be fixed indyson1998-01-071-2/+2
| | | | a few days.
* Make our v_usecount vnode reference count work identically to thedyson1998-01-061-53/+113
| | | | | | | | | | | | | | | | | | | | | | | | | | | 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.
* Add the vnode interlock back around vref.dyson1997-12-291-1/+9
|
* Fix the decl of vfs_ioopt, allow LFS to compile again, fix a minor problemdyson1997-12-291-1/+4
| | | | with the object cache removal.
* Lots of improvements, including restructring the caching and managementdyson1997-12-291-100/+73
| | | | | | | | | | | | | | of vnodes and objects. There are some metadata performance improvements that come along with this. There are also a few prototypes added when the need is noticed. Changes include: 1) Cleaning up vref, vget. 2) Removal of the object cache. 3) Nuke vnode_pager_uncache and friends, because they aren't needed anymore. 4) Correct some missing LK_RETRY's in vn_lock. 5) Correct the page range in the code for msync. Be gentle, and please give me feedback asap.
* Some performance improvements, and code cleanups (including changing ourdyson1997-12-191-1/+5
| | | | expensive OFF_TO_IDX to btoc whenever possible.)
* Add support for poll(2) on files. vop_nopoll() now returns POLLNVALwollman1997-12-151-1/+85
| | | | | | | | | | | | | | | | | | | if one of the new poll types is requested; hopefully this will not break any existing code. (This is done so that programs have a dependable way of determining whether a filesystem supports the extended poll types or not.) The new poll types added are: POLLWRITE - file contents may have been modified POLLNLINK - file was linked, unlinked, or renamed POLLATTRIB - file's attributes may have been changed POLLEXTEND - file was extended Note that the internal operation of poll() means that it is impossible for two processes to reliably poll for the same event (this could be fixed but may not be worth it), so it is not possible to rewrite `tail -f' to use poll at this time.
* Staticized.bde1997-11-221-9/+11
|
* Reviewed by: various.julian1997-11-121-3/+3
| | | | | | | | | | | | | | | | Ever since I first say the way the mount flags were used I've hated the fact that modes, and events, internal and exported, and short-term and long term flags are all thrown together. Finally it's annoyed me enough.. This patch to the entire FreeBSD tree adds a second mount flag word to the mount struct. it is not exported to userspace. I have moved some of the non exported flags over to this word. this means that we now have 8 free bits in the mount flags. There are another two that might well move over, but which I'm not sure about. The only user visible change would have been in pstat -v, except that davidg has disabled it anyhow. I'd still like to move the state flags and the 'command' flags apart from each other.. e.g. MNT_FORCE really doesn't have the same semantics as MNT_RDONLY, but that's left for another day.
* Remove a bunch of variables which were unused both in GENERIC and LINT.phk1997-11-071-2/+3
| | | | Found by: -Wunused
* VFS interior redecoration.phk1997-10-261-197/+1
| | | | | | | | | | | | | Rename vn_default_error to vop_defaultop all over the place. Move vn_bwrite from vfs_bio.c to vfs_default.c and call it vop_stdbwrite. Use vop_null instead of nullop. Move vop_nopoll from vfs_subr.c to vfs_default.c Move vop_sharedlock from vfs_subr.c to vfs_default.c Move vop_nolock from vfs_subr.c to vfs_default.c Move vop_nounlock from vfs_subr.c to vfs_default.c Move vop_noislocked from vfs_subr.c to vfs_default.c Use vop_ebadf instead of *_ebadf. Add vop_defaultop for getpages on master vnode in MFS.
* Last major round (Unless Bruce thinks of somthing :-) of malloc changes.phk1997-10-121-3/+3
| | | | | | | | Distribute all but the most fundamental malloc types. This time I also remembered the trick to making things static: Put "static" in front of them. A couple of finer points by: bde
* Distribute and statizice a lot of the malloc M_* types.phk1997-10-111-1/+3
| | | | Substantial input from: bde
* Dike out a weird warning.phk1997-10-111-1/+3
|
* I lost a bit of my change in the last commit, this is more like it.phk1997-09-261-2/+5
| | | | Noticed by: bde
* Reduce the target number of vnodes on the freelist from desiredvnodesphk1997-09-251-2/+2
| | | | | | | | | | | | | | (usually a couple of thousand) to 25. The measured impact on cache-hits doesn't justify spending memory this way: Target number of free vnodes versus namecache hit rate in % during a make world: 10 98.5316 200 98.5479 500 98.5546 1000 98.5709 3000 98.6006 4000 98.6126
* A couple of handles to tweak, more statistics.phk1997-09-241-4/+8
|
* Fixed gratuitous ANSIisms.bde1997-09-161-8/+16
|
* Provide a 'return true' poll vnode op rather than duplicating thepeter1997-09-141-1/+21
| | | | 'do nothing' case all over the various filesystems.
* print correct function name in a panic (vop_nolock -> vop_sharedlock)peter1997-09-131-2/+2
|
* Removed yet more vestiges of config-time swap configuration and/orbde1997-09-071-3/+2
| | | | cleaned up nearby cruft.
* Removed vestiges of config-time "argument processing" configuration.bde1997-09-071-2/+2
|
* Hmm, this is hopefully better.phk1997-09-031-7/+3
|
* Revert the v_usecount handling in relation to VOP_INACTIVE.phk1997-09-031-7/+2
|
* Removed unused #includes.bde1997-09-021-9/+1
|
* Change the 0xdeadb hack to a flag called VDOOMED.phk1997-08-311-55/+66
| | | | | | | | | | | | | | | | | | | | | Introduce VFREE which indicates that vnode is on freelist. Rename vholdrele() to vdrop(). Create vfree() and vbusy() to add/delete vnode from freelist. Add vfree()/vbusy() to keep (v_holdcnt != 0 || v_usecount != 0) vnodes off the freelist. Generalize vhold()/v_holdcnt to mean "do not recycle". Fix reassignbuf()s lack of use of vhold(). Use vhold() instead of checking v_cache_src list. Remove vtouch(), the vnodes are always vget'ed soon enough after for it to have any measuable effect. Add sysctl debug.freevnodes to keep track of things. Move cache_purge() up in getnewvnodes to avoid race. Decrement v_usecount after VOP_INACTIVE(), put a vhold() on it during VOP_INACTIVE() Unmacroize vhold()/vdrop() Print out VDOOMED and VFREE flags (XXX: should use %b) Reviewed by: dyson
* Restored rev.1.92 which was clobbered by the previous commit.bde1997-08-261-1/+3
|
* Back out some incorrect changes that was worse than the original bug.dyson1997-08-261-21/+16
|
* This is a trial improvement for the vnode reference count while on the vnodedyson1997-08-221-16/+19
| | | | | | free list problem. Also, the vnode age flag is no longer used by the vnode pager. (It is actually incorrect to use then.) Constructive feedback welcome -- just be kind.
* #include <machine/limits.h> explicitly in the few places that it is required.bde1997-08-211-1/+3
|
* Fix all areas of the system (or at least all those in LINT) to avoid storingwollman1997-08-161-3/+3
| | | | | | | | socket addresses in mbufs. (Socket buffers are the one exception.) A number of kernel APIs needed to get fixed in order to make this happen. Also, fix three protocol families which kept PCBs in mbufs to not malloc them instead. Delete some old compatibility cruft while we're at it, and add some new routines in the in_cksum family.
* Fix a problem with the vfs vnode caching that it doesn't grow quicklydyson1997-08-041-16/+21
| | | | | | | | | | enough and can cause some strange performance problems. Specifically, at or near startup time is when the problem is worst. To reproduce the problem, run "lat_syscall stat" from the alpha lmbench code right after bootup. A positive side effect of this mod is that the name cache can be set to grow again by sysctl. A noticable positive performance impact is realized due to a larger namecache being available as needed (or tuned.)
* Merge WebNFS support from NetBSDdfr1997-07-171-1/+93
| | | | Obtained from: NetBSD
* Remove a window during running down a file vnode. Also, the OBJ_DEADdyson1997-06-221-15/+24
| | | | | | flag wasn't being respected during vref(), et. al. Note that this isn't the eventual fix for the locking problem. Fine grained SMP in the VM and VFS code will require (lots) more work.
* Disabled the kern.vnode sysctl variable. It's causing system crashes ondg1997-06-101-1/+8
| | | | large systems and needs to be re-thinked or removed wholesale.
* Fix a race condition that did, after all, exist.phk1997-05-061-3/+5
| | | | | Reviewed by: phk Submitted by: dfr
* 1. Add a {pointer, v_id} pair to the vnode to store the reference to thephk1997-05-041-44/+52
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | ".." vnode. This is cheaper storagewise than keeping it in the namecache, and it makes more sense since it's a 1:1 mapping. 2. Also handle the case of "." more intelligently rather than stuff the namecache with pointless entries. 3. Add two lists to the vnode and hang namecache entries which go from or to this vnode. When cleaning a vnode, delete all namecache entries it invalidates. 4. Never reuse namecache enties, malloc new ones when we need it, free old ones when they die. No longer a hard limit on how many we can have. 5. Remove the upper limit on namelength of namecache entries. 6. Make a global list for negative namecache entries, limit their number to a sysctl'able (debug.ncnegfactor) fraction of the total namecache. Currently the default fraction is 1/16th. (Suggestions for better default wanted!) 7. Assign v_id correctly in the face of 32bit rollover. 8. Remove the LRU list for namecache entries, not needed. Remove the #ifdef NCH_STATISTICS stuff, it's not needed either. 9. Use the vnode freelist as a true LRU list, also for namecache accesses. 10. Reuse vnodes more aggresively but also more selectively, if we can't reuse, malloc a new one. There is no longer a hard limit on their number, they grow to the point where we don't reuse potentially usable vnodes. A vnode will not get recycled if still has pages in core or if it is the source of namecache entries (Yes, this does indeed work :-) "." and ".." are not namecache entries any longer...) 11. Do not overload the v_id field in namecache entries with whiteout information, use a char sized flags field instead, so we can get rid of the vpid and v_id fields from the namecache struct. Since we're linked to the vnodes and purged when they're cleaned, we don't have to check the v_id any more. 12. NFS knew about the limitation on name length in the namecache, it shouldn't and doesn't now. Bugs: The namecache statistics no longer includes the hits for ".." and "." hits. Performance impact: Generally in the +/- 0.5% for "normal" workstations, but I hope this will allow the system to be selftuning over a bigger range of "special" applications. The case where RAM is available but unused for cache because we don't have any vnodes should be gone. Future work: Straighten out the namecache statistics. "desiredvnodes" is still used to (bogusly ?) size hash tables in the filesystems. I have still to find a way to safely free unused vnodes back so their number can shrink when not needed. There is a few uses of the v_id field left in the filesystems, scheduled for demolition at a later time. Maybe a one slot cache for unused namecache entries should be implemented to decrease the malloc/free frequency.
* Staticize an unnecessarily global function: vputrele.dyson1997-04-301-3/+3
| | | | Submitted by: Michael Hancock <michaelh@cet.co.jp>
* copyin the export network mask to the correct variable.peter1997-04-251-2/+2
| | | | Submitted by: Mike Hibler <mike@marker.cs.utah.edu>, PR#3380
* Add a function vop_sharedlock which a copy of vop_nolock without thedfr1997-04-041-2/+73
| | | | | | | implementation #ifdef out. This can be used for now by NFS. As soon as all the other filesystems' locking is fixed, this can go away. Print the vnode address in vprint for easier debugging.
* Use OID_AUTO instead of magic number for the Lite2 sysctl debug.busyprt.bde1997-04-011-5/+4
| | | | | | Removed declaration of vfs_unmountroot() again. Staticized vgonel().
OpenPOWER on IntegriCloud