Commit Graph

1603 Commits

Author SHA1 Message Date
pk
9e744b8155 Merge Chris Torek's new `%b' bit-field format into bitmask_snprintf(). 1998-08-23 22:42:32 +00:00
ragge
b3574d3923 VAX logical page size increased to 4k. 1998-08-21 13:41:09 +00:00
thorpej
1083dcb6ca Back out previous. 1998-08-18 18:16:30 +00:00
thorpej
7cc905f5c8 Add some braces to make egcs happy (ambiguous else warning). 1998-08-18 06:27:01 +00:00
thorpej
84f8a722d2 Deal with a VERY BOGUS -Wuninitialized warning. (Again, appears to be
__noreturn__ related)
1998-08-18 06:26:30 +00:00
thorpej
f3d7e7e21c Add some braces to make egcs happy (ambiguous else warning). 1998-08-18 06:11:35 +00:00
thorpej
e00e495827 Add missing simple_unlock(), from Stefan Grefen, PR #5981. 1998-08-17 17:29:20 +00:00
mycroft
bf886f2029 Assign my copyrights to TNF. 1998-08-15 05:19:50 +00:00
mycroft
6d3d8a1350 Make copyright notices with my name consistent. 1998-08-15 03:02:31 +00:00
thorpej
09efdbb42d Oops, this got missed in the vm_offset_t -> vaddr_t change. 1998-08-13 19:15:33 +00:00
kleink
5350df2953 Per POSIX, fail with EINVAL if advisory locking is attempted on a file type
that doesn't support it, rather than using a homegrown EBADF or EOPNOTSUPP.
1998-08-13 10:06:31 +00:00
eeh
a2dd74ed79 Merge paddr_t changes into the main branch. 1998-08-13 02:10:37 +00:00
kleink
7b07ad780a Per XNS Issue 5, calling recvmsg(2) or sendmsg(2) with an msg.msg_iovlen less
than or equal to 0 shall fail with EMSGSIZE; the latter condition was not being
checked for.  Also, document the msg.msg_iovlen > {IOV_MAX} case.
1998-08-04 19:48:34 +00:00
kleink
c6ef57702d UIO_MAXIOV -> IOV_MAX 1998-08-04 12:19:15 +00:00
perry
275d1554aa Abolition of bcopy, ovbcopy, bcmp, and bzero, phase one.
bcopy(x, y, z) ->  memcpy(y, x, z)
ovbcopy(x, y, z) -> memmove(y, x, z)
   bcmp(x, y, z) ->  memcmp(x, y, z)
  bzero(x, y)    ->  memset(x, 0, y)
1998-08-04 04:03:10 +00:00
kleink
3d9b4a4320 Fix two off-by-one bugs, both present in each recvmsg(2) and sendmsg(2):
* the first one would cause an unnecessary malloc() of iovec storage for
  a msg_iovlen of UIO_SMALLIOV although the required amount of memory has
  been allocated on the stack.
* the second one would cause a recvmsg() or sendmsg() with a msg_iovlen of
  UIO_MAXIOV to fail with EMSGSIZE, which is also a violation of XNS5.
1998-08-03 15:15:58 +00:00
kleink
c68582d64b UIO_MAXIOV -> IOV_MAX 1998-08-03 15:01:00 +00:00
kleink
5404ba4886 Add support to query the
* availability of POSIX Synchronized I/O (kern.synchronized_io),
* maximum number of iovec structures to be used in readv(2) etc. (kern.iov_max)
via sysctl().
1998-08-03 14:38:20 +00:00
thorpej
85b7cfc8c3 Make sure we initialize pr_nidle. 1998-08-02 19:07:47 +00:00
kleink
b7877d3fc0 Implement support for IEEE Std 1003.1b-1993 syncronous I/O:
* if synchronized I/O file integrity completion of read operations was
  requested, set IO_SYNC in the ioflag passed to the read vnode operator.
* if synchronized I/O data integrity completion of write operations was
  requested, set IO_DSYNC in the ioflag passed to the write vnode operator.
1998-08-02 18:39:14 +00:00
thorpej
a4c7bab10e Use the pool allocator for sockets. 1998-08-02 04:53:11 +00:00
thorpej
0e28b643e9 Use a pool for proc structures. 1998-08-02 04:41:32 +00:00
thorpej
6f739e1a66 Fix a braino in the idle page instrumentation. 1998-08-02 04:34:46 +00:00
thorpej
7c61b8cdd8 Instrument "idle pages" (i.e. pages which have no items allocated from
them, and could thus be freed back to the system).
1998-08-01 23:44:20 +00:00
thorpej
3c658f1f41 Don't call the protocol drain routines if how == M_NOWAIT, which typically
means we're in interrupt context.  Since we can be called from a network
hardware interrupt, we could corrupt the protocol queues we try to drain
them at that time.
1998-08-01 01:47:24 +00:00
thorpej
c56c24f4fd Initialize the mbuf allocator _before_ autoconfiguration; it might be
called when devices attach, take two.

