Commit Graph

131006 Commits

Author SHA1 Message Date
Warner Losh
92d0be02b0 If KERNEL_EXTRA is defined, make kernel-all target depend on it.
If KERNEL_EXTRA_INSTALL is defined, install it into ${DESTDIR}${KODIR}.
2007-03-23 21:55:59 +00:00
Pawel Jakub Dawidek
5d47cd0f1a Exit status should be 1 on error.
PR:		bin/110705
Reported by:	Tom Judge
MFC after:	2 weeks
2007-03-23 21:05:36 +00:00
Kip Macy
fc01c613c5 Check PCI-e link width to avoid foot shooting with 4x links
MFC after: 3 days
2007-03-23 20:18:07 +00:00
Andre Oppermann
302ce8d690 Split tcp_input() into its two functional parts:
o tcp_input() now handles TCP segment sanity checks and preparations
   including the INPCB lookup and syncache.
 o tcp_do_segment() handles all data and ACK processing and is IPv4/v6
   agnostic.

Change all KASSERT() messages to ("%s: ", __func__).

The changes in this commit are primarily of mechanical nature and no
functional changes besides the function split are made.

Discussed with:	rwatson
2007-03-23 20:16:50 +00:00
Matteo Riondato
69298755a5 Make sysinstall's code WARNS=2 clean .
MFC after:	1 week
2007-03-23 19:57:27 +00:00
Andre Oppermann
4dfdffe9e2 Tidy up some code to conform better to surroundings and style(9), 0 = NULL
and space/tab.
2007-03-23 19:11:22 +00:00
Andre Oppermann
fc30a25199 Bring SACK option handling in tcp_dooptions() in line with all other
options and ajust users accordingly.
2007-03-23 18:33:21 +00:00
John Baldwin
00362cddbe - Fix exca_(io|mem)_map() to return proper errno values.
- Change exca_activate_resource() to call BUS_ACTIVATE_RESOURCE() before
  calling exca_(io|mem)_map() since the latter use rman_get_bus(tag|handle)
  and the recent changes to nexus(4) mean that you need to activate a
  resource before reading the bus tag and handle.  This was true before,
  but now the nexus(4) drivers on x86 and ia64 are more forceful about it.

Reviewed by:	imp
2007-03-23 17:15:07 +00:00
Bruce M Simpson
73ec8173eb Purge two redundant case labels. 2007-03-23 09:43:36 +00:00
Xin LI
1247688a3e Don't destroy a mutex just before we use it, instead,
destroy it after we have used it.
2007-03-23 08:52:36 +00:00
Alan Cox
768131d293 vm_page_busy() no longer requires the page queues lock to be held. Reduce
the scope of the page queues lock in vm_fault() accordingly.
2007-03-23 06:11:25 +00:00
Jason Evans
bb99793a2b Use extents rather than binary buddies to track free pages within
chunks.  This allows runs to be any multiple of the page size.  The
primary advantage is that large objects are no longer constrained to be
2^n pages, which can dramatically decrease internal fragmentation for
large objects.  This also allows the sizes for runs that back small
objects to be more finely tuned.

Free runs are searched for linearly using the chunk page map (with the
help of some heuristic optimizations).  This changes the allocation
policy from "first best fit" to "first fit".  A prototype red-black tree
implementation for tracking free runs that implemented "first best fit"
did not cause a measurable speed or memory usage difference for
realistic chunk sizes (though of course it is possible to construct
benchmarks that favor one allocation policy over another).

Refine the handling of fullness constraints for small runs to be more
tunable.

Restructure the per chunk page map to contain only two fields per entry,
rather than four.  Also, increase each entry from 4 to 8 bytes, since it
allows for 32-bit integers, without increasing the number of chunk
header pages.

Relax the maximum chunk size constraint.  This is of no practical
interest; it is merely fallout from the chunk page map restructuring.

Revamp statistics gathering and reporting to be faster, clearer and more
informative.  Statistics gathering is fast enough now to have little
to no impact on application speed, but it still requires approximately
two extra pages of memory per arena (per process).  This memory overhead
may be acceptable for most systems, but we still need to leave
statistics gathering disabled by default in RELENG branches.

Rename NO_MALLOC_EXTRAS to MALLOC_PRODUCTION in order to make its intent
clearer (i.e. it should be defined in RELENG branches).
2007-03-23 05:05:48 +00:00
Ed Maste
13b762a304 Stop setting ki_ocomm (thread name) to the proc name by default, as nothing
in the base system relies on this any longer.
2007-03-23 04:01:08 +00:00
Xin LI
de5f4525ea Reflect ACPI-CA 20070320 import. 2007-03-23 01:47:04 +00:00
Jung-uk Kim
778ee3c639 Add '-s' option and update the manual page. With this option, it prints
little more style(9) friendly output.  For example:

