Commit Graph

130057 Commits

Author SHA1 Message Date
Gleb Smirnoff
fbfdcf8735 Since rev. 1.94 of netinet/in.c, the netinet layer frees all its
multicast memberships, when interface is detached. Thus, when
an underlying interface is detached, we do not need to free
our multicast memberships.

Reviewed by:	bms
2007-02-02 09:39:09 +00:00
Poul-Henning Kamp
d59fd7af69 Update with the latest Bulletin C from IERS. 2007-02-02 09:19:27 +00:00
Konstantin Belousov
e6a4f4cd40 Record kqueue -> struct mount mtx -> vnode interlock lock order to
catch the places where reverse lock order is instantiated.

OKed by:	jeff
2007-02-02 09:02:18 +00:00
Konstantin Belousov
b4bb515484 Remove extern int hz; use proper include file instead. 2007-02-02 08:58:16 +00:00
Kevin Lo
b0ea96df61 Use bus_get_dma_tag() so iwi(4) works on platforms requiring it.
Approved by: cognet
2007-02-02 05:17:18 +00:00
Julian Elischer
c6226eea4c Move the seting of the idle_mask bits to a place where they
can't be wrong.
Also use the IDLETD bit in the thread mask to test if its an idle thread
rather than doing a PCPU access.
2007-02-02 05:14:22 +00:00
Kevin Lo
8c605560c4 Remove a bogus i = 0
Approved by: cognet
2007-02-02 05:14:21 +00:00
Kip Macy
6d449d27d9 Add support for IPI_PREEMPT in order to enable use of the ULE scheduler 2007-02-02 05:00:21 +00:00
Kip Macy
d5ab3ef787 match against both dirty and writeable for marking page dirty 2007-02-02 04:57:11 +00:00
Sam Leffler
d9ff043726 add IEEE80211_IS_CHAN_PASSIVE
MFC after:	1 week
2007-02-02 02:45:33 +00:00
Sam Leffler
421e1cce17 create empty opt_ah.h for compiling athstats.o; it just needs
the PHY definitions and not the descriptor so it doesn't matter
if it's correct relative to the hal.o
2007-02-02 02:39:56 +00:00
Andre Oppermann
6741ecf595 Auto sizing TCP socket buffers.
Normally the socket buffers are static (either derived from global
defaults or set with setsockopt) and do not adapt to real network
conditions. Two things happen: a) your socket buffers are too small
and you can't reach the full potential of the network between both
hosts; b) your socket buffers are too big and you waste a lot of
kernel memory for data just sitting around.

With automatic TCP send and receive socket buffers we can start with a
small buffer and quickly grow it in parallel with the TCP congestion
window to match real network conditions.

FreeBSD has a default 32K send socket buffer. This supports a maximal
transfer rate of only slightly more than 2Mbit/s on a 100ms RTT
trans-continental link. Or at 200ms just above 1Mbit/s. With TCP send
buffer auto scaling and the default values below it supports 20Mbit/s
at 100ms and 10Mbit/s at 200ms. That's an improvement of factor 10, or
1000%. For the receive side it looks slightly better with a default of
64K buffer size.

New sysctls are:
  net.inet.tcp.sendbuf_auto=1 (enabled)
  net.inet.tcp.sendbuf_inc=8192 (8K, step size)
  net.inet.tcp.sendbuf_max=262144 (256K, growth limit)
  net.inet.tcp.recvbuf_auto=1 (enabled)
  net.inet.tcp.recvbuf_inc=16384 (16K, step size)
  net.inet.tcp.recvbuf_max=262144 (256K, growth limit)

Tested by:	many (on HEAD and RELENG_6)
Approved by:	re
MFC after:	1 month
2007-02-01 18:32:13 +00:00
Andre Oppermann
6a37f331d7 Generic socket buffer auto sizing support, header defines, flag inheritance.
MFC after:	1 month
2007-02-01 17:53:41 +00:00
Andre Oppermann
087b55ea59 Change the way the advertized TCP window scaling is computed. Instead of
upper-bounding it to the size of the initial socket buffer lower-bound it
to the smallest MSS we accept.  Ideally we'd use the actual MSS information
here but it is not available yet.

For socket buffer auto sizing to be effective we need room to grow the
receive window.  The window scale shift is determined at connection setup
and can't be changed afterwards.  The previous, original, method effectively
just did a power of two roundup of the socket buffer size at connection
setup severely limiting the headroom for larger socket buffers.

