Commit Graph

5639 Commits

Author SHA1 Message Date
Jason Evans
a0a474aed6 Use fixed point integer math instead of floating point math when
calculating run sizes.  Use of the floating point unit was a potential
pessimization to context switching for applications that do not otherwise
use floating point math. [1]

Reformat cpp macro-related comments to improve consistency.

Submitted by:	das
2007-12-18 05:27:57 +00:00
David Schultz
8da510f8f5 Catch up with vfprintf.c,v 1.77. 2007-12-18 01:20:33 +00:00
Michael Bushkov
36736e35e8 Moved logging out of the nss_method_lookup() in order not to
flood logs with failed fallback method lookup attempts.
2007-12-17 16:12:57 +00:00
Jason Evans
d55bd6236f Refactor features a bit in order to make it possible to disable lazy
deallocation and dynamic load balancing via the MALLOC_LAZY_FREE and
MALLOC_BALANCE knobs.  This is a non-functional change, since these
features are still enabled when possible.

Clean up a few things that more pedantic compiler settings would cause
complaints over.
2007-12-17 01:20:04 +00:00
David Schultz
4b6b574455 Implement and document nan(), nanf(), and nanl(). This commit
adds two new directories in msun: ld80 and ld128. These are for
long double functions specific to the 80-bit long double format
used on x86-derived architectures, and the 128-bit format used on
sparc64, respectively.
2007-12-16 21:19:28 +00:00
David Schultz
39e7abef0e Export gdtoa's __ULto{x,Q}_D2A routine in a private namespace so
libm can use it.
2007-12-16 21:15:57 +00:00
David Schultz
199cdab56f Arrange so that the NaN returned by strtod("nan", NULL) is the same as
the NaN returned by strtod("nan()", NULL).
2007-12-16 21:15:09 +00:00
Daniel Eischen
1aaf9d658f Increment the version namespace for 8.0-current. New symbols and
symbols whose ABI has changed should be added to FBSD_1.1.
2007-12-14 20:49:06 +00:00
John Baldwin
ca81364fb1 Update posix_openpt(3) to handle 512 ptys. This was missed in the earlier
pty(4) changes.

MFC after:	3 days
2007-12-13 00:08:59 +00:00
Wes Peters
05db21b17b Remove license clause 3 to agree with the now-standard BSD license.
Prompted by:	Glenn Halperin, Symbian Software
2007-12-12 18:33:06 +00:00
Michael Bushkov
a59d6a8724 Implementing 'fallback' nsswitch source. 'fallback' source is used
when particular function can't be found in nsswitch-module. For
example, getgrouplist(3) will use module-supplied 'getgroupmembership'
function (which can work in an optimal way for such source as LDAP) and
will fall back to the stanard iterate-through-all-groups implementation
otherwise.

PR:		ports/114655
Submitted by:	Michael Hanselmann <freebsd AT hansmi DOT ch>
Reviewed by:	brooks (mentor)
2007-12-12 10:08:03 +00:00
Alexey Zelkin
2992b5e82c Remove 3rd clause of license
Per request of: glenn halperin at symbian.com
2007-12-12 07:43:23 +00:00
Andrey A. Chernov
192b5193c7 Fix typo in the comment 2007-12-11 20:39:32 +00:00
David Schultz
1b12fbb195 Remove some test instrumentation. (The Symbol.map changes broke it anyway.) 2007-12-09 21:00:12 +00:00
David Schultz
0ce0ead5aa Fix handling of subnormals on i386/ia64/amd64.
PR:	85080
2007-12-09 19:48:57 +00:00
Remko Lodder
d2648c167b Make the warning a bit less 'broad' then it used to be. The access
is seems to be a problem for SUID applications, which we like to
prevent as much as possible.

