Nate Lawson [Tue, 30 Mar 2004 07:35:18 +0000 (07:35 +0000)]
Disable serialize_methods and enable _OSI support by default. The former
is necessary because some IBMs use recursive methods (pointed out by
Robert Moore from Intel). The latter was a typo on my part. It was disabled
by default when it should have been enabled.
Bruce Evans [Tue, 30 Mar 2004 07:01:56 +0000 (07:01 +0000)]
Fixed a style bug in previous commit (misformatted comment). Fixed
some nearby bugs (rotted and missing comments). Use similar wording
for describing broken options.
Vinod Kashyap [Tue, 30 Mar 2004 03:46:00 +0000 (03:46 +0000)]
Initial check-in of the device driver for 3ware's 9000 series
PATA/SATA RAID controllers. This driver is a SIM under CAM, and
so, behaves like a driver for a SCSI controller.
Replace pscomp() with a cleaner version, mostly written by bde (*).
This corrects a problem of lost-precision for `-r' (sort-by-CPU). Also,
for sort-by-CPU and sort-by-memory, any processes which have the same
value CPU or MEMORY are now sorted by TTY and then (if needed) by pid.
(* - I just added the NODEV checks, after doing some testing of my own)
Peter Wemm [Mon, 29 Mar 2004 22:41:21 +0000 (22:41 +0000)]
Clean up the stub fake vnode locking implemenations. The main reason this
stuff was here (NFS) was fixed by Alfred in November. The only remaining
consumer of the stub functions was umapfs, which is horribly horribly
broken. It has missed out on about the last 5 years worth of maintenence
that was done on nullfs (from which umapfs is derived). It needs major
work to bring it up to date with the vnode locking protocol. umapfs really
needs to find a caretaker to bring it into the 21st century.
Robert Watson [Mon, 29 Mar 2004 22:16:39 +0000 (22:16 +0000)]
Add per-softc locking to if_tun:
- Add tun_mtx to tun_softc. Annotate what is (and isn't) locked by it.
- Lock down tun_flags, tun_pid.
- In the output path, cache the value of tun_flags so it's consistent
when processing a particular packet rather than re-reading the field.
- In general, use unlocked reads for debugging.
- Annotate a couple of places where additional unlocked reads may be
possible.
- Annotate that tun_pid is used as a bug in tunopen().
if_tun is now largely MPSAFE, although questions remain about some of
the cdevsw fields and how they are synchronized.
Robert Watson [Mon, 29 Mar 2004 18:42:51 +0000 (18:42 +0000)]
Lock down if_tun global variables using a new mutex, tunmtx. As with
other pseudo-interfaces, break out tear-down of a softc into a
separate tun_destroy() function, and invoke that from the module
unloader. Hold tunmtx across manipulations of the global softc list.
Doug Rabson [Mon, 29 Mar 2004 18:37:37 +0000 (18:37 +0000)]
If we change obj_rtld.path after initialising __progname, make sure we
change __progname to point at the new storage otherwise it ends up
pointing at freed memory which leads to confusing garbled error messages.
Robert Watson [Mon, 29 Mar 2004 17:57:43 +0000 (17:57 +0000)]
In sofree(), moving caching of 'head' from 'so->so_head' to later in
the function once it has been determined to be non-NULL to simplify
locking on an earlier return.
Mike Makonnen [Mon, 29 Mar 2004 13:56:04 +0000 (13:56 +0000)]
Make the minimum implementation of pthread_kill conform to the
functionality spelled out in SUSv3.
o Signal of 0 means do everything except send the signal
o Check that the signal is not invalid
o Check that the target thread is not dead/invalid
Mike Makonnen [Mon, 29 Mar 2004 13:51:51 +0000 (13:51 +0000)]
o If a thread is marked as detached AND on the dead threads list
the correct return value is ESRCH.
o Don't check the attribute for NULL. It's the caller's responsibility.
o Make the bitwise comparison explicit.
Robert Watson [Mon, 29 Mar 2004 02:21:56 +0000 (02:21 +0000)]
Conditionally acquire Giant when entering the sockets layer via the
socket-specific system calls based on debug.mpsafenet, rather than
acquiring Giant unconditionally.
Ken Smith [Mon, 29 Mar 2004 02:01:42 +0000 (02:01 +0000)]
MFi386: correctly calculate the top-of-stack when a kthread is created
with a larger kernel stack. Remove inclusion of opt_kstack_pages.h now
that it's unused.
Note: If anyone's toes got stepped on by me doing this let me know
privately please.
Robert Watson [Mon, 29 Mar 2004 01:55:32 +0000 (01:55 +0000)]
Conditionally acquire Giant when entering the socket layer via file
descriptor operations based on debug.mpsafenet, rather than acquiring
Giant unconditionally.
Tim J. Robbins [Mon, 29 Mar 2004 01:29:13 +0000 (01:29 +0000)]
Add a new LC_MONETARY data file for the ja_JP.UTF-8 locale instead of using
the ja_JP.eucJP version. Although the latter looks like plain ASCII,
it is actually JIS Roman, so it is not correct to treat it as UTF-8.
Have this source explicitly include <sys/proc.h>, since it references
values such as P_CONTROLT and PS_INMEM. But this still won't define
PID_MAX for us, since that is hidden inside of '#ifdef _KERNEL'.
Ken Smith [Mon, 29 Mar 2004 01:24:13 +0000 (01:24 +0000)]
MFi386: correctly calculate the top-of-stack when a kthread is created
with a larger kernel stack. Remove inclusion of opt_kstack_pages.h now
that it's unused.
Ken Smith [Mon, 29 Mar 2004 01:15:39 +0000 (01:15 +0000)]
Remove "-frename-registers" option for sparc64 kernel builds. That
was not present in what I originally tested when checking to see if
the kernel built/ran with the -O2 change. Recent instability in
sparc64 kernel was tracked to this. A reproducible kernel stack
traceback followed by hard hang during the call to msleep() at the
point the kernel waits 15 seconds for the SCSI bus to settle crept in
to recent kernel builds and it seems to go away with this patch.
Robert Watson [Sun, 28 Mar 2004 23:12:19 +0000 (23:12 +0000)]
Invert the logic of NET_LOCK_GIANT(), and remove the one reference to it.
Previously, Giant would be grabbed at entry to the IP local delivery code
when debug.mpsafenet was set to true, as that implied Giant wouldn't be
grabbed in the driver path. Now, we will use this primitive to
conditionally grab Giant in the event the entire network stack isn't
running MPSAFE (debug.mpsafenet == 0).
Bruce M Simpson [Sun, 28 Mar 2004 21:43:27 +0000 (21:43 +0000)]
Use the BSD madvise() syscall implementation for Linux binary emulation,
instead of treating it as an unimplemented syscall. This appears to make
StarOffice 7.0 Linux binaries work according to submitter; also tested
with nvidia driver by submitter.
Max Laier [Sun, 28 Mar 2004 20:04:12 +0000 (20:04 +0000)]
Commit two fixes from OpenBSD's stable branch:
- Fix binat for incoming connections when a netblock (not just a single
address) is used for source in the binat rule. closes PR 3535, reported by
Karl O.Pinc. ok henning@, cedric@
- Fix a problem related to empty anchor rulesets, which could cause a kernel
panic.
Strictly speaking this is unnecessary, but it allows nanobsd to work
on systems from before the -x and -y arguments to mdconfig(8) worked
for vnode backing.
Submitted by: "Oivind H. Danielsen" <oivind.danielsen@kopek.net>
Marcel Moolenaar [Sun, 28 Mar 2004 18:01:15 +0000 (18:01 +0000)]
Add a simple tool that prints out a register offset table to map
from the gdb(1) register number to offsets within struct reg and
struct fpreg. The tool is useful only on selected platforms. On
ia64 the registers are all over the place to simplify handling of
them in various situations, but which makes creating or maintaining
such an offset table error prone to do by hand.
Since remote kernel debugging operates on the same register numbers,
it would be a natural choice to use an identical offset table in the
kernel. However, since the kernel does not operate on struct reg nor
struct fpreg in the remote gdb(1) case, such would not make sense.
Whether we want to use this tool to create offsets for use in the
kernel or duplicate the knowledge of which register number maps to
what register is something that will become clear soon.
Note: in order to build cross debuggers, one cannot use target
headers and/or target definitions. That's why offsets need to be
hardcoded in the first place. Unpleasant, but necessary.
Mike Makonnen [Sun, 28 Mar 2004 14:05:28 +0000 (14:05 +0000)]
Remove the garbage collector thread. All resources are freed
in-line. If the exiting thread cannot release a resource, then
the next thread to exit will release it.
Alexander Kabaev [Sun, 28 Mar 2004 05:55:27 +0000 (05:55 +0000)]
Reset callout if in nfs_timeout and rpcclnt_timeout functions. Timer
are supposed to continue firing as long as there is work to do, not
stop after the first invocation.
This is damage control after a patch that has been committed prematurely.
Bruce Evans [Sun, 28 Mar 2004 04:17:36 +0000 (04:17 +0000)]
Fixed s style bug in previous commit (tab lossage). Fixed some nearby
style bugs (more tab lossage, unclear description of TDF_USTATCLOCK,
and English usage errors).
If <x> is a process id that does not exist, then just print the header
(if any) and exit, thus matching the behavior on -stable and other OS's.
My earlier attempt to fix this (v1.65) only seemed to work because of a
lucky random value in nentries (which was not being initialized back
when I tested that earlier patch).
If a non-existent user is given as part of `-U userlist', treat it as
a fatal error instead of a minor warning. It is possible that a few
users are used to the previous behavior, but I'm claiming it was a bug.
Change the #if-ish logic which is used to add the `-f' option when `ps'
is compiled with LAZY_PS, so that there is only one PS_ARGS string to
modify when changing the option-list. Also get `-f' to show up in the
usage() statement when compiled with LAZY_PS.
Reduce 'td' argument to 'cred' (struct ucred) argument in those functions:
- in_pcbbind(),
- in_pcbbind_setup(),
- in_pcbconnect(),
- in_pcbconnect_setup(),
- in6_pcbbind(),
- in6_pcbconnect(),
- in6_pcbsetport().
"It should simplify/clarify things a great deal." --rwatson
Alan Cox [Sat, 27 Mar 2004 19:50:23 +0000 (19:50 +0000)]
Revise the direct or optimized case to use uiomove_fromphys() by the reader
instead of ephemeral mappings using pmap_qenter() by the writer. The
writer is still, however, responsible for wiring the pages, just not
mapping them. Consequently, the allocation of KVA for the direct case is
unnecessary. Remove it and the sysctls limiting it, i.e.,
kern.ipc.maxpipekvawired and kern.ipc.amountpipekvawired. The number
of temporarily wired pages is still, however, limited by
kern.ipc.maxpipekva.
Note: On platforms lacking a direct virtual-to-physical mapping,
uiomove_fromphys() uses sf_bufs to cache ephemeral mappings. Thus,
the number of available sf_bufs can influence the performance of pipes
on platforms such i386. Surprisingly, I saw the greatest gain from this
change on such a machine: lmbench's pipe bandwidth result increased from
~1050MB/s to ~1850MB/s on my 2.4GHz, 400MHz FSB P4 Xeon.
- Change `-p' to allow a list of process IDs, and `-t' to allow a list
of terminal names, instead of only a single value for each.
- Add the `-A' option of SUSv3, which is exactly the same as `-ax'.
- Add the `-G gidlist' (group id).
- Allow any of these "selector options" to be specified multiple times,
and have `ps' keep adding to a given list -- instead of replacing the
previously-specified values.
- Fix interactions between selector-options, so that: "If any are
specified, ... ps shall select the processes represented by the
inclusive OR of all the selection-criteria options." (from SUSv3)
- Add a `-X' option, which is the reverse of the `-x' option.
- various minor improvements in parsing and error handling.
This does not get us to match POSIX/SUSv3, but it gets us closer. The
`-g pgidlist', `-R ruserlist' and `-s sidlist' options mentioned in
freebsd-standards are still under debate, so they skipped for now.
It should be true that this introduces no user-visible incompatible
changes, except to support "new stuff" that was not supported before.
Marcel Moolenaar [Sat, 27 Mar 2004 18:21:24 +0000 (18:21 +0000)]
Change the type of the various CPU masks to cpumask_t. Note that as
long as there are still explicit uses of int, whether in types or
in function names (such as atomic_set_int() in sched_ule.c), we can
not change cpumask_t to be anything other than u_int. See also the
commit log for sys/sys/types.h, revision 1.84.
Marcel Moolenaar [Sat, 27 Mar 2004 17:44:25 +0000 (17:44 +0000)]
MFi386: correctly calculate the top-of-stack when a kthread is created
with a larger kernel stack. Remove inclusion of opt_kstack_pages.h now
that it's unused.
Mike Makonnen [Sat, 27 Mar 2004 15:05:28 +0000 (15:05 +0000)]
o Since we're not using signals for thread synchronization anymore,
sigprocmask no longer needs to be wrapped.
o raise(3) is applied to the calling thread in a threaded program.
o In the sigaction wrapper reference the correct structure.
o Don't treat SIGTHR especially anymore (infact it won't exist in
a little while).