Commit Graph

474 Commits

Author SHA1 Message Date
chs 8e9cdbbd63 replace "vnode" and "vtext" with "file" and "exec" in uvmexp field names. 2001-12-09 03:07:43 +00:00
chs 0931f31deb add a VOP_PUTPAGES method for all the filesystems that don't have pages.
do all the work for destroying syncfs vnodes in vfs_deallocate_syncvnode()
to make some new assertions work out.
2001-12-06 04:30:49 +00:00
chs 1361ca58eb be consistent, clear VONWORKLST when we take a syncer vnode off the
syncer list.
2001-12-06 04:29:55 +00:00
chs 4d14671458 add VOP_GETPAGES and VOP_PUTPAGES methods for layered filesystems.
drop the interlock on the upper layer, acquire the interlock on the
lower layer.
2001-12-06 04:29:23 +00:00
chs 5a690c92a1 add a VOP_PUTPAGES method for all the filesystems that don't have pages,
just unlock the interlock.
2001-12-06 04:27:40 +00:00
thorpej 03efee5585 * Allow machine-dependent code to specify hooks for ptrace(2)
(__HAVE_PTRACE_MACHDEP) and procfs (__HAVE_PROCFS_MACHDEP).
  These changes will allow platforms like x86 (XMM) and PowerPC
  (AltiVec) to export extended register sets in a sane manner.

* Use __HAVE_PTRACE_MACHDEP to export x86 XMM registers (standard
  FP + SSE/SSE2) using PT_{GET,SET}XMMREGS (in the machdep
  ptrace request space).
* Use __HAVE_PROCFS_MACHDEP to export x86 XMM registers via
  /proc/N/xmmregs in procfs.
