Commit Graph

1771 Commits

Author SHA1 Message Date
dyoung 78b0e18345 Report vmem(9) errors out-of-band so that we can use vmem(9) to manage
ranges that include the least and the greatest vmem_addr_t.  Update
vmem(9) uses throughout the kernel.  Slightly expand on the tests in
subr_vmem.c, which still pass.  I've been running a kernel with this
patch without any trouble.
2011-09-02 22:25:08 +00:00
christos f05fc604ec trylockowner is not needed anymore. 2011-09-02 10:18:38 +00:00
christos 158bd4bab3 fix the build for rumpserver. 2011-09-01 21:09:07 +00:00
joerg 9eba1e423c Use __dead 2011-08-29 20:41:06 +00:00
dyoung 6c6cb72d7f Use VMEM_ADDR_MIN and VMEM_ADDR_MAX. 2011-08-25 15:14:19 +00:00
dyoung 64311e1f9d Introduce a couple of new constants, VMEM_ADDR_MIN (the least possible
address in a vmem(9) arena, 0) and VMEM_ADDR_MAX (the maximum possible
address, currently 0xFFFFFFFF).  Modify several boundary conditions so
that a vmem(9) arena can allocate ranges including VMEM_ADDR_MAX.
Update documentation and tests.

These changes pass the tests in sys/kern/subr_vmem.c.  To compile the
and run the test program, run "cd sys/kern/ && gcc -DVMEM_SANITY -o
subr_vmem ./subr_vmem.c && ./subr_vmem".
2011-08-23 22:00:57 +00:00
hannken fc2e6c60c4 When consuming only part of a path in rump_vop_lookup():
- Make sure to consume complete path components.
- Consume trailing slashes too.
- Do not clear REQUIREDIR.

Test rump/modautoload/t_modautoload now passes.
2011-08-23 07:40:32 +00:00
manu c817bc5d19 regen 2011-08-08 12:17:27 +00:00
rmind a0ffc02ab8 Rename slightly misleading KTHREAD_JOINABLE to KTHREAD_MUSTJOIN. 2011-08-07 14:03:15 +00:00
hannken 2a24cc6572 Allow removal of a directory containing only whiteouts and free them first. 2011-08-07 05:56:32 +00:00
hannken 40cf7e4cfa Make whiteouts work on rumpfs:
- On lookup it is ok to create if the name exists and is a whiteout
- When replacing a whiteout directory entry remove the whiteout first.
- Set UF_OPAQUE when creating a node in place of a whiteout.
2011-08-05 08:13:59 +00:00
uch 7ce939b3e2 v7fs rump support 2011-07-24 08:55:28 +00:00
drochner 3c39863810 regen after *setxattr constification 2011-07-18 11:43:53 +00:00
joerg 3eb244d801 Retire varargs.h support. Move machine/stdarg.h logic into MI
sys/stdarg.h and expect compiler to provide proper builtins, defaulting
to the GCC interface. lint still has a special fallback.
Reduce abuse of _BSD_VA_LIST_ by defining __va_list by default and
derive va_list as required by standards.
2011-07-17 20:54:30 +00:00
dyoung 9c14481bd4 Use <sys/bus.h> not <machine/bus.h>. 2011-07-15 23:40:56 +00:00
hannken 49511bba25 Change VOP_BWRITE() to take a vnode as its first argument like all other
VOPs do.  Layered file systems no longer have to modify bp->b_vp and run
into trouble when an async VOP_BWRITE() uses the wrong vnode.

- change all occurences of VOP_BWRITE(bp) to VOP_BWRITE(bp->b_vp, bp).
- remove layer_bwrite().
- welcome to 5.99.55

Adresses PR kern/38762 panic: vwakeup: neg numoutput

No objections from tech-kern@.
2011-07-11 08:27:37 +00:00
mrg 5fb8a5b39d don't define multiple cwdi0's, mark this one as extern.
fixes various mips build issues i've seen with both GCC 4.1 and 4.5.
2011-07-04 11:31:37 +00:00
manu be95d60797 Add a flag to VOP_LISTEXTATTR(9) so that the vnode interface can tell the
filesystem in which format extended attribute shall be listed.

There are currently two formats:
- NUL-terminated strings, used for listxattr(2), this is the default.
- one byte length-pprefixed, non NUL-terminated strings, used for
  extattr_list_file(2), which is obtanined by setting the
  EXTATTR_LIST_PREFIXLEN flag to VOP_LISTEXTATTR(9)

