Commit Graph

135634 Commits

Author SHA1 Message Date
Olivier Houchard
9acb0e651b In atomic_fetchadd_32(), do not blindly increase the value of %3.
It should just contain the value we want to add, as if we're interrupted
between the add and the str, we will restart from the beginning. Just use
a register we can scratch instead.

MFC After:	1 week
2007-11-27 22:12:05 +00:00
John Baldwin
9f0c02d425 Update the shlib version for libgssapi_krb5. This file needs to be updated
anytime that library version is bumped.

XXX: I wonder if this breaks any 6.x binaries using Kerberos5 via GSSAPI.
2007-11-27 21:47:56 +00:00
John Baldwin
ef37e89d5d Properly sort 'sync' in the list of options passed to -o.
MFC after:	3 days
2007-11-27 20:37:16 +00:00
John Baldwin
23d34db956 Remove the 'needbounce' variable from the _bus_dmamap_load_buffer()
routine.  It is not needed as the existing tests for segment coalescing
already handle bounced addresses and it prevents legal segment coalescing
in certain edge cases.

MFC after:	1 week
Reviewed by:	scottl
2007-11-27 17:28:12 +00:00
Jason Evans
0f7362f417 Add _pthread_mutex_init_calloc_cb to libc's map, for which malloc defines
a stub.
2007-11-27 16:22:21 +00:00
Henrik Brix Andersen
44c7dfecd3 Add usr/lib/libgssapi_krb5.so.8 to the list of old libs from the
20071120 shared library version bump.

Update the date in the comments to match the date of the actual
commit.

Approved by:	bz, erwin (mentor)
MFC after:	3 days
2007-11-27 13:58:25 +00:00
Robert Watson
12cef7aa96 Add a man page for stack(9).
MFC after:	1 week
2007-11-27 11:02:41 +00:00
Joseph Koshy
9be5e0002a Tweak -lpmc's name. 2007-11-27 10:00:33 +00:00
Benjamin Close
8b92cdc94c Fix up a race condition with the callout_stop method in newstate.
The call should happen with the driver lock held. We don't hold the driver
lock in newstate as it's a separate thread where we can't sleep (and we only
call wpi_cmd in async mode).

Discovered By: Attillo's callout rework
Approved By: mlaier (comentor)
2007-11-27 09:09:09 +00:00
Benjamin Close
a7099588fc Handle missed beacons correctly
Approved by: mlaier (comentor)
2007-11-27 08:58:32 +00:00
Tai-hwa Liang
8c81b154da MFP4(129048): Eliminating an unnecessary check on an_gone inside
an_stats_update() since a properly locked callout_stop(9) does do the
right thing.

Reviewed by:	ambrisko, jhb
MFC after:	3 days
2007-11-27 08:29:24 +00:00
Remko Lodder
fe154e087f The nfe driver will first appear in 7.0 and not in 6.x
PR:		i386/118264
Submitted by:	"Julian H. Stacey" <jhs at berklix dot org>
Nod from:	yongari
2007-11-27 06:54:13 +00:00
Remko Lodder
67f3da0107 s/effect/affect/
PR:		docs/118266
Submitted by:	"Kim Scarborough" <sluggo at unknown dot nu>
MFC After:	3 days
2007-11-27 06:50:21 +00:00
Jason Evans
8af8e94855 Define atomic_readandclear_ptr. 2007-11-27 06:34:15 +00:00
Jason Evans
77cfb3fec2 Document the B and L MALLOC_OPTIONS. 2007-11-27 03:18:26 +00:00
Jason Evans
5ea8413d0a Implement dynamic load balancing of thread-->arena mapping, based on lock
contention.  The intent is to dynamically adjust to load imbalances, which
can cause severe contention.

Use pthread mutexes where possible instead of libc "spinlocks" (they aren't
actually spin locks).  Conceptually, this change is meant only to support
the dynamic load balancing code by enabling the use of spin locks, but it
has the added apparent benefit of substantially improving performance due to
reduced context switches when there is moderate arena lock contention.

Proper tuning parameter configuration for this change is a finicky business,
and it is very much machine-dependent.  One seemingly promising solution
would be to run a tuning program during operating system installation that
computes appropriate settings for load balancing.  (The pthreads adaptive
spin locks should probably be similarly tuned.)
2007-11-27 03:17:30 +00:00
Jason Evans
e1636e1f97 Add _pthread_mutex_init_calloc_cb() to libthr and libkse, so that malloc(3)
(part of libc) can use pthreads mutexes without causing infinite recursion
during initialization.
2007-11-27 03:16:44 +00:00
Jason Evans
26b5e3a18e Implement lazy deallocation of small objects. For each arena, maintain a
vector of slots for lazily freed objects.  For each deallocation, before
doing the hard work of locking the arena and deallocating, try several times
to randomly insert the object into the vector using atomic operations.

