Commit Graph

2637 Commits

Author SHA1 Message Date
thorpej 9e74a14e1f Add a sysctl to frob sb_max. 2001-07-27 21:19:09 +00:00
thorpej 59612894e1 Now that M_TRAILINGSPACE() checks buffer writeability properly,
we can greatly simplify sbcompress().  Slightly modified from
a similar change in FreeBSD.
2001-07-27 19:27:49 +00:00
thorpej fcc2e4e5f6 Use pool_cache_*() for mbufs and clusters. While we don't use the
ctor/dtor feature, it's still faster to allocate from the cache groups
than it is from the pool (cache groups are analogous to "magazines"
in the Solaris SLAB allocator).
2001-07-26 19:05:04 +00:00
jdolecek 875b784599 pipe_create(): explicitly zero whole memory returned from pool_get(), instead
of some selective pieces. This fixes problem with NEW_PIPE in kernels
with DEBUG option, reported via e-mail by Chuck Silvers.

sys_pipe(): g/c fdp, provide it at the chunk of FreeBSD code where it's used
2001-07-26 14:14:28 +00:00
wiz f1bde32520 s/necesary/necessary/ 2001-07-24 16:43:02 +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
wiz a9356936b4 seperate -> separate 2001-07-22 13:33:58 +00:00
thorpej f20822333e Add `WALLSIG' which causes wait4(2) to wait for all processes, regardless
of exit signal.  Add Linux-compatible aliases __WCLONE (for WALTSIG) and
__WALL (for WALLSIG), for compatibility with the Linux clone(2) API.
2001-07-18 19:10:26 +00:00
thorpej 1071f796f4 bcopy -> memcpy 2001-07-18 06:51:38 +00:00
thorpej f2f13262df bzero -> memset 2001-07-18 06:48:27 +00:00
thorpej 33d6023447 Unshare signal actions on exec.
From Matthew Orgass <darkstar@pgh.net>.
2001-07-18 05:34:58 +00:00
thorpej 35c5abaeff Unshare the file descriptor table and `cwdinfo' when we exec.
From Matthew Orgass <darkstar@pgh.net>.
2001-07-18 05:34:37 +00:00
matt 7fa8aeac6c When we auto size the vnode cache, make sure we do it *before* we
init vfs so it can the size into account when creating its hash lists.
This means that for a 2GB system, it'll have a default of 65536 buckets
instead of 2048 and when you have 200,000+ vnodes that makes a significant
difference.
2001-07-18 00:51:54 +00:00
jdolecek f9f0d49b94 comment police 2001-07-17 18:21:59 +00:00
jdolecek db3510e6f8 fix bogus uio->uio_offset check introduced in rev. 1.5, which effectively
disabled loans for writes (a.k.a "direct write"), oops; use uio->uio_resid
for the check instead