Tested by:	many (as part of the socket buffer auto sizing patch)
MFC after:	1 month
2007-02-01 17:39:18 +00:00
Pav Lucistnik
103fcbb3ba Fix previous rev.: don't step behind the end of memory we allocate 2007-02-01 15:52:47 +00:00
Ken Smith
7404bf519f Boot floppy for i386 overflowed during Jan. 2007 snapshot build, fix
it before Feb. 2007 snapshot build...
2007-02-01 15:12:44 +00:00
Craig Rodrigues
f716c4e792 Remove, since code has been merged into mount_nfs,
and mount_nfs Makefile builds mount_nfs and creates a mount_nfs4 link to it.
2007-02-01 14:18:01 +00:00
Konstantin Belousov
d0b2365eec Introduce some more SO_ option equivalents from Linux to FreeBSD.
The msg variable in linux_recvmsg() was not initialized.
Copy it from userspace.

Submitted by: rdivacky
2007-02-01 13:36:19 +00:00
Konstantin Belousov
75ee4e5462 No need to lock emul_lock in exit_group() because em->shared
cannot change (because its referenced by curthread). This fixes
a LOR caused by acquiring emul_shared_lock while holding emul_lock.

Fix typo in comment.

Submitted by: rdivacky
2007-02-01 13:33:33 +00:00
Konstantin Belousov
25954d7430 No need to synchronize linux_schedtail with linux_proc_init.
p->p_emuldata is properly initialized in the time when the child can run.

Do not set p->p_emuldata to NULL when the process is exiting.
It does not make any sense and only costs 2 mutex operations.

Do not lock emul_data to unlock it on the very next line.
Comment on possible race while there.

Reparent all procs that are part of a threading group but not its leaders
to init and SIGCHLD init to finish the zombies off. This fixes zombies
left after opera's exit. [1]

There is no need to lock p_em in the linux_proc_init CLONE_THREAD
case because the process cannot change the address of the p_em->shared
because its currently running this code path.
Move assigning of em->shared outside emul_shared_lock.

Noticed by: Scott Robbins <scottro@nyc.rr.com> [1]
Submitted by: rdivacky
2007-02-01 13:29:27 +00:00
Konstantin Belousov
a9ccaccfc3 Fix LOR that occurs because proctree_lock was acquired while holding
emuldata lock by moving the code upwards outside the emul_lock coverage.

Submitted by: rdivacky
2007-02-01 13:27:52 +00:00
Konstantin Belousov
84fbdf86b3 MFi386: Use LINUX_SIG_VALID macro.
Submitted by: rdivacky
2007-02-01 13:24:40 +00:00
Ariff Abdullah
9e4c8259a3 Fix huge memory leak within sound buffer (during channel destruction,
buffer resizing, etc.) that was here since eon. Free all (unmanaged)
allocated buffer through sndbuf_destroy() in case we forgot to call
sndbuf_free(). For a managed buffer (mostly hw specific managed buffer),
either provide CHANNEL_FREE() method with appropriate return value to
invoke semi-automatic sndbuf_free() or simply do it on their own. If
everything is failed, sndbuf_destroy() will come to the rescue as a
final measure.

MFC after:	3 days
2007-02-01 09:46:03 +00:00
Ariff Abdullah
e444a20971 Fix apparent memory leak (during vchan destruction) that was here
since eon.
2007-02-01 09:30:01 +00:00
Rong-En Fan
438e97c073 Remove old libmytinfo link.
Approved by:	delphij (mentor)
Requested by:	ache
2007-02-01 08:45:27 +00:00
Mike Pritchard
dfaa806864 Make quota exit with a non-zero status if one more more file
systems are over quota, as documented in the man page.

PR:	bin/77918
2007-02-01 08:37:44 +00:00
Tim Kientzle
a9490c597b Add support for a new archive format "empty" that reads empty files. 2007-02-01 06:18:17 +00:00
Tai-hwa Liang
c69e1d83f5 Reflecting the removal of MSDOSFS_LARGE found in sys/conf/files:1.1173.
This should fix the run time bustage observed on recent -CURRENT whilst
mounting a MSDOS filesystem with non-default locale/code page:

	link_elf: symbol msdosfs_fileno_free undefined
	KLD msdosfs_iconv.ko: depends on msdosfs - not available
2007-02-01 04:21:03 +00:00
Mike Pritchard
cbd21da6b2 Docment the acceptable values for the id parameter. 2007-02-01 02:31:02 +00:00
Mike Pritchard
6c62e3fce9 Prevent quotactl calls that pass in an id of -1 from incorrectly
using the callers UID instead of the GID when performing group
operations.  This could allow users to determine group quota
information for groups they are not a member of in some cases.

Rename the "uid" parameter in ufs_quotactl to "id" to better show
that it is used for more than just the uid, and to be more in line
with the naming conventions in the other quota routines.