This approach is particularly effective at reducing contention for
multi-threaded applications that use the producer-consumer model, wherein
one producer thread allocates objects, then multiple consumer threads
deallocate those objects.
2007-11-27 03:13:15 +00:00
Jason Evans
bcd3523138 Avoid re-zeroing memory in calloc() when possible. 2007-11-27 03:12:15 +00:00
Jason Evans
1bbd1b8613 Fix stats printing of the amount of memory currently consumed by huge
allocations. [1]

Fix calculation of the number of arenas when 'n' is specified via
MALLOC_OPTIONS.

Clean up various style inconsistencies.

Obtained from:	[1] NetBSD
2007-11-27 03:09:23 +00:00
Bruce A. Mah
66288637d1 Use the most recent Xorg manpage set that we have. 2007-11-26 23:21:24 +00:00
Bruce A. Mah
3ca6e6e828 New release note: wpi(4). 2007-11-26 23:19:15 +00:00
Attilio Rao
49aead8a10 Simplify the adaptive spinning algorithm in rwlock and mutex:
currently, before to spin the turnstile spinlock is acquired and the
waiters flag is set.
This is not strictly necessary, so just spin before to acquire the
spinlock and to set the flags.
This will simplify a lot other functions too, as now we have the waiters
flag set only if there are actually waiters.
This should make wakeup/sleeping couplet faster under intensive mutex
workload.
This also fixes a bug in rw_try_upgrade() in the adaptive case, where
turnstile_lookup() will recurse on the ts_lock lock that will never be
really released [1].

[1] Reported by: jeff with Nokia help
Tested by: pho, kris (earlier, bugged version of rwlock part)
Discussed with: jhb [2], jeff
MFC after: 1 week

[2] John had a similar patch about 6.x and/or 7.x about mutexes probabilly
2007-11-26 22:37:35 +00:00
John Birrell
221a97c194 Although the entire src tree builds cleanly now without -fno-strict-aliasing
in the default CFLAGS, we're in the middle of a ports freeze, so we can't
really go making the corresponding change to the ports mk files.

I'll take -fno-strict-aliasing out again when the ports freeze ends.
2007-11-26 21:46:21 +00:00
John Baldwin
8ec770db87 Add a note to indicate that these files do borrow in part from mbr.s and
boot1.S

Requested by:	rnordier
2007-11-26 21:29:59 +00:00
Sam Leffler
1a4ae5c45b Be more careful handling off-channel frames: if the driver (wrongly)
sends frames up the stack after changing the current channel then
the lookup by ieee channel number may fail leaving a null ptr in
se_chan; if this happens fallback to the channel recorded when the
frame is processed (curchan).  Since the frame doesn't contribute
to scan results for the sta this is acceptable.

Reviewed by:	thompsa
MFC after:	3 days
2007-11-26 21:28:18 +00:00
Remko Lodder
1b72425ab3 Add the Intel 82801FB (ICH6) SMBus controller and the
Intel 82801GB (ICH7) SMBus controller.

PR:		85106 [1]
PR:		99663 [2]
Approved by:	imp (mentor), jhb
Submitted by:	Oliver Fromme <olli at lurza.secnetix dot de>, [1]
		Arthur Hartwig <arthur dot hartwig at nokia dot com>, [1]
		Lowell Gilbert <lgfbsd at be-well dot ilk dot org> [2]@
MFC After:	3 days
2007-11-26 19:54:54 +00:00
Jack F Vogel
abcc80c87a Fix for a reported panic in certain circumstances. When
calling em_stop() now make sure the TX lock is held as
well as CORE.
2007-11-26 19:47:03 +00:00
Søren Schmidt
91b4ff52c7 Use device_set_desc_copy in the generic ident as its used on a temp buffer. 2007-11-26 19:08:08 +00:00
Remko Lodder
0d985fab86 Add the FNW3603TX Planex NIC.
PR:		76081
Approved by:	imp (mentor)
Submitted by:	umi at pocke dot org
MFC After:	3 days
2007-11-26 18:25:07 +00:00
Remko Lodder
64d0afa7f8 Add the 845M GMCH controller.
PR:		114802
Approved by:	imp (mentor), anholt (private mail)
Submitted by:	Alex Goncharov <algo1 at comcast dot net>
MFC After:	3 days
2007-11-26 18:17:07 +00:00
Christian Brueffer
23ae24e09a Bump .Dd for previous revision. 2007-11-26 15:21:21 +00:00
Konstantin Belousov
6259969d36 Implement read_default_ldt in linux_modify_ldt(). It copies out zeroed
descriptor, like real Linux does.

