Commit Graph

137284 Commits

Author SHA1 Message Date
des
3086491df6 Convert pthread.map to the format expected by version_gen.awk, and modify
the Makefile accordingly; libthr now explicitly uses libc's Versions.def.

MFC after:	2 weeks
2008-02-06 20:25:00 +00:00
des
85a226c62d Remove incorrectly added FBSDprivate_1.1 namespace, and move symbols which
are new in FreeBSD 8 to the appropriate namespace.
2008-02-06 20:20:29 +00:00
delphij
2b6b4fdebb Revert rev. 1.128, we have a hard link generated from new
hptrr(4) to rr232x.

Pointed out by:	bruffer
Pointy hat to:	delphij
2008-02-06 19:45:45 +00:00
des
aa46970f0b mutex_islocked_np -> mutex_isowned_np 2008-02-06 19:41:05 +00:00
des
053e111aba Per discussion on -threads, rename _islocked_np() to _isowned_np(). 2008-02-06 19:34:31 +00:00
marcel
4f805c3018 The man page of ofwdump(8) is installed as usr/share/man/man8/ofwdump.8.gz
again on powerpc and sparc64. Un-obsolete it for these two so that we
don't remove it right after installing it.
2008-02-06 19:03:14 +00:00
mav
a51f95cd58 Cleanup and tune ng_snd_item() function as it is one of the
most busy netgraph functions.
Tune stack protection constants to avoid division operation.
2008-02-06 18:50:40 +00:00
delphij
e6ee3bcfea Reflect rr232x(4) manpage removal 2008-02-06 18:43:47 +00:00
silby
9a1f3b3838 This is a regression test to verify the proper behavior of IP ID generation
code.  It will push 200000 packets, then report back what the min and max
periods it saw for different IDs were.
2008-02-06 15:48:43 +00:00
silby
1ff81684ca Replace the random IP ID generation code we
obtained from OpenBSD with an algorithm suggested
by Amit Klein.  The OpenBSD algorithm has a few
flaws; see Amit's paper for more information.

For a description of how this algorithm works,
please see the comments within the code.

Note that this commit does not yet enable random IP ID
generation by default.  There are still some concerns
that doing so will adversely affect performance.

Reviewed by:  rwatson
MFC After: 2 weeks
2008-02-06 15:40:30 +00:00
scottl
3c799f8e4f Remove an errant definition for AMR_CONFIG_ENQ3_SOLICITED NOTIFY that was
accidently reverted in the previous commit.
2008-02-06 14:26:31 +00:00
attilio
a715e455c6 td cannot be NULL in that place, so just axe out the check. 2008-02-06 13:26:01 +00:00
des
d129ae8c34 Add necessary cast for tolower() argument.
Submitted by:	Joerg Sonnenberger <joerg@britannica.bec.de>
MFC after:	1 week
2008-02-06 11:39:55 +00:00
pb
c3c8edd3bd Fix typo.
Submitted by:	danny at cs.huji.ac.il (author)
2008-02-06 08:03:27 +00:00
pb
db71b4359b Update fix from rev 1.2.
Submitted by:	danny at cs.huji.ac.il (author)
MFC after:	1 week
2008-02-06 08:02:55 +00:00
bde
bd06cb56ab As for the float trig functions and logf, use a minimax polynomial
that is specialized for float precision.  The new polynomial has degree
5 instead of 11, and a maximum error of 2**-27.74 ulps instead
of 2**-30.64.  This doesn't affect the final error significantly; the
maximum error was and is about 0.9101 ulps on amd64 -01 and the number
of cases with an error of > 0.5 ulps is actually reduced by epsilon
despite the larger error in the polynomial.

This is about 15% faster on amd64 (A64), i386 (A64) and ia64.  The asm
version is still used instead of this on i386 since it is faster and
more accurate.
2008-02-06 06:35:21 +00:00
scottl
29a1384601 Fix a symbol conflict between hptrr and hptmv 2008-02-06 05:33:17 +00:00
scottl
4320a38bdb Add a note that the hptrr driver supersedes the rr232x driver. 2008-02-06 03:30:13 +00:00
jasone
44c343f8fa Track dirty unused pages so that they can be purged if they exceed a
threshold, according to the 'F' MALLOC_OPTIONS flag.  This obsoletes the
'H' flag.

Try to realloc() large objects in place.  This substantially speeds up
incremental large reallocations in the common case.

Fix a bug in arena_ralloc() that caused relocation of sub-page objects
even if the old and new sizes were in the same size class.

Maintain trees of runs and simplify the per-chunk page map.  This allows
logarithmic-time searching for sufficiently large runs in
arena_run_alloc(), whereas the previous algorithm required linear time
in the worst case.

Break various large functions into smaller sub-functions, and inline
only the functions that are in the fast path for small object
allocation/deallocation.

Remove an unnecessary check in base_pages_alloc_mmap().