This approach avoid the need for converting the list back and forth, except
in libperfuse, since FUSE uses NUL-terminated strings, and the kernel may
have requested EXTATTR_LIST_PREFIXLEN.
2011-07-04 08:07:29 +00:00
mrg f50d565b1c define ARCH_ELFSIZE=32 and add kobj_stubs.c rumpcpu_generic.c. 2011-07-03 08:53:23 +00:00
christos bc12521d3b regen 2011-06-26 17:05:55 +00:00
mrg 331c95a1e1 fix an operator precedence error picked up by GCC 4.5.3. real bug. 2011-06-22 04:01:08 +00:00
hannken b632c2dabd Make ubc_purge() a noop. 2011-06-19 18:29:25 +00:00
hannken 86dc5d9ce0 Revert previous. ubc_purge() is already defined in rumpkern/vm.c 2011-06-19 18:28:24 +00:00
hannken 035869f9d4 Add a noop wrapper for ubc_purge() to make file system tests work again.
Not really sure if this is the right way -- Antti?
2011-06-19 11:22:42 +00:00
rmind 7083a919fc - Fix a silly bug: remove umap from uobj in ubc_release() UBC_UNMAP case.
- Use UBC_WANT_UNMAP() consistently.

ARM (PMAP_CACHE_VIVT case) works again.
2011-06-19 02:42:53 +00:00
hannken d296304e60 Rename uvm_vnp_zerorange(struct vnode *, off_t, size_t) to
ubc_zerorange(struct uvm_object *, off_t, size_t, int) changing
the first argument to an uvm_object and adding a flags argument.

Modify tmpfs_reg_resize() to zero the backing store (aobj) instead
of the vnode.  Ubc_purge() no longer panics when unmounting tmpfs.

Keep uvm_vnp_zerorange() until the next kernel version bump.
2011-06-16 09:21:02 +00:00
mrg a14dae9853 include uvm_object.c in the rump kernel for the new uvm_obj* functions.
don't build the uvm_object.c uvm_object_printit() for _RUMPKERNEL. (XXX)
add empty panic() stubs for uvm_loanbreak() and ubc_purge().

fixes some more 5.99.53 rump build issues.
2011-06-12 06:36:38 +00:00
rmind e225b7bd09 Welcome to 5.99.53! Merge rmind-uvmplock branch:
- Reorganize locking in UVM and provide extra serialisation for pmap(9).
  New lock order: [vmpage-owner-lock] -> pmap-lock.

- Simplify locking in some pmap(9) modules by removing P->V locking.

- Use lock object on vmobjlock (and thus vnode_t::v_interlock) to share
  the locks amongst UVM objects where necessary (tmpfs, layerfs, unionfs).

- Rewrite and optimise x86 TLB shootdown code, make it simpler and cleaner.
  Add TLBSTATS option for x86 to collect statistics about TLB shootdowns.

- Unify /dev/mem et al in MI code and provide required locking (removes
  kernel-lock on some ports).  Also, avoid cache-aliasing issues.

Thanks to Andrew Doran and Joerg Sonnenberger, as their initial patches
formed the core changes of this branch.
2011-06-12 03:35:36 +00:00
matt d8b60e6f0b Appease rump. 2011-06-10 00:32:52 +00:00
tron 8bcd25a1a3 Fix rump build which got broken by the fix for PR kern/44986. 2011-05-28 16:07:43 +00:00
joerg a216da57a6 Default to -Wno-sign-compare -Wno-pointer-sign for clang.
Push -Wno-array-bounds down to the cases that depend on it.
Selectively disable warnings for 3rd party software or non-trivial
issues to be reviewed later to get clang -Werror to build most of the
tree.
2011-05-26 12:56:24 +00:00
joerg cfb300c780 Mark rumpuser_exit and rumpuser_thread_exit as dead. 2011-05-23 20:49:35 +00:00
joerg 188ae306aa Spell --fatal-warnings with two hyphens 2011-05-19 21:24:55 +00:00
christos 6009929c48 add a hacky version of sigsuspendsetup() to satisfy link requirements. 2011-05-18 15:57:14 +00:00
matt 12a3861acb Make rump compile things with -std=gnu99 like the kernel and modules. 2011-05-10 00:33:58 +00:00
dyoung c2e43be1c5 Reduces the resources demanded by TCP sessions in TIME_WAIT-state using
methods called Vestigial Time-Wait (VTW) and Maximum Segment Lifetime
Truncation (MSLT).

MSLT and VTW were contributed by Coyote Point Systems, Inc.

Even after a TCP session enters the TIME_WAIT state, its corresponding
socket and protocol control blocks (PCBs) stick around until the TCP
Maximum Segment Lifetime (MSL) expires.  On a host whose workload
necessarily creates and closes down many TCP sockets, the sockets & PCBs
for TCP sessions in TIME_WAIT state amount to many megabytes of dead
weight in RAM.