PR:	kern/33940
2007-02-01 02:13:53 +00:00
Mike Pritchard
3c0508582d Disallow negative UIDs when processing quotactl options. 2007-02-01 01:01:56 +00:00
Mohan Srinivasan
4e99994cc9 Fix for a vnode lock leak in nfs_create() in the event of an error.
Spotted by ups@.
2007-01-31 23:10:27 +00:00
Jason Evans
38cc6e0a82 Fix a utrace(2)-related bug in calloc(3).
Integrate various pedantic cleanups.

Submitted by:	Andrew Doran <ad@netbsd.org>
2007-01-31 22:54:19 +00:00
Ade Lovett
1bc1069b83 Remove hard-coded limit (200) on maximum number of packages that can be
added with a single invocation of pkg_add, replacing it with something
rather more dynamic.

Approved by:	portmgr (pav)
Tested by:	full pointyhat package run
MFC after:	1 week
2007-01-31 22:34:45 +00:00
Andrew Gallatin
dce01b9b27 - Add 99% of a callout based watchdog. The remaining 1% is waiting
for pci_cfg_restore() to be exported.  It was tested using a
  hackily accessed pci_cfg_restore().

- Add ifmedia_removeall() to mxge_detach() in order to stop leaking
  an ifaddr

- Fix a small acounting bug introduced by the locking code shuffle
  which could cause spurious watchdog resets now that we have a
  watchdog.

Sponsored by: Myricom
2007-01-31 19:53:36 +00:00
Erwin Lansing
d43c17aa76 Add gnustep and ports-mgmt ports categories.
Reviewed by:		simon
MFC after:		3 days
2007-01-31 19:13:08 +00:00
Andrew Gallatin
c265717682 destroy busdma maps even if they are NULL, so as to avoid leaking
busdma tags.
2007-01-31 15:47:44 +00:00
Andrew Gallatin
a98d6cd71c Abandon using sleepable locks in favor of mutexes for mxge's if_ioctl
locking in preparation for adding a watchdog handler (callouts must
not use sleepable locks).  This required shuffling memory and
interrupt allocation to the attach routine rather than if_ioctl so as
to avoid potential sleeps while bringing up the interface.
2007-01-31 15:29:31 +00:00
Pav Lucistnik
ad9096d289 - Add ports-ports-mgmt collection 2007-01-31 14:35:05 +00:00
Bruce M Simpson
1976bc4af7 Import macros IN_LINKLOCAL(), IN_PRIVATE(), IN_LOCAL_GROUP(), IN_ANY_LOCAL().
This is not a functional change.

IN_LINKLOCAL() tests if an address falls within the IPv4 link-local prefix.
IN_PRIVATE() tests if an address falls within an RFC 1918 private prefix.
IN_LOCAL_GROUP() tests if an address falls within the statically assigned
link-local multicast scope specified in RFC 2365.
IN_ANY_LOCAL() tests for either of IN_LINKLOCAL() or IN_LOCAL_GROUP().

As with the existing macros in the FreeBSD netinet stack, comparisons
are performed in host-byte order.

See also:	RFC 1918, RFC 2365, RFC 3927
Obtained from:	NetBSD (dyoung@)
MFC after:	2 weeks
2007-01-31 14:34:47 +00:00
Joel Dahl
fcacf52ec7 Put #ifndef... after the license.
Approved by:	ariff
2007-01-31 12:10:48 +00:00
Robert Watson
1b824bcfab s/software was developed/documentation was written/
Suggested by:	ru
2007-01-31 09:40:31 +00:00
Joel Dahl
22821dadfc s/WHETHERIN/WHETHER IN/ & s/THEPOSSIBILITY/THE POSSIBILITY/ in the
license text.

Approved by:	imp
2007-01-31 08:53:45 +00:00
Xin LI
161c3dc4b0 Fix typo.
Obtained from:	DragonFly
2007-01-31 07:13:25 +00:00
Maxim Konovalov
37a5c137f0 o DragonFly 1.8.0 added. 2007-01-31 04:58:03 +00:00
Xin LI
5ded07e693 Remove GNU gzip left-offs, they are no longer necessary. 2007-01-31 03:44:42 +00:00
Gleb Smirnoff
41ee9d56dc Fix typo.
Submitted by:	pluknet <pluknet gmail.com>
2007-01-30 20:22:07 +00:00
Ruslan Ermilov
7d3017efd2 Add missing library dependencies and sort libraries
using lorder(1) so that static linkage is possible.
2007-01-30 15:10:37 +00:00
Ruslan Ermilov
e2f227fbaa Fix the logic bug that caused the custom versions of warn(3) and
warnx(3) to be compiled on systems that have it (e.g. FreeBSD),
while the intention was opposite, i.e., compile them on systems
that don't have them.  Also fixes static linkage of pkg_sign(1).
2007-01-30 15:09:30 +00:00
Ruslan Ermilov
a35dcad5cb MFsparc64: Add .cvsignore file here too. 2007-01-30 10:50:55 +00:00