summaryrefslogtreecommitdiff
path: root/sys/kern/vfs_subr.c
AgeCommit message (Collapse)Author
2009-08-17dd 'show all bufs' to show all the buffers in the systemJasper Lievisse Adriaanse
ok beck@ thib@
2009-08-13add a show all vnodes command, use dlg's nice pool_walk() to accomplishThordur I. Bjornsson
this. ok beck@, dlg@
2009-08-12Namecache revamp.Bob Beck
This eliminates the large single namecache hash table, and implements the name cache as a global lru of entires, and a redblack tree in each vnode. It makes cache_purge actually purge the namecache entries associated with a vnode when a vnode is recycled (very important for later on actually being able to resize the vnode pool) This commit does #if 0 out a bunch of procmap code that was already broken before this change, but needs to be redone completely. Tested by many, including in thib's nfs test setup. ok oga@,art@,thib@,miod@
2009-08-02Dynamic buffer cache support - a re-commit of what was backed outBob Beck
after c2k9 allows buffer cache to be extended and grow/shrink dynamically tested by many, ok oga@, "why not just commit it" deraadt@
2009-06-25backout the buf_acquire() does the bremfree() since all callersThordur I. Bjornsson
where doing bremfree() befure calling buf_acquire(). This is causing us headache pinning down a bug that showed up when deraadt@ too cvs to current, and will have to be done anyway as a preperation for backouts. OK deraadt@
2009-06-15Back out all the buffer cache changes I committed during c2k9. This reverts ↵Bob Beck
three commits: 1) The sysctl allowing bufcachepercent to be changed at boot time. 2) The change moving the buffer cache hash chains to a red-black tree 3) The dynamic buffer cache (Which depended on the earlier too). ok on the backout from marco and todd
2009-06-06All caller of buf_acquire were doing bremfree before the call.Artur Grabowski
Just put it in the buf_acquire function. oga@ ok
2009-06-03Change bufhash from the old grotty hash table to red-black trees hangingBob Beck
off the vnode. ok art@, oga@, miod@
2008-11-10Fix typo in comment, okay jmc@.Pedro Martelletto
2008-11-01change vrele() to return an int. if it returns 0, it can gaurantee thatTheo de Raadt
it did not sleep. this is used to avoid checkdirs() to avoid having to restart the allproc walk every time through idea from tedu, ok thib pedro
2008-07-05re-introduce vdrop() to signal a lost intrest in a vnode;Thordur I. Bjornsson
ok art@
2008-06-14A bunch of pool_get() + bzero() -> pool_get(..., .. | PR_ZERO)Michael Knudsen
conversions that should shave a few bytes off the kernel. ok henning, krw, jsing, oga, miod, and thib (``even though i usually prefer FOO|BAR''; thanks for looking.
2008-06-13back out stupid vnode change that was unintentionally includedBob Beck
with biomem and art has no idea how it got there. ok art@ thib@
2008-06-12Bring biomem diff back into the tree after the nfs_bio.c fix went in.Theo de Raadt
ok thib beck art
2008-06-11back out biomem diff since it is not right yet. Doing very largeTheo de Raadt
file copies to nfsv2 causes the system to eventually peg the console. On the console ^T indicates that the load is increasing rapidly, ddb indicates many calls to getbuf, there is some very slow nfs traffic making none (or extremely slow) progress. Eventually some machines seize up entirely.
2008-06-10Buffer cache revampBob Beck
1) remove multiple size queues, introduced as a stopgap. 2) decouple pages containing data from their mappings 3) only keep buffers mapped when they actually have to be mapped (right now, this is when buffers are B_BUSY) 4) New functions to make a buffer busy, and release the busy flag (buf_acquire and buf_release) 5) Move high/low water marks and statistics counters into a structure 6) Add a sysctl to retrieve buffer cache statistics Tested in several variants and beat upon by bob and art for a year. run accidentally on henning's nfs server for a few months... ok deraadt@, krw@, art@ - who promises to be around to deal with any fallout
2008-06-09Update access(2) to have modern semantics with respect to X_OK andTodd C. Miller
the superuser. access(2) will now only indicate success for X_OK on non-directories if there is at least one execute bit set on the file. OK deraadt@ thib@ otto@
2008-05-07remove the vfc_mountroot member from vfsconf andThordur I. Bjornsson
do appropriate cleanup; OK deraadt@
2008-05-07Implement routing priorities. Every route inserted has a priority assignedClaudio Jeker
and the one route with the lowest number wins. This will be used by the routing daemons to resolve the synchronisations issue in case of conflicts. The nasty bits of this are in the multipath code. If no priority is specified the kernel will choose an appropriate priority. Looked at by a few people at n2k8 code is much older
2008-05-06retire vfs_mountroot();Thordur I. Bjornsson
setroot() is now (and has been) responsible for setting the mountroot function pointer "to the right thing", or failing todo that, to ffs_mountroot; based on a discussion/diff from deraadt@. OK deraadt@
2008-03-23Wrong printf construct.Miod Vallat
2008-03-16Widen some struct statfs fields to support large filesystem stataOtto Moerbeek
and add some to be able to support statvfs(2). Do the compat dance to provide backward compatibility. ok thib@ miod@
2007-12-13replace calls to ltsleep with tsleepBret Lambert
remove PNORELOCK flag, as PNORELOCK is used for msleep ok art@ thib@
2007-11-16er, the newline is wrong. dissapointing.Theo de Raadt
2007-11-15newline before syncing disks is way prettierTheo de Raadt
2007-10-29MALLOC/FREE -> malloc/freeCharles Longeau
replace an hard coded value with M_WAITOK ok krw@
2007-09-15Allow to pull out an usb stick with ffs filesystem while mountedAlexander Bluhm
and a file is written onto the stick. Without these fixes the machine panics or hangs. The usb fix calls the callback when the stick is pulled out to free the associated buffers. Otherwise we have busy buffers for ever and the automatic unmount will panic. The change in the scsi layer prevents passing down further dirty buffers to usb after the stick has been deactivated. In vfs the automatic unmount has moved from the function vgonel() to vop_generic_revoke(). Both are called when the sd device's vnode is removed. In vgonel() the VXLOCK is already held which can cause a deadlock. So call dounmount() earlier. ok krw@, I like this marco@, tested by ian@
2007-09-07Use M_ZERO in a few more places to shave bytes from the kernel.Artur Grabowski
eyeballed and ok dlg@
2007-08-07 A few changes to deal with multi-user performance issues seen. thisBob Beck
brings us back roughly to 4.1 level performance, although this is still far from optimal as we have seen in a number of cases. This change 1) puts a lower bound on buffer cache queues to prevent starvation 2) fixes the code which looks for a buffer to recycle 3) reduces the number of vnodes back to 4.1 levels to avoid complex performance issues better addressed after 4.2 ok art@ deraadt@, tested by many
2007-06-01decouple the allocated number of vnodes from the "desiredvnodes" variableBob Beck
which is used to size a zillion other things that increasing excessively has been shown to cause problems - so that we may incrementally look at increasing those other things without making the kernel unusable. This diff effectivly increases the number of vnodes back to the number of buffers, as in the earlier dynamic buffer cache commits, without increasing anything else (namecache, softdeps, etc. etc.) ok pedro@ tedu@ art@ thib@
2007-05-31remove some silly casts, no real changeTed Unangst
2007-05-31NFSv2 cannot cope with a big number of vnodes, so revert to NPROC-basedPedro Martelletto
calculation until the problem is fixed, okay beck@ art@
2007-05-30back out vfs change - todd fries has seen afs issues, and I'm suspiciousBob Beck
this can cause other problems.
2007-05-29 Step one of some vnode improvements - change getnewvnode toBob Beck
actually allocate "desiredvnodes" - add a vdrop to un-hold a vnode held with vhold, and change the name cache to make use of vhold/vdrop, while keeping track of which vnodes are referred to by which cache entries to correctly hold/drop vnodes when the cache uses them. ok thib@, tedu@, art@
2007-05-28de-inline vref();Thordur I. Bjornsson
ok pedro@
2007-05-26Dynamic buffer cache. Initial diff from mickey@, okay art@ beck@ toby@Pedro Martelletto
deraadt@ dlg@.
2007-05-26Nuke a bunch of simpelocks and associated goo.Thordur I. Bjornsson
ok art@
2007-05-17Collapse struct v_selectinfo in struct vnode, remove theThordur I. Bjornsson
simplelock and reuse the name for the selinfo member. Clean-up accordingly. ok tedu@,art@
2007-05-09kinfo_vgetfailed has not been used for > 8 yearsTheo de Raadt
2007-04-13Move the declaration of VN_KNOTE() into vnode.h instead of havingThordur I. Bjornsson
multiple defines all over; ok tedu@
2007-04-13Remove comments talking about vnode interlock. No binary change.Alexander Bluhm
ok thib
2007-04-11Remove the simplelock argument from vrecycle();Thordur I. Bjornsson
ok pedro@, sturm@
2007-03-21Remove the v_interlock simplelock from the vnode structure.Thordur I. Bjornsson
Zap all calls to simple_lock/unlock() on it (those calls are #defined away though). Remove the LK_INTERLOCK from the calls to vn_lock() and cleanup the filesystems wich implement VOP_LOCK(). (by remvoing the v_interlock from there calls to lockmgr()). ok pedro@, art@, tedu@
2007-03-12better desiredvnodes not based on maxusers; pedro@ deraadt@ okMichael Shalayeff
2007-02-20for vfsconf sysctl, do not leak kernel sensors out to userlandTheo de Raadt
ok art thib
2007-02-17fix ddb buf printing for daddr_t growth to 64bit;Michael Shalayeff
from juan hernandez gonzalez; tested by bluhm@
2007-02-14Consistently spell FALLTHROUGH to appease lint.Jonathan Gray
ok kettenis@ cloder@ tom@ henning@
2007-02-13fix ddb buf printMichael Shalayeff
2006-11-20vprint() should be defined if DIAGNOSTIC || DEBUG. Noticed by (andTom Cosgrove
original diff from) Jake < antipsychic (at) hotmail.com >. Discussed with Mickey and Miod. ok miod@ pedro@
2006-10-30use vp->v_type to index into vtypes rather then vp->v_tag,Thordur I. Bjornsson
fixing odd output in the 'show vnode' ddb code. ok mickey@