Avoid integer division in choose_arena() for the NO_TLS case on
single-CPU systems.
2008-02-06 02:59:54 +00:00
scottl
0635509b37 Update the hptrr driver to version 1.2. This adds port multiplier support
for several cards.  See the Highpoint website for more information.  Again,
many thanks to Highpoint for their continued support of FreeBSD.
2008-02-06 01:02:20 +00:00
jeff
77ea5a24c7 Adaptive spinning in write path with readers and writer starvation avoidance.
- Move recursion checking into rwlock inlines to free a bit for use with
   adaptive spinners.
 - Clear the RW_LOCK_WRITE_SPINNERS flag whenever the lock state changes
   causing write spinners to restart their loop.
 - Write spinners are limited by a count while readers hold the lock as
   there is no way to know for certain whether readers are running still.
 - In the read path block if there are write waiters or spinners to avoid
   starving writers.  Use a new per-thread count, td_rw_rlocks, to skip
   starvation avoidance if it might cause a deadlock.
 - Remove or change invalid assertions in turnstiles.

Reviewed by:    attilio (developed parts of the patch as well)
Sponsored by:   Nokia
2008-02-06 01:02:13 +00:00
attilio
2656e4d699 Update manpage in order to reflect LK_NODUP and LK_NOWITNESS options
introduction.
2008-02-06 00:50:51 +00:00
attilio
209634d0e1 Bump __FreeBSD_version in order to reflect introduction of LK_NODUP and
LK_NOWITNESS options in the lockmgr namespace.
2008-02-06 00:42:26 +00:00
attilio
6234a71797 Add WITNESS support to lockmgr locking primitive.
This support tries to be as parallel as possible with other locking
primitives, but there are differences; more specifically:
- The base witness support is alredy equipped for allowing lock
  duplication acquisition as lockmgr rely on this.
- In the case of lockmgr_disown() the lock result unlocked by witness
  even if it is still held by the "kernel context"
- In the case of upgrading we can have 3 different situations:
  * Total unlocking of the shared lock and nothing else
  * Real witness upgrade if the owner is the first upgrader
  * Shared unlocking and exclusive locking if the owner is not the first
    upgrade but it is still allowed to upgrade
- LK_DRAIN is basically handled like an exclusive acquisition

Additively new options LK_NODUP and LK_NOWITNESS can now be used with
lockinit(): LK_NOWITNESS disables WITNESS for the specified lock while
LK_NODUP enable duplicated locks tracking. This will require manpages
update and a __FreeBSD_version bumping (addressed by further commits).

This patch also fixes a problem occurring if a lockmgr is held in
exclusive mode and the same owner try to acquire it in shared mode:
currently there is a spourious shared locking acquisition while what
we really want is a lock downgrade. Probabilly, this situation can be
better served with a EDEADLK failing errno return.

Side note: first testing on this patch alredy reveleated several LORs
reported, so please expect LORs cascades until resolved. NTFS also is
reported broken by WITNESS introduction. BTW, NTFS is exposing a lock
leak which needs to be fixed, and this patch can help it out if
rightly tweaked.

Tested by: kris, yar, Scot Hetzel <swhetzel at gmail dot com>
2008-02-06 00:37:14 +00:00
attilio
acc2f89a7f Really, no explicit checks against against lock_class_* object should be
done in consumers code: using locks properties is much more appropriate.
Fix current code doing these bogus checks.

Note: Really, callout are not usable by all !(LC_SPINLOCK | LC_SLEEPABLE)
primitives like rmlocks doesn't implement the generic lock layer
functions, but they can be equipped for this, so the check is still
valid.

Tested by: matteo, kris (earlier version)
Reviewed by: jhb
2008-02-06 00:04:09 +00:00
pb
12170a7b3f Fix a bug in hexadecimal formatting of the CHAP digest: bytes >= 0x80
were formatted as 0xff, causing the authentication to fail.

Reviewed by:	scottl
MFC after:	1 week
2008-02-05 23:42:38 +00:00
ceri
b84aef6e7f Bump .Dd for r1.19; use consistent whitespace. 2008-02-05 23:42:37 +00:00
jhb
7084a34c3e Add ZFS support.
MFC after:	1 week
PR:		bin/119976
Submitted by:	Simun Mikecin  numisemis of yahoo.com
2008-02-05 23:37:42 +00:00
matteo
da1547d460 set WARNS to 1: with WARNS=2 an aliasing error in a file generated by
rpcgen from include/rpcsvc/rex.x is exposed and I really don't know
how to fix it.

