Commit Graph

108765 Commits

Author SHA1 Message Date
Robert Watson
ae1e5c5d8d Move from using the socket reference count to the file reference
count to prevent sockets from being garbage collected during
socket-specific system calls.  This is the same approach used in
most VFS-specific system calls, as well as generic file descriptor
system calls such as read() and write().

To do this, add a utility function getsock(), which is logically
identical to getvnode() used for the same purpose in VFS.  Unlike
fgetsock(), it returns with the file reference count elevated, but
no bump of the socket reference count.  Replace matching calls to
fputsock() with fdrop().

This change is made to all socket system calls other than
sendfile() and accept(), but the approach should be applicable to
those system calls also.

This shaves about four mutex operations off of each of these
system calls, including send() and recv() variants, adding about
1% to pps on minimal UDP packets for UP using netblast, and 4% on
SMP.

Reviewed by:	pjd
2004-10-24 23:45:01 +00:00
Yaroslav Tykhiy
c999732b45 Log the actual number of bytes sent on the wire to /var/log/ftpd
instead of the disk size of the file sent.   Since the log file
is intended to provide data for anonymous ftp traffic accounting,
the disk size of the file isn't really informative in this case.

PR:		bin/72687
Submitted by:	Oleg Koreshkov
MFC after:	1 week
2004-10-24 20:12:08 +00:00
Alan Cox
01ad40dac5 Use VM_ALLOC_NOBUSY instead of calling vm_page_wakeup(). 2004-10-24 20:09:59 +00:00
Poul-Henning Kamp
b792bebeea Move the buffer method vector (buf->b_op) to the bufobj.
Extend it with a strategy method.

Add bufstrategy() which do the usual VOP_SPECSTRATEGY/VOP_STRATEGY
song and dance.

Rename ibwrite to bufwrite().

Move the two NFS buf_ops to more sensible places, add bufstrategy
to them.

Add inlines for bwrite() and bstrategy() which calls through
buf->b_bufobj->b_ops->b_{write,strategy}().

Replace almost all VOP_STRATEGY()/VOP_SPECSTRATEGY() calls with bstrategy().
2004-10-24 20:03:41 +00:00
Robert Watson
9d6c85734d Mention fdescfs(5) and why it might be useful.
MFC after:	1 week
Suggested by:	Stephen Montgomery-Smith <stephen at math dot missouri dot edu>
2004-10-24 19:44:23 +00:00
Max Laier
b6b3698c8e Fix a panic discovered with some apache2 configure test (that seemed to
trigger a socket creation race some some kind). Checking for non-NULL socket
and credential is not a bad idea anyway. Unfortunatly too late for the
release.

Reported & tested by:	Gilbert Cao
MFC after:		2 weeks
2004-10-24 19:35:02 +00:00
Alan Cox
e5526e6aa5 Acquire the vm object lock before rather than after calling
vm_page_sleep_if_busy().  (The motivation being to transition
synchronization of the vm_page's PG_BUSY flag from the global page queues
lock to the per-object lock.)
2004-10-24 19:32:19 +00:00
Alan Cox
ddf4bb37c8 Use VM_ALLOC_NOBUSY instead of calling vm_page_wakeup(). 2004-10-24 18:46:32 +00:00
Ruslan Ermilov
8bf62bdadb For variables that are only checked with defined(), don't provide
any fake value.
2004-10-24 16:20:59 +00:00
Ruslan Ermilov
be88e5179d Only check if ENABLE_SUID_NEWGRP is defined, for consistency with
other ENABLE_SUID_* variables.
2004-10-24 16:02:38 +00:00
Ruslan Ermilov
b1bffc1632 For variables that are only checked with defined(), don't provide
any fake value.

