summaryrefslogtreecommitdiffstats
path: root/sys/uvm/uvm_vnode.c (follow)
Commit message (Collapse)AuthorAgeFilesLines
...
* Backout all changes to uvm after pmemrange (which will be backed outoga2009-06-161-6/+51
| | | | | | | | | | | | | | | | | | | | | | | | | | separately). a change at or just before the hackathon has either exposed or added a very very nasty memory corruption bug that is giving us hell right now. So in the interest of kernel stability these diffs are being backed out until such a time as that corruption bug has been found and squashed, then the ones that are proven good may slowly return. a quick hitlist of the main commits this backs out: mine: uvm_objwire the lock change in uvm_swap.c using trees for uvm objects instead of the hash removing the pgo_releasepg callback. art@'s: putting pmap_page_protect(VM_PROT_NONE) in uvm_pagedeactivate() since all callers called that just prior anyway. ok beck@, ariane@. prompted by deraadt@.
* Since all callers of uvm_pagedeactivate did pmap_page_protect(.., VM_PROT_NONE)art2009-06-061-3/+1
| | | | | | just move that into uvm_pagedeactivate. oga@ ok
* Instead of the global hash table with the terrible hashfunction and aoga2009-06-021-8/+4
| | | | | | | | | global lock, switch the uvm object pages to being kept in a per-object RB_TREE. Right now this is approximately the same speed, but cleaner. When biglock usage is reduced this will improve concurrency due to lock contention.. ok beck@ art@. Thanks to jasper for the speed testing.
* Since we've now cleared up a lot of the PG_RELEASED setting, remove theoga2009-06-011-42/+3
| | | | | | | | pgo_releasepg() hook and just free the page the "normal" way in the one place we'll ever see PG_RELEASED and should care (uvm_page_unbusy, called in aiodoned). ok art@, beck@, thib@
* physmem allocator: change the view of free memory from single free pagesariane2009-06-011-2/+2
| | | | | | | | | to free ranges. Classify memory based on region with associated use-counter (which is used to construct a priority list of where to allocate memory). Based on code from tedu@, help from many. Ok art@
* More PG_RELEASED cleaning.oga2009-05-231-253/+81
| | | | | | | | | | | | | | | similar to the aobj.c changes, this one does vnodes. Vnodes are more complex because they actaully have to sync to backing store. So firstly, convert sync to sleep instead of setting released. Now, for backing store, in the PGO_FREE case, if we set PG_RELEASED *before* an async io, (nothing else will see it, the page is busy), then we can ignore the page after the io is done. We could do something similar for PGO_DEACTIVATE too, but that is another change. On error we just clear the released flag, nothing else sets it for uobj pages other than aiodoned. ok thib@, beck@, ariane@
* Oops, this comment change should not have been commited. What itoga2009-04-141-5/+1
| | | | addresses is another diff.
* The use of uvm.pagedaemon_lock is incredibly inconsistent. only aoga2009-04-141-1/+5
| | | | | | | | | | | | | | fraction of the wakeups and sleeps involved here actually grab that lock. The remainder, on the other hand, always have the fpageq_lock locked. So, make this locking correct by switching the other users over to fpageq_lock, too. This would probably be better off being a semaphore, but for now at least it's correct. "ok, unless you want to implement semaphores" art@
* Convert the page queue lock to a mutex instead of a simplelock.oga2009-04-131-2/+5
| | | | | | | | Fix up the one case of lock recursion (which blatantly ignored the comment right above it saying that we don't need to lock). The rest of the lock usage has been checked and appears to be correct. ok ariane@.
* In the unlikely even that we do the final unref on a uvm_vnode objectoga2009-04-051-1/+3
| | | | | | | | | | | | | while there's io pending (async io makes that possible, but not often hit), then we'll be waiting for the pgo_releasepg hook to free the object when all of our pages disappear. However, uvn_releasepg, while it does everything else that unreferencing the object would do, it neglects to do the final vrele() on the vnode. So in this rare situation we'd end up with the vnode waiting around until it was forcibly recycled. Fix this by adding in the missing vrele(). ok thib@
* While working on some stuff in uvm I've gotten REALLY sick of readingoga2009-03-201-55/+24
| | | | | | | K&R function declarations, so switch them all over to ansi-style, in accordance with the prophesy. "go for it" art@
* uvn_attach message is purely diagnostic, not neededderaadt2008-10-061-3/+1
| | | | no ok's from anyone because they are all slacking
* instead of inspecting the vnode op's to figure out ifthib2007-09-171-29/+6
| | | | | | | | vnode locking actually works, just check the VLOCKSWORK flag. Also, change this ifdef DEBUG to VFSDEBUG since VLOCKSWORK is only ever set if VFSDEBUG is defined. ok/input miod@, art@ (earlier diff)
* simplify uvm_vnp_sync() by removing some simplelock goo.thib2007-08-311-43/+11
| | | | | | some comment cleanup and a touch of KNF. ok art@
* use six new macros to access & store the 48-bit disklabel fields relatedderaadt2007-06-051-2/+2
| | | | | to size. tested on almost all machines, double checked by miod and krw next comes the type handling surrounding these values
* Kill some simplelock goo that annoyed me while reading.thib2007-05-291-21/+4
| | | | ok art@
* remove statictedu2007-04-141-21/+21
| | | | ok beck miod pedro thib
* While splitting flags and pqflags might have been a good idea in theoryart2007-04-131-18/+27
| | | | | | | | | | | | to separate locking, on most modern machines this is not enough since operations on short types touch other short types that share the same word in memory. Merge pg_flags and pqflags again and now use atomic operations to change the flags. Also bump wire_count to an int and pg_version might go int as well, just for alignment. tested by many, many. ok miod@
* Mechanically rename the "flags" and "version" fields in struct vm_pageart2007-04-041-32/+32
| | | | | | | | | | to "pg_flags" and "pg_version", so that they are a bit easier to work with. Whoever uses generic names like this for a popular struct obviously doesn't read much code. Most architectures compile and there are no functionality changes. deraadt@ ok ("if something fails to compile, we fix that by hand")
* Remove references to KERN_SUCCESS, okay miod@pedro2007-03-251-3/+2
|
* fix uvmhist #2: args are always u_long so fix missing %d and %x and no %ll; no change for normal codemickey2006-07-311-11/+11
|
* fix fmts for UVMHIST_LOG() entries making it more useful on 64bit archs; miod@ okmickey2006-07-261-8/+8
|
* Make uvn_sync_lock a rwlock, okay thib@ tedu@pedro2006-06-101-5/+6
|
* Remove unnecessary lockmgr() archaism that was costing too much in termspedro2005-11-191-3/+3
| | | | | | of panics and bugfixes. Access curproc directly, do not expect a process pointer as an argument. Should fix many "process context required" bugs. Incentive and okay millert@, okay marc@. Various testing, thanks.
* Use list and queue macros where applicable to make the code easier to read;miod2004-12-261-17/+14
| | | | no change in compiler assembly output.
* In printf %p doesn't need extra ``0x''grange2004-06-061-2/+2
|
* Fix compile with NFS but not FIFO.henric2003-06-121-1/+5
| | | | ok deraadt@
* Use queue.h macrosjason2002-11-191-2/+2
|
* kill annoying trailing spaces (in hope it fixes /0 for me)mickey2002-09-111-84/+84
|
* Don't set LK_RETRY to vn_lock with LK_RECURSEFAIL.art2002-03-171-2/+2
|
* First round of __P removal in sysmillert2002-03-141-19/+19
|
* UBC was a disaster. It worked very good when it worked, but on someart2001-12-191-368/+1354
| | | | | | | | | machines or some configurations or in some phase of the moon (we actually don't know when or why) files disappeared. Since we've not been able to track down the problem in two weeks intense debugging and we need -current to be stable, back out everything to a state it had before UBC. We apologise for the inconvenience.
* Merge in struct uvm_vnode into struct vnode.art2001-12-101-35/+33
|
* Keep track of how many pages a vnode hold with vhold and vholdreleart2001-12-061-1/+5
| | | | | | | | | so that we can get back the old behavior where a vnode with cached data is less likely to be recycled than a vnode without cached data. XXX - This is a brute-force solution - we do it where uvmexp.vnodepages are changed, I am not really sure it is correct but people have been very happy with the diff so far and want this in the tree.
* Yet another sync to NetBSD uvm.art2001-12-041-8/+3
| | | | | | Today we add a pmap argument to pmap_update() and allocate map entries for kernel_map from kmem_map instead of using the static entries. This should get rid of MAX_KMAPENT panics. Also some uvm_loan problems are fixed.
* VOP_GETPAGES expects the vnode locked. Make it so.art2001-12-021-6/+14
| | | | | Note that VOP_PUTPAGES has the same problems, but the fix will be more complicated.
* Sync in more uvm from NetBSD. Mostly just cosmetic stuff.art2001-11-281-30/+31
| | | | Contains also support for page coloring.
* Sync in more uvm changes from NetBSD.art2001-11-281-44/+18
| | | | | This time we're getting rid of KERN_* and VM_PAGER_* error codes and use errnos instead.
* Merge in the unified buffer cache code as found in NetBSD 2001/03/10. Theart2001-11-271-1284/+318
| | | | | | | code is written mostly by Chuck Silvers <chuq@chuq.com>/<chs@netbsd.org>. Tested for the past few weeks by many developers, should be in a pretty stable state, but will require optimizations and additional cleanups.
* Merge in some parts of the ubc work that has been done in NetBSD that are notart2001-11-101-3/+3
| | | | | | | | | | UBC, but prerequsites for it. - Create a daemon that processes async I/O (swap and paging in the future) requests that need processing in process context and that were processed in the pagedaemon before. - Convert some ugly ifdef DIAGNOSTIC code to less intrusive KASSERTs. - misc other cleanups.
* Another sync of uvm to NetBSD. Just minor fiddling, no major changes.art2001-11-071-34/+8
|
* Move the last content from vm/ to uvm/art2001-11-061-4/+2
| | | | | | | The only thing left in vm/ are just dumb wrappers. vm/vm.h includes uvm/uvm_extern.h vm/pmap.h includes uvm/uvm_pmap.h vm/vm_page.h includes uvm/uvm_page.h
* Minor sync to NetBSD.art2001-11-051-3/+2
|
* Don't include <vm/vm_kern.h> if you don't need foo_map.miod2001-09-111-2/+1
|
* use %ll instead of %qderaadt2001-09-051-2/+2
|
* Various random fixes from NetBSD.art2001-08-111-10/+11
| | | | Including support for zeroing pages in the idle loop (not enabled yet).
* Add a new type voff_t (right now it's typedefed as off_t) used for offsetsart2001-08-061-48/+34
| | | | | | | | into objects. Gives the possibilty to mmap beyond the size of vaddr_t. From NetBSD.
* minor sync to NetBSD.art2001-07-311-5/+2
|
* Change some annoying DIAGNOSTIC printfs to DEBUG.art2001-07-181-8/+9
| | | | From NetBSD.
* Get rid of the PMAP_NEW option by making it mandatory for all archs.art2001-07-181-17/+12
| | | | | The archs that didn't have a proper PMAP_NEW now have a dummy implementation with wrappers around the old functions.