don't bother updating uio->uio_offset in pipe_direct_write(), it's not used
by upper layers anyway
2001-07-17 18:18:52 +00:00
jdolecek 588b94c0a2 Expel MSG_COMPAT/COMPAT_OLDSOCK, make the COMPAT_43 wrappers
arrange things as needed.  Unfortunately, the check in sockargs()
have to stay, since 4.3BSD bind(2), connect(2) and sendto(2) were
not versioned at the time :(

This code was tested to pass regression tests.
2001-07-17 11:49:40 +00:00
jdolecek 37d12500d5 only allocate buffer kva for the end which needs it 2001-07-17 06:05:28 +00:00
christos 2c913b0983 Fix problem reported by Greg Woods, with ld -n generated binaries.
Now if the requested alignment of the psection is less than PAGE_SIZE
we use readvn, not pagedvn and we don't adjust sizes.
2001-07-15 20:52:35 +00:00
christos 87e055d89e Use DPRINTF, and print all exec_vmcmds when we are debugging.
Don't use DEBUG, use DEBUG_EXEC to turn all that on.
2001-07-15 20:49:40 +00:00
jdolecek 55aebfe98e Remove initial newline from copyright[], which was mistakely added in rev.1.191.
Fixes kern/13470 by Tetsuya Isaki.
2001-07-15 14:36:06 +00:00
matt f300898396 Add support for kern.maxphys, vm.maxslp, vm.uspace (the later two for ps). 2001-07-14 06:36:01 +00:00
christos 66b3b42040 use be32toh instead of bswap32
add a macro MACHO_MACHDEP_CASES instead of ifdef'ing cpu types.
thanks jason!
2001-07-14 03:05:31 +00:00
christos b6639a0e83 new exec module for MACH-O fat binaries
XXX: shared libraries are not handled properly yet.
2001-07-14 02:09:41 +00:00
christos 69f5770270 - add exec_read_from and make exec_elf32 use it.
- add a macho probe function
2001-07-14 02:08:29 +00:00
christos 32a9a52549 add mach/macho exec struct 2001-07-14 02:06:34 +00:00
fvdl 75e45c9dee Check msgbufenabled before referencing msgbufp in panic. Avoids
a NULL ptr reference if there is an early panic (i.e. before
initmsgbuf() was called).
2001-07-10 20:40:56 +00:00
lukem dfaec93e4e move to kqueue branch for now 2001-07-10 11:59:50 +00:00
simonb cb89e2e488 ANSIfy. 2001-07-09 23:35:56 +00:00
simonb bc45d3d53c ANSIfy. 2001-07-09 10:54:12 +00:00
wiz fc687b32f5 Fix last commit: It's ">", not "<", in this case. Okay'd by christos. 2001-07-08 19:08:48 +00:00
christos 7d591946ec add verbiage to error 2001-07-08 18:57:50 +00:00
wiz cc0b68092e Correct various misspellings of 'transfer' and inflected forms. 2001-07-08 18:06:42 +00:00
wiz daa5d204e4 synchron*, not sychron* 2001-07-08 17:41:14 +00:00
jdolecek 9bbd53c2ba vfs_sysctl(): cosmetic: provide explicit size for vfsnames[], to catch
mistakes VFS_MAXID/CTL_VFS_NAMES are updated
2001-07-08 10:32:38 +00:00
fvdl 2017fd0179 flags was used uninitialized. 2001-07-07 23:33:54 +00:00
wdk d80e8c579c Disable single step when entering KGDB. S-S will be enabled later if
required.   This duplicates the behavour used by DDB in db_stop_at_pc()

Architectures that emulate single step in software (SOFTWARE_SSTEP) don't
clear their temporary breakpoints making it impossible to restart on the
same instruction.
2001-07-07 22:58:00 +00:00
lukem dafe2b38ba freebsd kqueue implementation 2001-07-06 08:01:32 +00:00
itojun d5b4c4a05d remove a #ifdef __OpenBSD__ segment. 2001-07-03 08:06:40 +00:00
itojun ebdb9f12f3 typo (should we get rid of this portion? 2001-07-02 23:02:11 +00:00
jdolecek 12aa43b8b1 Don't try to be too smart about chunking - if the data size is bigger
than PIPE_CHUNK_SIZE, just transfer first PIPE_CHUNK_SIZE and return short
write, expecting the caller to call us again later (if they need). Previous
behaviour (besides being wrong for O_NONBLOCK reads) hung hbench under some
circumstances and other applications may have similar expectations as hbench.
This might also fix port-vax/13333 by Manuel Bowyer.

Other changes to pipe_direct_write() include:
* return short write (and success) on EOF if any data were already read;
  we return EPIPE on next write(2) call
* simplify error handling, actually handle uvm_loan() failure correctly,
  call pipe_loan_free() on error explicitly and only call uvm_unloan()
  if the address space was _not_ already freed by pipe_loan_free()
  Thanks Chuck Silvers for uvm_unloan() hints :)

Fallthough to common write in pipe_write() if pipe_direct_write()
returns ENOMEM, otherwise always break out immediatelly.
Use uvm_km_valloc_wait() instead uvm_km_valloc() in pipe_loan_alloc().
2001-07-02 20:43:39 +00:00
matt 54ec2573c9 Use consistent types for len. Limit sockarg length to reasonable values. 2001-07-01 20:42:48 +00:00
thorpej 5bdb21d48a Duh, use fd_getfile() in sys_close(). 2001-07-01 18:12:00 +00:00
thorpej ce232da4eb Regen; added Linux-compatible clone(2) system call. 2001-07-01 18:07:33 +00:00
thorpej 9377ba2c38 Linux-compatible clone(2) system call, lifted from the Linux
compatibility module.  Based on patches from Bang Jun-Young <bjy@mogua.org>.
2001-07-01 18:06:11 +00:00
thorpej 7f109318f9 Protect the `pool cache group' pool with splvm(), so that pool caches
can be used by code that runs in interrupt context.
2001-07-01 06:12:20 +00:00
gmcgarry d6182a9e77 In-kernel device configuration manager - allows modification
of device locators at run-time.

Written by Mats O Jansson <moj@stacken.kth.se>.  Reworked by
Jun-ichiro itojun Hagino <itojun@netbsd.org>.
2001-07-01 02:56:20 +00:00
jdolecek 77f0267d21 Use array based upon CTL_VFS_NAMES to get filesystem name for non-VFS_GENERIC
syscall, instead of mountcompatnames[].
Move the extern mountcompatnames[], nmountcompatnames definition to
COMPAT_09 || COMPAT_43 section.
2001-06-28 08:12:08 +00:00
jdolecek 1ff201e042 Only define mountcompatnames[] for COMPAT_09 and COMPAT_43, make the
table actually match state in NetBSD 0.9 (checked against sys/mount.h
rev. 1.11).
The array is not to be modified from now on, comment updated accordingly.
2001-06-28 08:04:18 +00:00
atatat 298956dcf1 If no select collision is needed, try our best to avoid it by clearing
the flag.
2001-06-28 05:45:49 +00:00
thorpej 25f00d4c18 In getnewvnode(), allocate a vnode from the pool with NOWAIT. If
that fails, just try to recycle a vnode.  If we can't allocate or
recycle, issue a warning, sleep a bit, and try the whole thing
again.

This prevents us from blocking forever if we want to use a very large
number of vnodes, but don't have {memory,kva} resources from which to
allocate them.
2001-06-26 22:52:03 +00:00