%file2c -n 8 -s -x 'const char data[] = {' '};' < /etc/motd
const char data[] = {
	0x46, 0x72, 0x65, 0x65, 0x42, 0x53, 0x44, 0x20,
	0x37, 0x2e, 0x30, 0x2d, 0x43, 0x55, 0x52, 0x52,
	0x45, 0x4e, 0x54, 0x20, 0x28, 0x42, 0x45, 0x41,
	0x53, 0x54, 0x49, 0x45, 0x29, 0x20, 0x23, 0x30,
	0x3a, 0x20, 0x57, 0x65, 0x64, 0x20, 0x4d, 0x61,
	0x72, 0x20, 0x32, 0x31, 0x20, 0x31, 0x39, 0x3a,
	0x30, 0x34, 0x3a, 0x33, 0x36, 0x20, 0x45, 0x44,
	0x54, 0x20, 0x32, 0x30, 0x30, 0x37, 0x0a
};
2007-03-23 00:00:22 +00:00
Marcel Moolenaar
cad72a80bd Pass the RID from the bus frontends to the core probe function.
Currently all RIDs are 0, but for PCI devices this typically
isn't the case. This change is made with future PCI support in
mind.
2007-03-22 23:45:25 +00:00
Matt Jacob
5f634111fa MFP4: a) Some constification from NetBSD (gcc 4.1.2)
b) Split default param fetching/setting into scsi and fibre functions
and retry the fibre fetch more than once.

MFC after:	1 week
2007-03-22 23:38:32 +00:00
Sam Leffler
7aee3dd19f add include now required for crypto flags 2007-03-22 22:25:25 +00:00
Jung-uk Kim
a19b8275ad Merge from vendor branch to fix tinderbox breakage. 2007-03-22 21:23:29 +00:00
Jung-uk Kim
1178769589 This commit was generated by cvs2svn to compensate for changes in r167817,
which included commits to RCS files with non-trunk default branches.
2007-03-22 21:14:43 +00:00
Jung-uk Kim
6e6ecbd187 Fix tinderbox build breakage.
Note that it is committed on the vendor branch because it will be
submitted to the vendor.
2007-03-22 21:14:43 +00:00
Bruce M Simpson
e7f8c8339c Fix a typo, and update a comment.
Submitted by:	yar
2007-03-22 19:08:39 +00:00
Jung-uk Kim
2be4e4713a Catch up with ACPI-CA 20070320 import. 2007-03-22 18:16:43 +00:00
Jung-uk Kim
df6b852a3a Update to reflect import of ACPI-CA 20070320. 2007-03-22 18:08:11 +00:00
Jung-uk Kim
566829f919 Resolve conflicts from import of Intel ACPI-CA 20070320. 2007-03-22 18:02:34 +00:00
Jung-uk Kim
676ba8b815 Resolve conflicts of unchanged files that are off the vendor branch. 2007-03-22 17:58:27 +00:00
Ed Maste
f487a6a811 Use proc name (ki_comm) instead of thread name (ki_ocomm) as these may now
be different.
2007-03-22 17:47:58 +00:00
Jung-uk Kim
58bffa15c2 Remove files that removed on the vendor branch. 2007-03-22 17:47:41 +00:00
Jung-uk Kim
471dd6b2d7 Remove files that are no longer needed or removed by vendor. 2007-03-22 17:43:38 +00:00
Jung-uk Kim
73d8e290c6 This commit was generated by cvs2svn to compensate for changes in r167807,
which included commits to RCS files with non-trunk default branches.
2007-03-22 17:43:38 +00:00
Jung-uk Kim
6976fc7f02 Add fixes for FreeBSD build that were submitted upstream. 2007-03-22 17:36:29 +00:00
Jung-uk Kim
b8377236a6 This commit was generated by cvs2svn to compensate for changes in r167805,
which included commits to RCS files with non-trunk default branches.
2007-03-22 17:36:29 +00:00
Jung-uk Kim
1a39cfb03c Vendor import of Intel ACPI-CA 20070320 2007-03-22 17:24:05 +00:00
Jung-uk Kim
70f0d34262 This commit was generated by cvs2svn to compensate for changes in r167802,
which included commits to RCS files with non-trunk default branches.
2007-03-22 17:24:05 +00:00
John Baldwin
cd6e6e4e11 - Simplify the #ifdef's for adaptive mutexes and rwlocks by conditionally
defining a macro earlier in the file.
- Add NO_ADAPTIVE_RWLOCKS option to disable adaptive spinning for rwlocks.
2007-03-22 16:09:23 +00:00
Pawel Jakub Dawidek
52b509e738 Add missing \n. 2007-03-22 15:42:13 +00:00
Gleb Smirnoff
cd68a3f706 Move the dom_dispose and pru_detach calls in sofree() earlier. Only after
calling pru_detach we can be absolutely sure, that we don't have any
references to the socket in the stack.