MFC after:	1 week
2008-02-05 20:03:45 +00:00
antoine
c9994c03d3 Add my birthday.
Approved by:	rwatson (mentor)
2008-02-05 19:34:54 +00:00
antoine
081120f982 Add myself.
Approved by:	rwatson (mentor)
2008-02-05 19:23:22 +00:00
obrien
6ccddb5af5 Minor style(9) nit. 2008-02-05 17:34:44 +00:00
lulf
5152fff6bb - Forced commit to note that revision 1.20 log was misspelled and that comma
should be spelled as colon.
Approved by:	kib (mentor)
2008-02-05 15:53:24 +00:00
des
f408263bc9 Satisfy a particularly obstinate nit-picker :) 2008-02-05 15:41:58 +00:00
lulf
d4fac8275c - Add extra paths for GEOM_LIBRARY_PATH to the fixit environment to enable all
geom commands in a chrooted environment on the livefs cd.

PR:		misc/120169
Approved by:	pjd (mentor)
MFC after:	2 days
2008-02-05 14:06:15 +00:00
lulf
f36063cdb2 - Update geom(8) to explain that GEOM_LIBRARY_PATH can take a comma-separated
list of paths.

Approved by:	pjd (mentor)
MFC after:	2 days
2008-02-05 14:02:55 +00:00
raj
8c4ccad611 Introduce a standalone shell script for embedding MFS image.
This allows to fix a problem with ARM kernel.bin not having the MFS image
embedded: it is objcopied from the kernel.noheader temporary ELF file, which
was not subject to embedding the MFS image previously.

Reviewed by:	imp
Approved by:	cognet (mentor)
2008-02-05 10:46:30 +00:00
raj
172a5277b4 ARM locore cosmetics.
Approved by:	cognet (mentor)
2008-02-05 10:23:42 +00:00
raj
a6d33e3164 Improve ARM_TP_ADDRESS and RAS area.
De-hardcode usage of ARM_TP_ADDRESS and RAS local storage, and move this
special purpose page to a more convenient place i.e. after the vectors high
page, more towards the end of address space. Previous location (0xe000_0000)
caused grief if KVA was to go beyond the default limit.

Note that ARM world rebuilding is required after this change since the
location of ARM_TP_ADDRESS is shared between kernel and userland.

Submitted by:	Grzegorz Bernacki (gjb AT semihalf dot com)
Reviewed by:	imp
Approved by:	cognet (mentor)
2008-02-05 10:22:33 +00:00
des
a2636de674 Give usr.bin/kdump/kdump_subr.c the same treatment as usr.bin/kdump/ioctl.c
and usr.bin/truss/ioctl.c.  This is the correct way to address the problem
that arises when doing an incremental build after a header used by kdump
has been removed (cf. i4b disconnect a while ago)

Explained by:	ru
MFC after:	2 weeks
2008-02-05 08:56:18 +00:00
des
f7514f1316 Revert CLEANDEPFILES commit per ru@'s request; it does not really solve
the problem.  The correct fix will follow.
2008-02-05 08:52:36 +00:00
matteo
6c5e26a705 Add missing includes and correct argument to sysctlbyname
PR:		misc/120274
MFC after:	1 week
2008-02-05 08:07:19 +00:00
mav
cd7d07a63f Prepare hooks direct pointers on setup to avoid heavy ng_findhook() calls
during operarion.
2008-02-04 19:26:53 +00:00
jkoshy
5c5b24c7a8 Document the return type for gelf_fsize(3).
Submitted by:		kaiw
2008-02-04 18:50:28 +00:00
ru
83cbc6b756 Forced commit. Previous revision was instead
Submitted by:	Vadim Goncharov
2008-02-04 15:28:30 +00:00
ru
cd3c6606b0 Improve rev. 1.63. Document -instance and -globalport options.
Add a MULTIPLE INSTANCES section which provides an example of
setting up natd in multi-instance mode (based on the notes.natd
file from phk@).

Submitted by:	"Andrey V. Elsukov" <bu7cher@yandex.ru>
Reviewed by:	ru
2008-02-04 15:27:09 +00:00
des
c089534891 After careful consideration (and a brief discussion with attilio@), change
the semantics of pthread_mutex_islocked_np() to return true if and only if
the mutex is held by the current thread.

Obviously, change the regression test to match.

MFC after:	2 weeks
2008-02-04 12:35:23 +00:00
rwatson
f23198af5c Further clean up sorflush:
- Expose sbrelease_internal(), a variant of sbrelease() with no
  expectations about the validity of locks in the socket buffer.
- Use sbrelease_internel() in sorflush(), and as a result avoid intializing
  and destroying a socket buffer lock for the temporary stack copy of the
  actual buffer, asb.
- Add a comment indicating why we do what we do, and remove an XXX since
  things have gotten less ugly in sorflush() lately.

This makes socket close cleaner, and possibly also marginally faster.

MFC after:	3 weeks
2008-02-04 12:25:13 +00:00
lulf
ce24cd825a - Make geom commands handle multiple library paths in the GEOM_LIBRARY_PATH
environment variable using ':' as a separator.

Approved by:	pjd (mentor)
MFC after:	3 days
2008-02-04 12:17:02 +00:00
dds
b3d2d57ef4 Fix collation order for accented characters.
MFC after:	2 weeks
2008-02-04 10:25:28 +00:00