Commit Graph

123566 Commits

Author SHA1 Message Date
Marius Strobl
338199fe88 - Since critical sections no longer raise the processor interrupt level to
above what's used for fast interrupts, only interrupts with the level of
  the interrupt which led to calling intr_fast() (which is used with both
  fast and ithread interrupts) are blocked while in that function. Thus
  intr_fast() can be preempted by a fast interrupt (which are of a higher
  level than ithread interrupts) while servicing an ithread interrupt. This
  can lead to a stale pointer to the head of the active interrupt requests
  list when back in the ithread interrupt invocation of intr_fast(), in turn
  resulting in corruption of the interrupt request lists and consequently
  in a panic. Solve this be turning off interrupts in intr_fast() before
  reading the pointer to the head of the active list rather than after. [1]
- Add a KASSERT in intr_fast() which asserts that ir_func is non-zero before
  calling it. [1]
- Increment interrupt stats after calling the handlers rather than before.
  This reduces the delay until direct and fast handlers are serviced, in my
  testings by 30% on average for the direct tick interrupt handler, in turn
  resulting in less clock drift.

PR:		94778 [1]
Submitted by:	Andrew Belashov [1]
MFC after:	2 weeks
2006-04-17 21:03:24 +00:00
John Baldwin
efff0b01b6 Update comments to indicate that locks are held by threads, not processes. 2006-04-17 20:17:09 +00:00
John Baldwin
32553b153e Add a 'show sleepqueue' alias for 'show sleepq' in DDB. 2006-04-17 20:16:32 +00:00
John Baldwin
964b557211 Trim trailing whitespace. 2006-04-17 20:14:51 +00:00
Julian Elischer
be389c75f0 Add the ability to log to an arbitrary udp port as well as the
standard syslog port. This allows syslog to easily export lines of interest to
an external logging system.
2006-04-17 20:12:35 +00:00
David Malone
6a4d12ad81 Update a couple of comments relating to RFCs. 2006-04-17 19:55:25 +00:00
David Malone
f3c6fec05f Back out a Makefile change that accidently snook in. 2006-04-17 19:52:00 +00:00
John Baldwin
2971c36136 Add a new module_file() function that returns the linker_file_t associated
with a given module_t.  I use this in some the MOD_LOAD event handler for
some test kernel modules to ask the kernel linker to look up the linker
sets in my test modules. (I use linker sets to generate the list of
possible events that I then signal to execute via a sysctl.  On non-amd64,
ld(8) would resolve the entire linker set, but on amd64 I have to ask the
kernel linker to do it for me, and having the kernel linker do it works on
all archs.)
2006-04-17 19:44:44 +00:00
John Baldwin
8ba7a3578b - Sleep/wakeup operate on threads now, not processes.
- Describe msleep() as the primary sleep function now rather than tsleep()
  and describe tsleep() and msleep_spin() as variations.
- Try to make the description of msleep() a bit closer to English
  (sentences with actual subjects, etc.)
- Document that a priority of 0 now prevents the thread's priority from
  being altered.
- Add a history note for wakeup_one().
2006-04-17 19:11:12 +00:00
David Malone
e90fa6a937 Port 37 (RFC 738) style times are supposed to be a 32 bit time since
1900 in network byte order. Use a uint32_t to calculate and send
the time, so that we don't need to know how big ints or longs are.

I used uint32_t instead of int in the patch, on the off chance
someone uses our inetd source on a system that doesnt 32 bit ints.

PR:		95290
Submitted by:	Bruce Becker <hostmaster@whois.gts.net>
MFC after:	2 weeks
2006-04-17 18:35:58 +00:00
John Baldwin
0f180a7cce Change msleep() and tsleep() to not alter the calling thread's priority
if the specified priority is zero.  This avoids a race where the calling
thread could read a snapshot of it's current priority, then a different
thread could change the first thread's priority, then the original thread
would call sched_prio() inside msleep() undoing the change made by the
second thread.  I used a priority of zero as no thread that calls msleep()
or tsleep() should be specifying a priority of zero anyway.