This closes race between lockless sbdestroy() and data arriving on socket.

Reviewed by:	rwatson
2007-03-22 13:21:24 +00:00
Gleb Smirnoff
9406b27489 When working on an RTM_CHANGE do the route editing in the following
sequence. First, if rt_ifa is going to be changed, then call
ifa_rtrequest(RTM_DELETE). Second, if gateway is going to be changed,
then call rt_setgate(). Third, change rt_ifa.

With this change we are able to change a link level route to a
gateway one, that wasn't possible before:

	# ifconfig em0 192.168.22.1/24
        # arp -s 192.168.22.99 00:11:22:33:44:55
        # route change 192.168.22.99 192.168.22.199
        # ping 192.168.22.99
	db>

Reported by:	avatar
2007-03-22 10:51:03 +00:00
Gleb Smirnoff
1daaa65d3f Remove global list of all llinfo_arp entries and use a callout per
instance expiry of the ARP entries. Since we no longer abuse the IPv4
radix head lock, we can now enter arp_rtrequest() with a lock held on
an arbitrary rt_entry.

Reviewed by:	bms
2007-03-22 10:37:53 +00:00
Alan Cox
c5474b8f18 Change the order of lock reacquisition in vm_object_split() in order to
simplify the code slightly.  Add a comment concerning lock ordering.
2007-03-22 07:02:43 +00:00
John Baldwin
8f27b08e87 Rename the cv_*wait*() functions to _cv_*wait*() and change their second
argument from a mutex to a lock_object.  Add cv_*wait*() wrapper macros
that accept either a mutex, rwlock, or sx lock as the second argument and
convert it to a lock_object and then call _cv_*wait*().  Basically, the
visible difference is that you can now use rwlocks and sx locks with
condition variables using the same API as with mutexes.
2007-03-21 22:22:13 +00:00
John Baldwin
73de183262 Make use of 'lock_object' being the same field name in the witness_check*()
macros.
- witness_check() replaces witness_check_mtx() and
  witness_check_exclusive_sx() and checks for an exclusive acquire of
  either a mutex, rwlock, or sx lock.
- witness_check_shared() replaces witness_check_shared_sx() and checks for
  a shared acquire of either a rwlock or sx lock.
2007-03-21 22:18:10 +00:00
John Baldwin
aa89d8cd52 Rename the 'mtx_object', 'rw_object', and 'sx_object' members of mutexes,
rwlocks, and sx locks to 'lock_object'.
2007-03-21 21:20:51 +00:00
John Baldwin
503916a7c1 Don't use cv_wait_unlock() to implement cv_wait(). Instead, implement
cv_wait() fully and add missing KTRACE context switch traces.
2007-03-21 20:46:26 +00:00
Andre Oppermann
ad3f9ab320 ANSIfy function declarations and remove register keywords for variables.
Consistently apply style to all function declarations.
2007-03-21 19:37:55 +00:00
Andre Oppermann
f7608d9e7f Match up SYSCTL declarations in style. 2007-03-21 19:34:12 +00:00
John Baldwin
ecd8246189 If vn_open() fails during kern_open(), don't fdrop() the new file object
until after the call to fdclose().  This closes an obscure race that
could result in the later call to fdclose() actually closing a different
file descriptor if another thread close()'s the file descriptor being
opened before fdrop() is called, so the fdrop() in kern_open() frees the
file object, then the second thread (or a third) creates a new file
descriptor which reuses both the same index and the same file pointer
thus tricking fdclose() in the first thread into thinking that the
original file was still open.

MFC after:	1 week
2007-03-21 19:32:08 +00:00
John Baldwin
6d257b6e70 Handle the case when a thread is blocked on a lockmgr lock with LK_DRAIN
in DDB's 'show sleepchain'.

MFC after:	3 days
2007-03-21 19:28:20 +00:00
Andre Oppermann
eec9d82d8e Subtract optlen in the maximum length check for TSO and finally avoid
slightly oversized TSO mbuf chains.

Submitted by:	kmacy
2007-03-21 19:04:07 +00:00
Andre Oppermann
b10fbdeafa Tidy up IPFIREWALL_FORWARD sections and comments. 2007-03-21 18:56:03 +00:00