Tested by: Yuriy Tsibizov <yuriy.tsibizov at gmail com>
Submitted by:	rdivacky
MFC after:	1 week
2007-11-26 11:06:19 +00:00
Xin LI
91f5fdd5fd Mention less upgrade to v416. 2007-11-26 08:58:52 +00:00
Xin LI
3951d17b6c Resolve conflicts. 2007-11-26 08:58:07 +00:00
Xin LI
ddccfc1d45 This commit was generated by cvs2svn to compensate for changes in r173932,
which included commits to RCS files with non-trunk default branches.
2007-11-26 08:57:30 +00:00
Xin LI
33a9f6ab73 Virgin import of less v416. 2007-11-26 08:57:30 +00:00
Darren Reed
b351a3c4b3 Fix 3 issues relating to the use of "auth" rules in IPFilter, from sourceforge:
1837014 Kernel panics after authentication of an outgoing packet
1836992 Potential bugs in packet auth code (w/patches)
1836967 Kernel panic when using auth rule with keep state
and another reported only to FreeBSD by Andiry (see PR)

PR:		kern/118251
Submitted by:	Andriy Syrovenko <andriys@gmail.com>
Reviewed by:	darrenr
MFC after:	5 days
2007-11-26 08:18:19 +00:00
John Birrell
ba90c265b0 Implement the _long functions using u_long rather than trying to
cast as uint32_t which is defined as unsigned int. gcc doesn't want to
consider that there might not be much difference between an int and
a long on a 32 bit architecture.
2007-11-26 05:52:45 +00:00
John Birrell
1b655ceb37 Add Dell's Photo AIO Printer 926. 2007-11-26 05:47:15 +00:00
Sam Leffler
901e004d2a silence compiler complaints 2007-11-26 05:03:55 +00:00
Joseph Koshy
742fe6de5d - Allow source descriptors with no data to be used as arguments to the
elf{32,64}_xlateto[fm]() translation functions.  This change makes our
  libelf compatible with other ELF(3) implementations. [1]
- Update manual page to reflect this change.
- Style fixes: wrap a long line.

Submitted by:	jb [1]
2007-11-26 03:09:33 +00:00
David Xu
eb326f14a2 Move the added code in revision 1.26 into function pthread_key_create,
it should be there.
2007-11-26 02:35:17 +00:00
Daniel Gerzo
89396d2512 Polish this manual page a bit:
- refer to the dummynet(4) man page only once, later use rather
  the .Nm macro.
- use .Va macro when refering to the sysctl variables
- grammar and markup fixes

Reviewed by:	keramida, trhodes, ru (roughly)
MFC-after:	1 week
2007-11-26 00:36:40 +00:00
Max Khon
cb0ed6eefb Fix -jX when makefiles are remade. 2007-11-25 20:43:27 +00:00
Alan Cox
da31e3aa04 Make contigmalloc(9)'s page laundering more robust. Specifically, use
vm_pageout_fallback_object_lock() in vm_contig_launder_page() to better
handle a lock-ordering problem.  Consequently, trylock's failure on the
page's containing object no longer implies that the page cannot be
laundered.

MFC after: 6 weeks
2007-11-25 20:37:29 +00:00
Christian Brueffer
4faa4b080e Clean up after previous revision. 2007-11-25 16:14:32 +00:00
Max Laier
1030a1a9cb pfil(9) locking take 3: Switch to rmlock(9)
This has the benefit that rmlocks have proper support for reader recursion
(in contrast to rwlock(9) which could potential lead to writer stravation).
It also means a significant performance gain, eventhough only visible in
microbenchmarks at the moment.

Discussed on:	-arch, -net
2007-11-25 12:41:47 +00:00
Alan Cox
9c5ce94257 Tidy up: Add comments. Eliminate the pointless
malloc_type_allocated(..., 0) calls that occur when contigmalloc() has
failed.  Eliminate the acquisition and release of the page queues lock
from vm_page_release_contig().  Rename contigmalloc2() to
contigmapping(), reflecting what it does.
2007-11-25 07:42:34 +00:00
Joseph Koshy
c89d1cf588 - Add an overview of the pmc(3) API.
- Defer detailed descriptions of individual functions in the API to
  function-specific manual pages.
2007-11-25 06:50:31 +00:00