The various places that passed 'curthread->td_priority' or some variant
as the priority now pass 0.
2006-04-17 18:20:38 +00:00
Jens Schweikhardt
00d02f943b Whitespace nits. 2006-04-17 17:55:11 +00:00
Jens Schweikhardt
a8b9bc3be4 Remove a corrupted fortune ending in line noise. Even googling did not
turn up a non-corrupted version, else I would have restored it.
(No, it's not the one that uses line noise intentionally.)
2006-04-17 12:14:46 +00:00
Kirill Ponomarev
69b1a1dece Add INDEX-7 and remove trailing spaces.
MFC after:	5 days
2006-04-17 11:15:29 +00:00
Kirill Ponomarev
1b753fc66b Use bzip2(1) by default to compress package tarball on
__FreeBSD_version >= 500039.

Submitted by:	Alex Lyashkov <umka@sevcity.net>
MFC after:	5 days
2006-04-17 10:58:45 +00:00
Søren Schmidt
305a0b7123 Add missing ";"
found by:	jmg
2006-04-17 10:47:01 +00:00
Maxim Konovalov
ae2772f800 o Do not double i/o stats for cd(4) already acounted in g_disk_done().
PR:		kern/95707
Submitted by:	Andre Albsmeier
Reviewed by:	phk
MFC after:	2 weeks
2006-04-17 09:12:53 +00:00
Ken Smith
39fac37953 Fix panic() message to give the right function name. 2006-04-17 07:43:56 +00:00
Sam Leffler
d533f717f0 remove some unnecessary perror calls
Noticed by:	Jouni Malinen
MFC after:	2 weeks
2006-04-17 00:17:29 +00:00
Warner Losh
ebcd52935b Add missing ~. We want all the INVALID bits to be 0... Let's see if this
helps people with their interrupt storm problem on card eject.
2006-04-16 23:16:45 +00:00
Maxim Konovalov
47e065b48f o De-register local vars. 2006-04-16 22:30:24 +00:00
Maxim Konovalov
3b5ca369a1 o Trim EOL whitespaces and tabs, replace eight w/s by tabs.
No functional changes.
2006-04-16 22:28:04 +00:00
Maxim Konovalov
6c3591233a o Implement Solaris-like -x flag: show extended disk statistics.
o Implement Solaris-like -z flag: omit lines for devices with no activity.
o iostat.8: describe -x and -z flags, Xr devstat(3), touch .Dd.

PR:		mostly bin/68840, with style changes; bin/73327
Submitted by:	Dan Nelson, Peter Schuller
Obtained from:	NetBSD (a part of man page)
MFC after:	1 month
2006-04-16 22:23:39 +00:00
John-Mark Gurney
e98b5a89de remove duplicate sizeof vnode entry (debug.sizeof.vnode already existed)...
move ncsize into debug.sizeof and rename to namecache...
2006-04-16 18:38:30 +00:00
Sam Leffler
4a3ac3fc61 Improve ath_draintxq debug info: dump the packet as well
as the descriptor and handle the beacon q like other q's

MFC after:	1 month
2006-04-16 18:24:27 +00:00
Sam Leffler
2af90c547b Unbreak cabq handling: check the s/w q, not the h/w q as the frames
have not been passed to the h/w yet.  This remedies watchdog timeout
of buffered multicast frames in hostap mode.

While here eliminate an extraneous check; ieee80211_beacon_update sets
the tim bit based on ncabq != 0 so there's no reason to check it too.

Noticed by:	Christophe Prevotaux
2006-04-16 18:14:01 +00:00
Maxim Konovalov
beb66b02a4 o Close an output file -o flag opened before execvp(3) in a child.
PR:		bin/89666
Submitted by:	Arne H Juul
MFC after:	1 month
2006-04-16 17:44:49 +00:00
Maxim Konovalov
9b63b79ee0 o dbm_close(3) returns void not zero or anything else. Touch .Dd.
PR:		docs/80070
Submitted by:	Aleksej Saushev
MFC after:	2 weeks
2006-04-16 16:33:26 +00:00
Maxim Konovalov
a5e8745ad9 o Correct a path to include. 2006-04-16 15:35:12 +00:00
Marius Strobl
f2189783c9 For _Qp_{fge,fgt,fle,flt}() the SCD states that "Exceptions mimic fcmpeq",
this means they should set the cmpe flag when calling __fpu_compare().

Submitted by:	stefanf
MFC after:	2 weeks
2006-04-16 14:32:53 +00:00
Maxim Konovalov
2edf0a4432 o Do not mangle current session user login name with jail -u|-U.
PR:		bin/94730
Submitted by:	Frank Behrens
MFC after:	1 month
2006-04-16 12:32:04 +00:00
Jens Schweikhardt
0ef05a46fd Correct assorted grammos and typos. 2006-04-16 11:54:01 +00:00
Christian Brueffer
dd09eba412 Fix indentation for "Ostersonntag".
Obtained from:	OpenBSD
2006-04-16 10:34:56 +00:00
Scott Long
bb141be10a Take a better stab at making this compile. 2006-04-15 18:54:56 +00:00
Pawel Jakub Dawidek
cd0d707eb7 Correct debug: we are sending child bio here, not parent bio.
MFC after:	1 week
2006-04-15 18:30:42 +00:00
Scott Long
83bc5d54c8 Take a stab at making this compile. 2006-04-15 18:04:04 +00:00
Maxim Konovalov
1805d92b32 o Document /dev/fido.
PR:		docs/85425
Approved by:	phk
MFC after:	2 weeks
2006-04-15 17:52:02 +00:00
Maxim Konovalov
26ca704dbd o s/you health/your health/.
PR:		conf/95810
Submitted by:	Gavin Atkinson
2006-04-15 17:07:32 +00:00
Hajimu UMEMOTO
d3ac2b30d4 - make reentrant version of netdb functions glibc style API, and
expose them to outside of libc.
- make netdb functions NSS friendly.

Reviewed by:	arch@ and current@ (no objection)
2006-04-15 16:20:27 +00:00
Mitsuru IWASAKI
1b9518293e Oops, untested code was included accidentally.
Fixed.
2006-04-15 16:10:53 +00:00
Daniel Eischen
797f4fb875 Don't export __gdtoa. The only known ports that rely on
this or the deprecated POSIX functions {e,g,f}cvt() have
newer versions that do not (rely on them).

Requested by:	marius
2006-04-15 15:35:20 +00:00
Maxim Konovalov
6ad8b89261 o Document SO_NOSIGPIPE, touch .Dd.
PR:		docs/78479
Submitted by:	Mikko Tyolajarvi
MFC after:	2 weeks
2006-04-15 13:37:35 +00:00
Mitsuru IWASAKI
858a52f464 Import ACPI Dock Station support. Note that this is still very young.
Additional detach implementaions (or maybe improvement) for other
deivce drivers is required.

Reviewed by:	njl, imp
MFC after:	1 week
2006-04-15 12:31:34 +00:00
Maxim Konovalov
be9365a9f2 o Fix prototype for SYSCALL_MODULE(9): the third argument
is a pointer to struct sysent.  Correct its description.

PR:		docs/84790
Submitted by:	Dirk Gouders
MFC after:	2 weeks
2006-04-15 12:04:18 +00:00
Maxim Konovalov
727e7d8621 o Fix printf(9) formatting: do not use hardcode "0x" and "#" flags
simultaneously.  Remove "#' flag to match a style of the rest of
file.

PR:		kern/85477
Submitted by:	Oliver Fromme
2006-04-15 11:41:40 +00:00
Maxim Konovalov
a09367f089 o s/PsuedoRAID/PseudoRAID/.
PR:		kern/94306
Submitted by:	Esa Karkkainen
2006-04-15 10:27:41 +00:00
Maxim Konovalov
089418247a o Be pedantic and do fts_close() when done.
PR:		bin/95292
Submitted by:	Charles Hardin
Obtained from:	NetBSD via OpenBSD, PR
2006-04-15 09:26:23 +00:00
Scott Long
f30cbfc63b Fix the interrupt handler to do the mandatory PCI flush before looking at
DMA memory.  The could contribute towards missed link state changes under
heavy bus load.
2006-04-15 08:13:06 +00:00
Xin LI
a2a926dd44 MFen:
hardware/common/dev.sgml 1.296 -> 1.299
	relnotes/common/new.sgml 1.910 -> 1.911

Obtained from:	The FreeBSD Simplified Chinese Project
2006-04-15 05:32:12 +00:00
Robert Watson
086dafc15b Mirror IPv4 pcb locking into in6_setsockaddr() and in6_setpeeraddr():
acquire inpcb lock when reading inpcb port+address in order to prevent
races with other threads that may be changing them.

MFC after:	3 months
2006-04-15 05:24:23 +00:00