Commit Graph

1755 Commits

Author SHA1 Message Date
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
pooka 2750f1b5f9 make the if-else logic more obvious 2011-03-11 12:11:00 +00:00
pooka 86a95d8e4b After my change to the "interface accepts this packet" logic
yesterday the CARP test stopped working, since CARP depends on
IFF_PROMISC (which was previously always accidentally enabled).
While making the interface honor IFF_PROMISC, also make it compare
the received frame's address against ifp->if_sadl instead of a
local enaddr value we cached when the interface was created.
2011-03-11 12:10:15 +00:00
pooka a6893ed075 Don't assume rump kernel PAGE_SIZE and host page size are the same. 2011-03-11 09:25:59 +00:00
wiz fd1ad431e8 When panicing, at least tell the _real_ reason. 2011-03-10 22:11:05 +00:00
pooka cd97edf46b autocreate /dev/zfs. requested by riz 2011-03-10 19:24:37 +00:00
pooka 8fa2364979 Support bpf. shmif_dumpbus(1) can be used for much the same effect,
but sometimes it's just more convenient to run tcpdump live.
2011-03-10 13:27:03 +00:00
pooka d377d1cc83 Pass packet up if it's *for* us, not if it's from someone else.
This fixes a rather curious forwarding/redirect/etc. storm which
happened when there were >2 shmif kernels on the same shmbus with
ip forwarding set on. (at least it stress-tested other code ;)
2011-03-10 13:20:54 +00:00
pooka df23472915 track lockdebug data even in the special path 2011-03-09 23:41:24 +00:00
pooka 49bc93eb11 Mark cv_wait mutex as locked before doing any further dances.
Fixes a LOCKDEBUG panic in case the uncommon condition is hit.
2011-03-09 18:15:39 +00:00
pooka d469e02a3b Create cgd block device files in the right directory.
hi pooka!
2011-03-09 11:56:17 +00:00
pooka 08f26b12e5 Duh, the nfsd hacks in tests still used RUMP_SYS_NETWORKING. It
appears that using nxr to search for users wasn't a very good idea.
Put networking back and make the test of the defines give out
#errors.

me be fixink this
2011-03-09 10:10:19 +00:00
pooka 53b769ebd0 g/c old-style syscall selection method 2011-03-08 18:35:10 +00:00
pooka ffad644563 regen: include rumpclient syscall headers from source tree instead of host 2011-03-08 18:31:11 +00:00
pooka 91240244df Nuke all threads belonging to a process calling exec before allowing
the exec handshake to return.

In addition to being The Right Thing To Do, fixes some nasty
conditions for CLOEXEC fd's (or at least does so in theory, I
couldn't create any problems although I tried).
2011-03-08 12:39:28 +00:00
pooka 9d382a98c5 Fill in a functional struct lwp (especially l_mutex) before exposing
it on p_lwps.
2011-03-07 21:04:47 +00:00
bouyer 063f96f3c2 merge the bouyer-quota2 branch. This adds a new on-disk format
to store disk quota usage and limits, integrated with ffs
metadata. Usage is checked by fsck_ffs (no more quotacheck)
and is covered by the WAPBL journal. Enabled with kernel
option QUOTA2 (added where QUOTA was enabled in kernel config files),
turned on with tunefs(8) on a per-filesystem
basis. mount_mfs(8) can also turn quotas on.

See http://mail-index.netbsd.org/tech-kern/2011/02/19/msg010025.html
for details.
2011-03-06 17:08:10 +00:00