PR:		docs/39530
Submitted by:	Soren Spies <sspies at apple dot com>
MFC After:	3 days
2007-12-08 22:50:35 +00:00
Hajimu UMEMOTO
d069c2b7f5 Merge BIND 9.4.2 into main chunk. 2007-12-03 15:13:44 +00:00
Hajimu UMEMOTO
2092ecacb2 This commit was generated by cvs2svn to compensate for changes in r174223,
which included commits to RCS files with non-trunk default branches.
2007-12-03 15:07:58 +00:00
Hajimu UMEMOTO
4117715965 Vendor import of BIND 9.4.2 2007-12-03 15:07:58 +00:00
Dag-Erling Smørgrav
4a95df55c3 Since jb@ fixed the type of dd_lock in <dirent.h>, these casts are no
longer required.
2007-12-03 14:33:51 +00:00
David Schultz
9c90f85a6b In scanf, round according to the current rounding mode. 2007-12-03 07:17:33 +00:00
Jason Evans
7e42e29b9b Only zero large allocations when necessary (for calloc()). 2007-11-28 00:17:34 +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
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
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
John Birrell
37e19e1d85 Use an intermediate pointer to avoid a strict aliasing warning. 2007-11-23 05:52:13 +00:00
John Birrell
3e636fa0e5 Use an intermediate pointer to avoid a strict aliasing warning.
Note that ULong in this code is actually defined as an unsigned integer across
all arches so that the gdtoa() function always processes 32 bit data
despite the unfortunate naming of "ULong".
2007-11-21 01:10:42 +00:00
John Birrell
102c7c9299 Use intermediate pointers to avoid strict alias type check failures
using gcc 4.2. This is required for tinderbox which doesn't have
-fno-strict-aliasing in it's custom CFLAGS.
2007-11-20 01:51:20 +00:00
Olivier Houchard
e93073b33d Change the casts from (pthread_mutex_t *) to (void *) to keep gcc quiet.
Anybody with a cleaner solution feel free to change it.
2007-11-19 21:57:28 +00:00
Ruslan Ermilov
faad9cae56 Fix bad rule and bad dependency for nsparser.h that can
cause the build to fail because y.tab.c can have a more
recent modification time than y.tab.h, and the bad rule
relied on the opposite.

(The last write to y.tab.c by yacc(1) happens after the
last write to y.tab.h, according to truss(1).)

Reported by:	kensmith
2007-11-15 22:39:15 +00:00
Rong-En Fan
a964324e72 - Include runetype.h for _RuneLocale_ 2007-11-07 14:45:48 +00:00
Giorgos Keramidas
daa8e8bf02 Remove extraneous empty lines, to fix mdoc warnings.
MFC after:	3 days
2007-10-30 15:36:40 +00:00
Giorgos Keramidas
ef824a431f mdoc fix: remove extraneous empty line.
MFC after:	3 days
2007-10-30 15:31:41 +00:00
Giorgos Keramidas
3f85a8b4c5 Bump manpage date, missed during the last change.
MFC after:	3 days
2007-10-30 15:28:43 +00:00
Giorgos Keramidas
6aaa40b521 The .Fx request doesn't recognize 2.2.0, so use ".Fx 2.2"
MFC after:	3 days
2007-10-30 15:27:45 +00:00
Giorgos Keramidas
aada4cf330 Remove extraneous .Ef request.
MFC after:	3 days
2007-10-30 15:26:20 +00:00
Andrey A. Chernov
7f5004e7ba Back out 2nd part of wrong iswascii() change in prev. commit. 2007-10-23 17:39:28 +00:00
John Birrell
b7a2eb795c Add a BUGS section to note that mount/chroot changes since
a module was loaded might make the pathname inaccurate.

I wonder if an inode reference should be stored with the pathname
to allow a validity check?

Suggested by: rwatson@
2007-10-22 21:49:39 +00:00
John Birrell
1676805c18 Add the full module path name to the kld_file_stat structure
for kldstat(2).

This allows libdtrace to determine the exact file from which
a kernel module was loaded without having to guess.

The kldstat(2) API is versioned with the size of the
kld_file_stat structure, so this change creates version 2.

Add the pathname to the verbose output of kldstat(8) too.

MFC: 3 days
2007-10-22 04:12:57 +00:00
David Xu
c5081fcd35 Remove out of date notes, the atoi code is thread-safe and async-cancel
safe.

Discussed with: desichen
2007-10-19 06:23:39 +00:00
Olivier Houchard
394c68fd11 Unbreak arm build by removing duplicate symbols. 2007-10-18 21:44:21 +00:00
Yaroslav Tykhiy
b82b77daf3 The fork symbols aren't MD, they already live in sys/.
Found by:	version_gen.awk
Tested by:	md5(1) (libc.so hasn't changed at all)
2007-10-18 11:28:38 +00:00
Peter Grehan
b3ab87d8bf Fix build from errors exposed with recent version_gen.awk commit.
Not quite sure if this is 100% correct: awaiting review. But quieten
tinderbox in the meantime.
2007-10-18 07:23:31 +00:00
Tom McLaughlin
908556717f - Correctly define CACHED_SOCKET_PATH as /var/run/nscd after cached to
nscd renaming.

Approved by:	mux
2007-10-17 23:20:49 +00:00
Ruslan Ermilov
3be18423c1 VM_METER is long deprecated. 2007-10-16 11:29:13 +00:00
Ruslan Ermilov
bef19503d5 Rescue parts of the sensorsd commit that are still relevant:
- HW_FLOATINGPOINT renamed to HW_FLOATINGPT.
- Documented HW_REALMEM.
- Sorted as per <sys/sysctl.h>.
2007-10-16 11:22:58 +00:00
Alexander Leidinger
9f05d312b3 Backout sensors framework.
Requested by:	phk
Discussed on:	cvs-all
2007-10-15 20:00:24 +00:00