While here, sort NO*'s in dictionary order to ease searching by a
human being.
2004-10-24 15:52:04 +00:00
Ruslan Ermilov
6ef8c2e5c6 For variables that are only checked with defined(), don't provide
any fake value.
2004-10-24 15:46:50 +00:00
Ruslan Ermilov
a35d88931c For variables that are only checked with defined(), don't provide
any fake value.
2004-10-24 15:33:08 +00:00
Ruslan Ermilov
88348311f3 There's no such knob as WERROR. 2004-10-24 14:55:35 +00:00
Hiroki Sato
f74a2ca05e Add a Japanese override of dev-auto.sgml.
Based on work by:	Ryusuke Suzuki (ryusuke at nucl.sci.hokudai.ac.jp)
2004-10-24 14:31:27 +00:00
Ruslan Ermilov
3d6e04cb25 Fixed misspelling of DPADD. 2004-10-24 14:25:53 +00:00
Dag-Erling Smørgrav
82a21971a6 - use realpath /dev/dumpdev instead of just /dev/dumpdev so messages
will show the real device name
- show different error messages for missing dump device and directory
2004-10-24 13:04:09 +00:00
Hidetoshi Shimokawa
c751e6f0fa - Use quad_t for dcons buffer address and size.
- Allow read/write access to dcons buffer passed by loader(8).
2004-10-24 12:41:04 +00:00
Hidetoshi Shimokawa
36b6815611 Preserve dcons(4) buffer passed by loader(8). 2004-10-24 12:37:47 +00:00
Ruslan Ermilov
55a74fe7a3 NEED_LIBNAMES is gone long ago. 2004-10-24 12:36:21 +00:00
Ruslan Ermilov
39ebd90532 Collapse several adjacent .if's into .if/.elif. 2004-10-24 12:32:41 +00:00
Yoshihiro Takahashi
222be03974 ELF64 support is not needed on pc98. 2004-10-24 12:18:11 +00:00
Yoshihiro Takahashi
c25984c97c MFi386: revision 1.4. 2004-10-24 12:16:18 +00:00
Yoshihiro Takahashi
3ad0b93804 MFi386: Set bi_basemem and bi_extmem variables.
Respect RB_MULTIPLE flag.
2004-10-24 12:15:07 +00:00
Yoshihiro Takahashi
8c3c8ed197 MFi386: Add support for preloading ELF relocatable object format modules. 2004-10-24 12:14:05 +00:00
Yoshihiro Takahashi
e1dd8f11d1 Disable ed1 - ed12. 2004-10-24 12:07:02 +00:00
Yoshihiro Takahashi
a7d53c9cae Merged from src/sbin/fdisk/fdisk.c revision 1.75.
(Don't prepend "/dev" if an argument given is an absolute pathname.)
2004-10-24 12:05:10 +00:00
Ralf S. Engelschall
1b0ee80834 Add identifiers for the HP Laserjet 2300d USB
printer and the HP ScanJet 4670v USB scanner.

MFC after:	1 week
2004-10-24 11:16:29 +00:00
Ruslan Ermilov
7475b21fcc -O2 compile isn't quite ready for WARNS=2 yet. 2004-10-24 10:42:15 +00:00
Dag-Erling Smørgrav
30fdf276fb Allow multiple devices to be specified on one device / nodevice line.
Also allow "device" / "nodevice" to be spelled "devices" / "nodevices".

MFC after:	2 weeks
2004-10-24 10:27:16 +00:00
Scott Long
5eded4f3d0 Update the family tree for FreeBSD 5.3 2004-10-24 10:09:20 +00:00
Dag-Erling Smørgrav
9b736ef9e6 If the file specified in an "include" line does not exist in the current
directory, and its name does not begin with a period or a forward slash,
go look for it in ../../conf.

Wished for by:	scottl
MFC after:	2 weeks
2004-10-24 09:38:41 +00:00
Scott Long
7d9aed9c4c Fix some warnings that only triggered in LINT. 2004-10-24 09:23:07 +00:00
Scott Long
6d0873dadb Update for 5-STABLE. 2004-10-24 09:07:06 +00:00
Scott Long
085f35d6f3 Hook the hptmv driver up to the build. 2004-10-24 08:53:40 +00:00
Scott Long
f01be89133 Embed the correct name. 2004-10-24 08:48:32 +00:00
Scott Long
b953df2a33 Clean up some messy Makefile stuff so that this can be built into the
kernel.
2004-10-24 08:38:29 +00:00
Ruslan Ermilov
743d0f6640 Hack around a problem with sys/tools/usbdevs2h.awk that generates
both usbdevs.h and usbdevs_data.h.  (The latter was not cleaned.)
2004-10-24 08:26:48 +00:00
Ruslan Ermilov
201cef5702 Curlies only work in target and sources specifications, but
not when passed to Bourne shell.  This unbreaks "make clean".
2004-10-24 07:54:44 +00:00
Alan Cox
2a444f81a0 Use VM_ALLOC_NOBUSY to eliminate an unneeded vm_page_wakeup() call and the
synchronization that one entails.
2004-10-24 07:31:07 +00:00
Alan Cox
91dd969325 Avoid repeated acquisition and release of the vm object lock inside of
two loops in agp_generic_bind_memory().  As an intended side-effect, all
of the calls to vm_page_wakeup() are now performed with the containing
vm object lock held.
2004-10-24 07:12:13 +00:00
Ruslan Ermilov
10cdf827cd Sort SUBDIR. 2004-10-24 06:22:16 +00:00
Alan Cox
0f9f9bcb53 Introduce VM_ALLOC_NOBUSY, an option to vm_page_alloc() and vm_page_grab()
that indicates that the caller does not want a page with its busy flag set.
In many places, the global page queues lock is acquired and released just
to clear the busy flag on a just allocated page.  Both the allocation of
the page and the clearing of the busy flag occur while the containing vm
object is locked.  So, the busy flag might as well never be set.
2004-10-24 06:15:36 +00:00
Scott Long
1713e81b9c Import the HighPoint RocketRAID 182x driver. Thanks to HighPoint for
providing the original driver, and thanks to IronSystems for providing
hardware for testing.
2004-10-24 05:37:23 +00:00
Giorgos Keramidas
d2c50f8bab Add a missing full-stop to match the rest of the items in a list. 2004-10-24 00:26:35 +00:00
David Xu
fca6ccde6e Check unhandled signals before thread marks itself as DEAD,
this reduces chances of signal losting problem found by
Peter Holm <peter@holm.cc>
2004-10-23 23:37:54 +00:00
David Xu
b4f9f84b96 1. Move thread list flags into new separate member, and atomically
put DEAD thread on GC list, this closes a race between pthread_join
   and thr_cleanup.
2. Introduce a mutex to protect tcb initialization, tls allocation and
   deallocation code in rtld seems no lock protection or it is broken,
   under stress testing, memory is corrupted.

Reviewed by: deischen
patch partly provided by: deischen
2004-10-23 23:28:36 +00:00
Hidetoshi Shimokawa
1be7387c03 Add -m option, set default fwmem target. 2004-10-23 23:28:08 +00:00
Robert Watson
09745181fd Use errx() instead of fprintf()/exit() for conciseness.
Suggested by:	ru (some time ago)
2004-10-23 22:18:37 +00:00
Robert Watson
a09c60ffeb Use errx() instead of perror()/exit() for conciseness.
Suggested by:	ru (some time ago)
2004-10-23 22:11:35 +00:00