summaryrefslogtreecommitdiffstats
path: root/sys/vm/vm_pager.c
Commit message (Collapse)AuthorAgeFilesLines
* Normalize a significant number of kernel malloc type names:rwatson2005-10-311-1/+1
| | | | | | | | | | | | | | | | | | | - Prefer '_' to ' ', as it results in more easily parsed results in memory monitoring tools such as vmstat. - Remove punctuation that is incompatible with using memory type names as file names, such as '/' characters. - Disambiguate some collisions by adding subsystem prefixes to some memory types. - Generally prefer lower case to upper case. - If the same type is defined in multiple architecture directories, attempt to use the same name in additional cases. Not all instances were caught in this change, so more work is required to finish this conversion. Similar changes are required for UMA zone names.
* Do not use vm_pager_init() to initialize vnode_pbuf_freecnt variable.kan2005-08-131-0/+1
| | | | | | | | | | | vm_pager_init() is run before required nswbuf variable has been set to correct value. This caused system to run with single pbuf available for vnode_pager. Handle both cluster_pbuf_freecnt and vnode_pbuf_freecnt variable in the same way. Reported by: ade Obtained from: alc MFC after: 2 days
* Remove calls to spl*().alc2005-05-181-11/+0
|
* Make npages static and const.phk2005-02-101-1/+1
|
* /* -> /*- for license, minor formatting changesimp2005-01-071-1/+1
|
* Add pbgetbo()/pbrelbo() lighter weight versions of pbgetvp()/pbrelvp().phk2004-11-151-0/+42
|
* More kasserts.phk2004-11-151-1/+6
|
* style polishing.phk2004-11-151-7/+3
|
* Move pbgetvp() and pbrelvp() to vm_pager.c with the rest of the pbuf stuff.phk2004-11-151-0/+44
|
* expect the caller to have called pbrelvp() if necessary.phk2004-11-151-3/+0
|
* Retire b_magic now, we have the bufobj containing the same hint.phk2004-11-041-1/+0
|
* Move the buffer method vector (buf->b_op) to the bufobj.phk2004-10-241-1/+0
| | | | | | | | | | | | | | | | | Extend it with a strategy method. Add bufstrategy() which do the usual VOP_SPECSTRATEGY/VOP_STRATEGY song and dance. Rename ibwrite to bufwrite(). Move the two NFS buf_ops to more sensible places, add bufstrategy to them. Add inlines for bwrite() and bstrategy() which calls through buf->b_bufobj->b_ops->b_{write,strategy}(). Replace almost all VOP_STRATEGY()/VOP_SPECSTRATEGY() calls with bstrategy().
* The demise of vm_pager_map_page() in revision 1.93 of vm/vm_pager.c permitsalc2004-04-081-3/+0
| | | | | | the reduction of the pager map's size by 8M bytes. In other words, eight megabytes of largely wasted KVA are returned to the kernel map for use elsewhere.
* Remove advertising clause from University of California Regent's license,imp2004-04-061-4/+0
| | | | | | per letter dated July 22, 1999. Approved by: core
* Eliminate vm_pager_map_page() and vm_pager_unmap_page() and their uses.alc2004-04-061-20/+0
| | | | Use sf_buf_alloc() and sf_buf_free() instead.
* - Remove comments referring to functions that no longer exist.alc2003-10-201-2/+0
|
* Use sparse struct initializations for struct pagerops.phk2003-08-051-25/+5
| | | | This makes grepping for which pagers implement which methods easier.
* Use kmem_alloc_nofault() instead of kmem_alloc_pageable() to allocatealc2003-08-041-1/+1
| | | | | | | swapbkva. Swapbkva mappings are explicitly managed using pmap_qenter(), not on-demand by vm_fault(), making kmem_alloc_nofault() more appropriate. Submitted by: tegge
* Move extern declaration of the various pagerops from vm_pager.cphk2003-08-031-6/+0
| | | | to vm_pager.h where the various pagers will also see them.
* Initialize b_saveaddr when we hand out pbufsphk2003-06-201-2/+3
|
* Use __FBSDID().obrien2003-06-111-2/+3
|
* Lock the vm_object when performing vm_pager_deallocate().alc2003-05-061-0/+5
|
* Remove GIANT_REQUIRED from getpbuf(). Reviewed by: teggealc2003-04-051-2/+1
| | | | Reduce pbuf_mtx's scope in relpbuf(). Submitted by: tegge
* - Add an interlock argument to BUF_LOCK and BUF_TIMELOCK.jeff2003-02-251-1/+1
| | | | | | | | | | - 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
* o Remove some long dead code: from revision 1.41 of vm/vm_pager.calc2002-07-011-19/+0
| | | | | 3+ years ago. o Remove some unused prototypes.
* o Remove GIANT_REQUIRED from vm_pager_allocate() and vm_pager_deallocate().alc2002-06-211-3/+0
|
* Change callers of mtx_init() to pass in an appropriate lock type name. Injhb2002-04-041-1/+1
| | | | | | | most cases NULL is passed, but in some cases such as network driver locks (which use the MTX_NETWORK_LOCK macro) and UMA zone locks, a name is used. Tested on: i386, alpha, sparc64
* Remove __P.alfred2002-03-191-6/+6
|
* Convert all pmap_kenter/pmap_kremove pairs in MI code to use pmap_qenter/jake2002-03-171-2/+3
| | | | | | | | | | | | | | | pmap_qremove. pmap_kenter is not safe to use in MI code because it is not guaranteed to flush the mapping from the tlb on all cpus. If the process in question is preempted and migrates cpus between the call to pmap_kenter and pmap_kremove, the original cpu will be left with stale mappings in its tlb. This is currently not a problem for i386 because we do not use PG_G on SMP, and thus all mappings are flushed from the tlb on context switches, not just user mappings. This is not the case on all architectures, and if PG_G is to be used with SMP on i386 it will be a problem. This was committed by peter earlier as part of his fine grained tlb shootdown work for i386, which was backed out for other reasons. Reviewed by: peter
* - Remove a number of extra newlines that do not belong here according toeivind2002-03-101-2/+0
| | | | | | | | | style(9) - Minor space adjustment in cases where we have "( ", " )", if(), return(), while(), for(), etc. - Add /* SYMBOL */ after a few #endifs. Reviewed by: alc
* * Move bswlist declaration and initialization from kern/vfs_bio.c toeivind2002-03-051-1/+6
| | | | | | vm/vm_pager.c, which is the only place it is used. * Make the QUEUE_* definitions and bufqueues local to vfs_bio.c. * constify buf_wmesg.
* Back out all the pmap related stuff I've touched over the last few days.peter2002-02-271-2/+2
| | | | | | There is some unresolved badness that has been eluding me, particularly affecting uniprocessor kernels. Turning off PG_G helped (which is a bad sign) but didn't solve it entirely. Userland programs still crashed.
* Jake further reduced IPI shootdowns on sparc64 in loops by using rangedpeter2002-02-271-2/+2
| | | | | | | | shootdowns in a couple of key places. Do the same for i386. This also hides some physical addresses from higher levels and has it use the generic vm_page_t's instead. This will help for PAE down the road. Obtained from: jake (MI code, suggestions for MD part)
* Whitespace fixes.jhb2001-08-041-1/+1
|
* whitespace / register cleanupdillon2001-07-041-2/+2
|
* With Alfred's permission, remove vm_mtx in favor of a fine-grained approachdillon2001-07-041-16/+4
| | | | | | | | | (this commit is just the first stage). Also add various GIANT_ macros to formalize the removal of Giant, making it easy to test in a more piecemeal fashion. These macros will allow us to test fine-grained locks to a degree before removing Giant, and also after, and to remove Giant in a piecemeal fashion via sysctl's on those subsystems which the authors believe can operate without Giant.
* Introduce a global lock for the vm subsystem (vm_mtx).alfred2001-05-191-4/+23
| | | | | | | | | | | | | | | | | | | vm_mtx does not recurse and is required for most low level vm operations. faults can not be taken without holding Giant. Memory subsystems can now call the base page allocators safely. Almost all atomic ops were removed as they are covered under the vm mutex. Alpha and ia64 now need to catch up to i386's trap handlers. FFS and NFS have been tested, other filesystems will need minor changes (grabbing the vm lock when twiddling page properties). Reviewed (partially) by: jake, jhb
* This patch removes the VOP_BWRITE() vector.phk2001-04-171-0/+2
| | | | | | | | | | | | | VOP_BWRITE() was a hack which made it possible for NFS client side to use struct buf with non-bio backing. This patch takes a more general approach and adds a bp->b_op vector where more methods can be added. The success of this patch depends on bp->b_op being initialized all relevant places for some value of "relevant" which is not easy to determine. For now the buffers have grown a b_magic element which will make such issues a tiny bit easier to debug.
* protect pbufs and associated counts with a mutexalfred2001-04-131-2/+11
|
* Mechanical change to use <sys/queue.h> macro API instead ofphk2001-02-041-1/+1
| | | | | | | fondling implementation details. Created with: sed(1) Reviewed by: md5(1)
* Backed out previous commit. Don't depend on namespace pollution inbde2000-12-021-0/+1
| | | | <sys/buf.h>.
* remove unneded sys/ucred.h includesalfred2000-11-301-1/+0
|
* Weaken a bogus dependency on <sys/proc.h> in <sys/buf.h> by #ifdef'ingphk2000-10-291-1/+0
| | | | | | | | | | the offending inline function (BUF_KERNPROC) on it being #included already. I'm not sure BUF_KERNPROC() is even the right thing to do or in the right place or implemented the right way (inline vs normal function). Remove consequently unneeded #includes of <sys/proc.h>
* Checkpoint of a new physical memory backed object type, that does notpeter2000-05-211-0/+2
| | | | | | | | | | | | | have pv_entries. This is intended for very special circumstances, eg: a certain database that has a 1GB shm segment mapped into 300 processes. That would consume 2GB of kvm just to hold the pv_entries alone. This would not be used on systems unless the physical ram was available, as it's not pageable. This is a work-in-progress, but is a useful and functional checkpoint. Matt has got some more fixes for it that will be committed soon. Reviewed by: dillon
* Separate the struct bio related stuff out of <sys/buf.h> intophk2000-05-051-0/+1
| | | | | | | | | | | | | | | <sys/bio.h>. <sys/bio.h> is now a prerequisite for <sys/buf.h> but it shall not be made a nested include according to bdes teachings on the subject of nested includes. Diskdrivers and similar stuff below specfs::strategy() should no longer need to include <sys/buf.> unless they need caching of data. Still a few bogus uses of struct buf to track down. Repocopy by: peter
* Convert the vm_pager_strategy() interface to take a struct bio instead ofphk2000-05-031-4/+4
| | | | | | a struct buf. Don't try to examine B_ASYNC, it is a layering violation to do so. The only current user of this interface is vn(4) which, since it emulates a disk interface, operates on struct bio already.
* Move and staticize the bufchain functions so they become local to thephk2000-05-011-133/+0
| | | | only piece of code using them. This will ease a rewrite of them.
* Complete the bio/buf divorce for all code below devfs::strategyphk2000-04-151-5/+5
| | | | | | | | | | Exceptions: Vinum untouched. This means that it cannot be compiled. Greg Lehey is on the case. CCD not converted yet, casts to struct buf (still safe) atapi-cd casts to struct buf to examine B_PHYS
* Move B_ERROR flag to b_ioflags and call it BIO_ERROR.phk2000-04-021-12/+11
| | | | | | | | | | | | | (Much of this done by script) Move B_ORDERED flag to b_ioflags and call it BIO_ORDERED. Move b_pblkno and b_iodone_chain to struct bio while we transition, they will be obsoleted once bio structs chain/stack. Add bio_queue field for struct bio aware disksort. Address a lot of stylistic issues brought up by bde.
* Revert spelling mistake I made in the previous commitcharnier2000-03-271-1/+1
| | | | Requested by: Alan and Bruce
OpenPOWER on IntegriCloud