2001-12-05 00:58:05 +00:00
christos 420771d7cc PR/14781: Matthew Fredette: Clamp the number of read-ahead pages to 16 because
other code has this limit. Also while I am here, convert the magic 16 into
a #define constant and use it in the appropriate places. This is a temporary
fix, since all this read-ahead business is XXXUBC anyway.
2001-11-30 15:18:39 +00:00
lukem 2565646230 don't need <sys/types.h> when including <sys/param.h> 2001-11-15 09:47:59 +00:00
lukem e4b00f433c add RCSIDs 2001-11-10 13:33:40 +00:00
enami 7b7e3f6b7e Wrap long line and remove name of argument from function prototype. 2001-11-07 04:56:09 +00:00
enami 8e5afc2cbe Make the size of null node hash table to desiredvnodes instead of 16. 2001-11-07 04:55:26 +00:00
enami 888e968e4d Call hashdone where appropriate. 2001-11-07 04:21:26 +00:00
enami 579ece8405 Cosmetic changes. 2001-11-07 04:15:41 +00:00
enami 9af6d646c2 Fix typo in comment. 2001-11-07 04:04:10 +00:00
simonb cf63a6b052 Remove some variables that are set but never used. 2001-11-06 07:20:37 +00:00
simonb 86c9e7e6d2 In procfs_domem() the addr variable is only needed if PMAP_NEED_PROCWR is
defined.
2001-11-06 07:20:08 +00:00
enami 6e46b6ec2c s/genfs_do_putpages/genfs_gop_write/ in uvmhist. 2001-10-03 14:13:08 +00:00
chs f0b6149f57 change spec_{read,write}() to specify the device blkno in units of DEV_BSIZE
rather than the device's sector size.  this allows /dev/rcd0a and /dev/cd0a
to return the same data.  fixes PRs 3261 and 14026.
2001-09-23 04:39:25 +00:00
sommerfeld 181c4513dc Add fifo_putpages() placebo so that the vnode's uobj is unlocked. 2001-09-22 22:35:18 +00:00
chs d0b76cab5e use shared locks instead of exclusive for VOP_READ() and VOP_READDIR(). 2001-09-21 08:02:55 +00:00
chs 4111c37251 when zeroing pages past EOF, don't zero the page containing EOF if it
already contains valid data.  should fix PRs 13361 and 13436.
2001-09-21 07:52:25 +00:00
chs 5f5ac77eff add a forward decl for struct vm_page. 2001-09-15 22:38:40 +00:00
chs 099a6b5258 interfaces and structures used by new genfs_{get,put}pages(). 2001-09-15 21:33:05 +00:00
chs 64c6d1d2dc a whole bunch of changes to improve performance and robustness under load:
- remove special treatment of pager_map mappings in pmaps.  this is
   required now, since I've removed the globals that expose the address range.
   pager_map now uses pmap_kenter_pa() instead of pmap_enter(), so there's
   no longer any need to special-case it.
 - eliminate struct uvm_vnode by moving its fields into struct vnode.
 - rewrite the pageout path.  the pager is now responsible for handling the
   high-level requests instead of only getting control after a bunch of work
   has already been done on its behalf.  this will allow us to UBCify LFS,
   which needs tighter control over its pages than other filesystems do.
   writing a page to disk no longer requires making it read-only, which
   allows us to write wired pages without causing all kinds of havoc.
 - use a new PG_PAGEOUT flag to indicate that a page should be freed
   on behalf of the pagedaemon when it's unlocked.  this flag is very similar
   to PG_RELEASED, but unlike PG_RELEASED, PG_PAGEOUT can be cleared if the
   pageout fails due to eg. an indirect-block buffer being locked.
   this allows us to remove the "version" field from struct vm_page,
   and together with shrinking "loan_count" from 32 bits to 16,
   struct vm_page is now 4 bytes smaller.
 - no longer use PG_RELEASED for swap-backed pages.  if the page is busy
   because it's being paged out, we can't release the swap slot to be
   reallocated until that write is complete, but unlike with vnodes we
   don't keep a count of in-progress writes so there's no good way to
   know when the write is done.  instead, when we need to free a busy
   swap-backed page, just sleep until we can get it busy ourselves.
 - implement a fast-path for extending writes which allows us to avoid
   zeroing new pages.  this substantially reduces cpu usage.
 - encapsulate the data used by the genfs code in a struct genfs_node,
   which must be the first element of the filesystem-specific vnode data
   for filesystems which use genfs_{get,put}pages().
 - eliminate many of the UVM pagerops, since they aren't needed anymore
   now that the pager "put" operation is a higher-level operation.
 - enhance the genfs code to allow NFS to use the genfs_{get,put}pages
   instead of a modified copy.
 - clean up struct vnode by removing all the fields that used to be used by
   the vfs_cluster.c code (which we don't use anymore with UBC).
 - remove kmem_object and mb_object since they were useless.
   instead of allocating pages to these objects, we now just allocate
   pages with no object.  such pages are mapped in the kernel until they
   are freed, so we can use the mapping to find the page to free it.
   this allows us to remove splvm() protection in several places.

The sum of all these changes improves write throughput on my
decstation 5000/200 to within 1% of the rate of NetBSD 1.5
and reduces the elapsed time for "make release" of a NetBSD 1.5
source tree on my 128MB pc to 10% less than a 1.5 kernel took.
2001-09-15 20:36:31 +00:00
chs adf5d360a7 add a new VFS op, vfs_reinit, which is called when desiredvnodes is
adjusted via sysctl.  file systems that have hash tables which are
sized based on the value of this variable now resize those hash tables
using the new value.  the max number of FFS softdeps is also recalculated.

convert various file systems to use the <sys/queue.h> macros for
their hash tables.
2001-09-15 16:12:54 +00:00
assar 41f102fe0e install miscfs/syncfs/syncfs.h 2001-09-09 17:42:46 +00:00
chs 94d6f3ee95 map files are zero-length. 2001-08-31 04:56:26 +00:00
chs c60e896954 undo the part of the last revision that made user block device access
use the UBC interfaces.  too many problems with that yet.
2001-08-18 05:34:46 +00:00
chs f051fe3125 add definitions for UBCification of block devices. 2001-08-17 05:52:07 +00:00
chs 103d879bd7 initialize the UVM vnode size for block devices.
UBCify user access to block devices.
2001-08-17 05:51:53 +00:00
chs 5a4fdb6ddb make genfs get/put work for block devices as well:
- the "fs bshift" for block devices is always DEV_BSHIFT.
 - retrieve the device vnode from VOP_BMAP() and use that to set b_dev
   in page i/o buffers.
2001-08-17 05:51:29 +00:00
tv 57c096de20 KNF on previous. 2001-08-16 15:37:06 +00:00
jdolecek 332bb4894a bound check mount args more thoroughly 2001-08-03 06:00:13 +00:00
assar a9eb6b2c79 (*fs_mount): do not get the parent vnode back from namei to just release it 2001-08-02 22:40:58 +00:00
assar bec71dc090 change vop_symlink and vop_mknod to return vpp (the created node)
refed, so that the caller can actually use it.  update callers and
file systems that implement these vnode operations
2001-07-24 15:39:30 +00:00
chs 7ebc99879b don't set PG_RDONLY on the lower layer's pages,
the lower layer needs to have control over that flag.
that didn't solve the whole problem that it was trying to solve anyway.
(the issue is that if we have create mappings to the lower layer,
we need to get rid of those when we copy the file to the upper layer.)
we'll have to figure out some other way to handle this.
2001-07-04 21:38:00 +00:00
jdolecek c57b6d9ba4 Add DTYPE_PIPE (to be used by new pipe implementation) and handle
it accordingly.
2001-06-16 08:28:39 +00:00
thorpej 80cc38a1af Fix a partial construction problem that can cause race conditions
between creation of a file descriptor and close(2) when using kernel
assisted threads.  What we do is stick descriptors in the table, but
mark them as "larval".  This causes essentially everything to treat
it as a non-existent descriptor, except for fdalloc(), which sees a
filled slot so that it won't (incorrectly) allocate it again.  When
a descriptor is fully constructed, the code that has constructed it
marks it as "mature" (which actually clears the "larval" flag), and
things continue to work as normal.

While here, gather all the code that gets a descriptor from the table
into a fd_getfile() function, and call it, rather than having the
same (sometimes incorrect) code copied all over the place.
2001-06-14 20:32:41 +00:00
chs 766dfc9b6f be sure to allocate dirty zeroed pages to cover blocks we allocate
to resolve a write fault.  fixes PR 13201.
also, be sure to allocate blocks for write faults to holes even if
the page is already in memory.  fixes PR 13189.
2001-06-14 08:22:14 +00:00
wiz 09b77243bc Some more corrections by Michael K. Sanders. 2001-06-09 11:02:08 +00:00
wiz e265f98875 Typos and grammer fixes in comments (misc/13133 by Michael K. Sanders) 2001-06-07 13:44:46 +00:00
wiz fa87a2091d Typos in comments (misc/13133 by Michael K. Sanders) 2001-06-07 13:32:46 +00:00
chs c8642d34a1 let kernfs_mmap() use the default error method. 2001-06-03 02:23:31 +00:00
chs 27e388d697 let portalfs_mmap() use the default error method. 2001-06-03 02:22:40 +00:00
chs 6e2828061f procfs_bmap() should never be called, make it a "bad op".
let procfs_mmap() use the default error method.
2001-06-03 02:21:35 +00:00
chs 821ec03ed9 replace vm_map{,_entry}_t with struct vm_map{,_entry} *. 2001-06-02 18:09:08 +00:00
mrg 67afbd6270 use _KERNEL_OPT 2001-05-30 11:57:16 +00:00
chs 45701591c6 add a genfs_mmap() and change all of the disk-based filesystems
to implement VOP_MMAP() with the genfs version, in preparation for
actually using this VOP.
2001-05-28 02:50:51 +00:00
chs 11a9651c8f replace vm_page_t with struct vm_page *. 2001-05-26 21:27:10 +00:00
enami bb08989ba7 Since union_getpages may be called with PGO_LOCKED,
- We need to skip PGO_DONTCARE page also.
- ``npages'' returned by VOP_GETPAGES for lower vp doesn't count
  those pages in this case.  So, just loop ``npages'' times is
  insufficient.  Loop while there is real pages instead.
2001-04-26 05:25:14 +00:00