Maximum Segment Lifetimes Truncation (MSLT) assigns each TCP session to
a class based on the nearness of the peer.  Corresponding to each class
is an MSL, and a session uses the MSL of its class.  The classes are
loopback (local host equals remote host), local (local host and remote
host are on the same link/subnet), and remote (local host and remote
host communicate via one or more gateways).  Classes corresponding to
nearer peers have lower MSLs by default: 2 seconds for loopback, 10
seconds for local, 60 seconds for remote.  Loopback and local sessions
expire more quickly when MSLT is used.

Vestigial Time-Wait (VTW) replaces a TIME_WAIT session's PCB/socket
dead weight with a compact representation of the session, called a
"vestigial PCB".  VTW data structures are designed to be very fast and
memory-efficient: for fast insertion and lookup of vestigial PCBs,
the PCBs are stored in a hash table that is designed to minimize the
number of cacheline visits per lookup/insertion.  The memory both
for vestigial PCBs and for elements of the PCB hashtable come from
fixed-size pools, and linked data structures exploit this to conserve
memory by representing references with a narrow index/offset from the
start of a pool instead of a pointer.  When space for new vestigial PCBs
runs out, VTW makes room by discarding old vestigial PCBs, oldest first.
VTW cooperates with MSLT.

It may help to think of VTW as a "FIN cache" by analogy to the SYN
cache.

A 2.8-GHz Pentium 4 running a test workload that creates TIME_WAIT
sessions as fast as it can is approximately 17% idle when VTW is active
versus 0% idle when VTW is inactive.  It has 103 megabytes more free RAM
when VTW is active (approximately 64k vestigial PCBs are created) than
when it is inactive.
2011-05-03 18:28:44 +00:00
pgoyette 18fecdaed4 More lim_free() fallout 2011-05-01 02:52:42 +00:00
dholland 82f660e639 Regen for ISSYMLINK removal. 2011-04-18 00:43:56 +00:00
rmind fbc8beae75 Split off parts of vfs_subr.c into vfs_vnode.c and vfs_mount.c modules.
No functional change.  Discussed on tech-kern@.
2011-04-02 04:28:56 +00:00
dyoung 060522dec8 Hide the radix-trie implementation of the forwarding table so that we
will have an easier time replacing it with something different, even if
it is a second radix-trie implementation.

sys/net/route.c and sys/net/rtsock.c no longer operate directly on
radix_nodes or radix_node_heads.

Hopefully this will reduce the temptation to implement multipath or
source-based routing using grotty hacks to the grotty old radix-trie
code, too. :-)
2011-03-31 19:40:51 +00:00
pooka bf89b7ec3f actually add libpud and revert damage to libputter.
pax -rw and forgetting to rm -rf CVS has some nasty side-effects ....
2011-03-31 08:36:25 +00:00
pooka fe98957153 add pud as a rump component 2011-03-31 08:22:54 +00:00
dyoung 149dd44b66 __HAVE_DEVICE_REGISTER_POSTCONFIG and __HAVE_DEVICE_REGISTER
are no more, so don't use them here.
2011-03-28 22:23:39 +00:00
riz d16ddb6294 Don't try to kmem_alloc() 0 bytes. Without this change, some trivial
kernel modules were not loadable by rump_server.
2011-03-27 21:16:52 +00:00
bouyer d9210c2405 Add a new libquota library, which contains some blocks to build and/or
parse quota plists; as well as a getfsquota() function to retrieve quotas
for a single id from a single filesystem (whatever filesystem this is:
a local quota-enabled fs or NFS). This is build on functions getufsquota()
(for local filesystems with UFS-like quotas) and getnfsquota();
which are also available to userland programs.
move functions from quota2_subr.c to libquota or libprop as appropriate,
and ajust in-tree quota tools.
move some declarations from kernel headers to either sys/quota.h or
quota/quota.h as appropriate. ufs/ufs/quota.h still installed because
it's needed by other installed ufs headers.
ufs/ufs/quota1.h still installed as a quick&dirty way to get a code
using the old quotactl() to compile (just include ufs/ufs/quota1.h instead of
ufs/ufs/quota.h - old code won't compile without this change and this is
on purpose).
Discussed on tech-kern@ and tech-net@ (long thread, but not much about
libquota itself ...)
2011-03-24 17:05:39 +00:00
pooka a3a20972d9 pnbuf_cache is used all over the place outside of vfs, so put it
in one place to avoid many definitions.
2011-03-22 15:16:23 +00:00
pooka 23bbd0e078 Update copyright statements.
no functional change.
2011-03-21 16:41:08 +00:00
pooka 056c4b30fa remove historic test 2011-03-21 15:51:34 +00:00
pooka 20c88ef126 this was moved to usr.bin ages ago 2011-03-21 15:47:53 +00:00
joerg ad65a463d1 Include bsd.own.mk before making decisions based on mk.conf. 2011-03-21 05:15:18 +00:00