Note that it is necessary that mbinit() NOT allocate memory, since it
is called before mb_map is created.  This is not a problem with the
pool allocator that is now used for mbufs and mbuf clusters.
1998-08-01 01:36:35 +00:00
thorpej
e7521693c1 Use the pool allocator for mbufs and mbufs clusters (two pools, one for
each).  Partially from pk@netbsd.org.
1998-08-01 01:35:20 +00:00
thorpej
e8b92fa131 Oops, back out previous. I need to attack that problem differently. 1998-08-01 01:20:43 +00:00
perry
730baa7431 fix sizeofs so they comply with the KNF style guide. yes, it is pedantic. 1998-07-31 22:50:48 +00:00
thorpej
17e88cf50e Initialize the mbuf allocator _before_ autoconfiguration; it might be
called when devices attach.
1998-07-31 21:59:55 +00:00
thorpej
fe7696eacb Un-static pool_head; vmstat wants to find it. 1998-07-31 21:55:09 +00:00
kleink
17de9df6c1 Reject an iovcnt argument of 0 to readv(), writev(), preadv() and pwritev()
as invalid.  This has been stated by the respective manual pages at least
since Net/2, and is the behaviour specified by XSH5.
1998-07-31 15:38:58 +00:00
mycroft
f53fedba63 Regen. 1998-07-30 00:46:27 +00:00
mycroft
d588e17601 __Namespace__ __protection__. 1998-07-30 00:46:01 +00:00
thorpej
4b039671de When checking for overflow in the residual count, test against SSIZE_MAX.
The read/write system calls return ssize_t because -1 is used to indicate
error, therefore the transfer size MUST be limited to SSIZE_MAX, otherwise
garbage can be returned to the user.

There is NO change from existing behavior here, only a more precise
definition of that the semantics are, except in the Alpha case, where
the full SSIZE_MAX transfer size can now be realized (ssize_t is 64-bit
on the Alpha).
1998-07-29 02:07:19 +00:00
thorpej
6326c90134 Change the "aresid" argument of vn_rdwr() from an int * to a size_t *,
to match the new uio_resid type.
1998-07-28 18:37:47 +00:00
thorpej
e95c22ee96 Don't cast the null residual pointer passed to vn_rdwr(). 1998-07-28 18:17:34 +00:00
thorpej
80e25bcca0 Don't cast the null residual pointer passed to vn_rdwr(). 1998-07-28 18:11:39 +00:00
thorpej
939279f988 When checking for overflow in the residual count, test against SSIZE_MAX.
The read/write system calls return ssize_t because -1 is used to indicate
error, therefore the transfer size MUST be limited to SSIZE_MAX, otherwise
garbage can be returned to the user.

There is NO change from existing behavior here, only a more precise
definition of that the semantics are, except in the Alpha case, where
the full SSIZE_MAX transfer size can now be realized (ssize_t is 64-bit
on the Alpha).
1998-07-28 17:58:29 +00:00
thorpej
bf51a1d137 uvm_deallocate() takes an address and a size, not an address range. From
ITOH Yasufumi <yasufu-i@is.aist-nara.ac.jp>, PR #5834.
1998-07-24 20:47:59 +00:00
thorpej
fc4828b0b4 A few small changes to how pool pages are allocated/freed:
- If either an alloc or release function is provided, make sure both are
  provided, otherwise panic, as this is a fatal error.
- If using the default allocator, default the pool pagesz to PAGE_SIZE,
  since that is the granularity of the default allocator's mechanism.
- In the default allocator, use new functions:
	uvm_km_alloc_poolpage()/uvm_km_free_poolpage(), or
	kmem_alloc_poolpage()/kmem_free_poolpage()
  rather than doing it here.  These functions may use pmap hooks to
  provide alternate methods of mapping pool pages.
1998-07-24 20:19:23 +00:00
sommerfe
1c2f0a15fd Don't create the extent region pool until one of our callers is of the
opinion that it's safe to call malloc.
1998-07-24 06:40:45 +00:00
pk
4e465abf3f Use a memory pool instead of malloc to allocate region descriptors. 1998-07-23 20:57:17 +00:00
pk
e32923a128 Re-vamped pool manager.
* support for customized memory supplier
	* automatic page reclaim by VM system
	* time-based hysteresis
	* cache coloring (after Bonwick's "slabs")
1998-07-23 20:34:00 +00:00
lukem
786b86d71b use AF_LOCAL instead of AF_UNIX 1998-07-18 05:04:35 +00:00
thorpej
4c50a37133 Back out previous, I botched something. 1998-07-16 00:46:50 +00:00
pk
3036bcf8e5 Close a descriptor leak. This proved especially detrimental under heavy
paging.
1998-07-15 12:38:29 +00:00
thorpej
b20c7bf68c For SOCK_STREAM, provide the socket credentials to the accepter as soon as
the client connects.
1998-07-10 22:15:47 +00:00
jonathan
b37021c1a1 defopt NATM. 1998-07-05 22:48:05 +00:00
jonathan
d275e56dee * defopt COMPAT_{09,10,11,12,13} and COMPAT_NOMID.
TODO: revisit interaction between native compat and emul compat usage.
1998-07-05 08:49:30 +00:00