Commit Graph

136616 Commits

Author SHA1 Message Date
David Xu
0248203e2b _POSIX_THREAD_CPUTIME is now supported. 2008-01-18 08:48:32 +00:00
Pyun YongHyeon
7eb12306d6 Use m_collapse(9) to collapse mbuf chains instead of relying on
shortest possible chain of mbufs of m_defrag(9). What we want is
chains of mbufs that can be safely stored to a Tx descriptor which
can have up to STGE_MAXTXSEGS mbufs. The ethernet controller does
not need to align Tx buffers on 32bit boundary. So the use of
m_defrag(9) was waste of time.
2008-01-18 08:32:08 +00:00
David Xu
00d6ac63cd Add POSIX clock id CLOCK_THREAD_CPUTIME_ID, this can be used to measure
per-thread runtime in user code.
2008-01-18 07:04:42 +00:00
Tim Kientzle
91c3a77c57 I misread the Tinderbox error; this should really unbreak 64-bit builds.
Pointy hats, yep, keep 'em coming.  ;-/
2008-01-18 06:16:08 +00:00
Tim Kientzle
c19af48f40 Fix 64-bit build after my last commit. <sigh> 2008-01-18 06:08:39 +00:00
Tim Kientzle
22177dd3e6 The previous commit caused the archive_write_disk interface to
start obeying filesize limits; this test wasn't properly setting
file sizes before trying to write file data.
2008-01-18 05:48:50 +00:00
Tim Kientzle
2adbd7ee43 Issues with hardlinks in newc-format files prompted me to
write a new test to exercise the hardlink strategies used
by different archive formats (tar, old cpio, new cpio).
This uncovered two problems, both fixed by this commit:

1) Enforce file size when writing files to disk.

2) When restoring hardlink entries, if they have data associated, go
   ahead and open the file so we can write the data.

In particular, this fixes bsdtar/bsdcpio extraction of new cpio
formats where the "original" is empty and the subsequent "hardlink"
entry actually carries the data.  It also provides correct behavior
for old cpio archives where hardlinked entries have their bodies
stored multiple times in the archive; the last body should always be
the one that ends up in the final file.  The new pax format also
permits (but does not require) hardlinks to carry file data; again,
the last contents should always win.

Note that with any of these, a size of zero on a hardlink simply means
that the hardlink carries no data; it does not mean that the file has
zero size.  A non-zero size on a hardlink does provide the file size.

Thanks to: John Baldwin, for reminding me about this long-standing bug
    and sending me a simple example archive that prompted this test case
2008-01-18 05:05:58 +00:00
Tim Kientzle
23b11f239a Reconnect the progress callback. It may not get called
as often as you might expect, but at least it will get called
now.

Thanks to: David Topham for asking how this got disconnected.
2008-01-18 04:53:45 +00:00
David Xu
8d0a4dab61 SYSTEM_SCOPE_ONLY flag is no longer needed, it is the only mode libthr
supports.
2008-01-18 04:29:36 +00:00
Peter Wemm
031175705e Add a -P flag to display per-cpu cpu usage stats. 2008-01-18 01:43:14 +00:00
Andrew Thompson
905925d349 IEEE 802.1D-2004 states, frames containing any of the group MAC Addresses
specified in Table 7-10 in their destination address field shall not be relayed
by the Bridge. Add a check in bridge_forward() to adhere to this.

PR:		kern/119744
2008-01-18 00:19:10 +00:00
John Baldwin
304a4c6fb1 - Retire npe_defrag(), gem_defrag(), msk_defrag(), nfe_defrag(), and
re_defrag() and use m_collapse() instead.
- Replace a reference to ath_defrag() in a comment in if_wpi.c with
  m_collapse().
2008-01-17 23:37:47 +00:00
John Baldwin
2c17901060 Add 'compat_freebsd[4567]' features corresponding to the kernel options
COMPAT_FREEBSD[4567].

MFC after:	1 week
Requested by:	kris
2008-01-17 22:46:32 +00:00
John Baldwin
933785a027 Add a new 'add-kld <kld>' command to kgdb to make it easier to analyze
crash dumps with kernel modules.  The command is basically a wrapper
around add-symbol-file except that it uses the kernel linker data
structures and the ELF section headers of the kld to calculate the
section addresses add-symbol-file needs.

The 'kld' parameter may either be an absolute path or a relative path.
kgdb looks for the kld in several locations checking for variants with
".symbols" or ".debug" suffixes in each location.  The first location it
tries is just opening the specified path (this handles absolute paths and
looks for the kld relative to the current directory otherwise).  Next
it tries to find the module in the same directory of the kernel image
being used.  If that fails it extracts the kern.module_path from the
kernel being debugged and looks in each of those paths.

The upshot is that for the common cases of debugging /boot/kernel/kernel
where the module is in either /boot/kernel or /boot/modules one can merely
do 'add-kld foo.ko'.

MFC after:	1 week
2008-01-17 21:43:12 +00:00
Kip Macy
8ec3680eb5 - remove bogus_imm counter
- disable pcpu cluster cache by default until reference counting is handled
  correctly for held clusters - can be re-enable by sysctl
2008-01-17 21:25:58 +00:00
Sam Leffler
eeb76a1889 promote ath_defrag to m_collapse (and retire private+unused
m_collapse from cxgb)

Reviewed by:	pyun, jhb, kmacy
MFC after:	2 weeks
2008-01-17 21:25:09 +00:00
Christian Brueffer
7500fac915 Remove remnants of old *_FORTRAN build flags.
Approved by:	rwatson (mentor)
MFC after:	3 days
2008-01-17 20:51:58 +00:00
John Baldwin
cff3c4fdc5 Remove a conditional that is always true.
MFC after:	2 weeks
2008-01-17 20:15:15 +00:00
John Baldwin
9a57f6280c Use pause(9) instead of a tsleep() on a stack variable.
MFC after:	1 week
2008-01-17 20:11:58 +00:00
Doug Ambrisko
6dd0e63233 Note the driver support PERC and LSI1078 based controllers.
Prompted by:	Vlad GALU
2008-01-17 19:36:13 +00:00
Doug Ambrisko
fb64e9fae2 Correct that LSI 0060 is a mfi device and not mpt. 2008-01-17 19:29:01 +00:00
Ed Maste
552266167e Eliminate warnings by adding headers. 2008-01-17 18:59:59 +00:00
John Baldwin
c05655bfda Use cpu_spinwait() (i.e., "pause") when spinning on rdtsc during DELAY().
MFC after:	1 week
2008-01-17 18:59:38 +00:00
Alan Cox
6634dbbde4 Retire PMAP_DIAGNOSTIC. Any useful diagnostics that were conditionally
compiled under PMAP_DIAGNOSTIC are now KASSERT()s.  (Note: The kernel
option DIAGNOSTIC still disables inlining of certain pmap functions.)

Eliminate dead code from pmap_enter().  This code implemented an assertion.
On i386, an equivalent check is already implemented.  However, on amd64,
a small change is required to implement an equivalent check.

Eliminate \n from a nearby panic string.

Use KASSERT() to reimplement pmap_copy()'s two assertions.
2008-01-17 18:25:52 +00:00
Bruce Evans
1880ccbd79 Add a macro STRICT_ASSIGN() to help avoid the compiler bug that
assignments and casts don't clip extra precision, if any.  The
implementation is to assign to a temporary volatile variable and read
the result back to assign to the original lvalue.

lib/msun currently 2 different hard-coded hacks to avoid the problem
in just a few places and needs it in a few more places.  One variant
uses volatile for the original lvalue.  This works but is slower than
necessary.  Another temporarily casts the lvalue to volatile.  This
broke with gcc-4.2.1 or earlier (gcc now stores to the lvalue but
doesn't load from it).
2008-01-17 17:02:11 +00:00
Bruce Evans
d2012f3333 Add an alternative view of the bits in an 80-bit long double (64+16
instead of 32+32+15+1) on all arches that have such long doubles (amd64,
ia64 and i386).  Large objects should be be accessed in large units,
and the 32+32+15+1[+padding] decomposition asks for almost the opposite
of that, sometimes resulting in very slow accesses depending on how
well the compiler ignores what we ask for and converts to the best
units for the given machine.  E.g., on Athlons, there is a 10-20 cycle
penalty for accessing the middle 32-bit word immediately after an
80-bit store.

Whether actually using the alternative view is better is very machine-
dependent.  A 32+32+16 view is probably best with old 32-bit systems
and gcc through 4.2.1.  The compiler should mostly avoid the view and
generate best accesses, but gcc-4.2.1 is far from doing that.  I think
64+16 is best for now.  Similarly for doubles -- they should be using
64+0 especially on 64-bit machines, but fdlibm uses 32+32 extensively
for them.  Fortunately, in 64-bit mode for doubles, gcc already ignores
the 32+32-bit view and generates best accesses in many cases.
2008-01-17 16:39:07 +00:00
Bruce Evans
a4b679d859 Translate from the i386. All FP constants and operations are evaluated
in the range and precision of their type(s) on amd64, but FLT_EVAL_METHOD
said that they were evalated in the "interesting" (buggy) i387 methods.
float_t was broken compatibly with FLT_EVAL_METHOD.

These definitions seem to be broken on powerpc and possibly on arm.
float_t is float on powerpc with gcc [-notraditional] according to
glibc, and FLT_EVAL_METHOD is marked with XXX on arm.
2008-01-17 13:12:46 +00:00
Olivier Houchard
10457dbaf2 Unbreak build by adding the missing parameter to pmap_enter(). 2008-01-17 12:41:59 +00:00
Andrew Thompson
eaf56834f1 Sync from OpenBSD r1.118, nuke clause 3 & 4. 2008-01-17 09:46:16 +00:00
Kip Macy
4f6a96ae5b Fix lock ordering panic by not calling ether_ioctl with port lock held
Reported by: rrs
2008-01-16 21:33:34 +00:00
Remko Lodder
5e2597b9f0 Fix some style nits.
Prodded by:	brueffer
MFC After:	3 days
2008-01-16 19:36:21 +00:00
Xin LI
93b9f50404 ANSIfy and remove register.
Resulting binary verified with strip(1)+md5(1).
2008-01-16 19:27:43 +00:00
John Baldwin
f831d6e073 Add a header containing constants for the various HPET registers and their
fields and update the code to match.  The PR served more as an inspiration
than providing the actual diffs.

MFC after:	1 week
PR:		kern/112544
2008-01-16 18:47:07 +00:00
David E. O'Brien
d74c91c758 Use a phony .POSIX target. This seems to be the way to
turn off the stuff in src/usr.bin/make/main.c rev 1.161.
2008-01-16 17:16:36 +00:00
John Baldwin
8ffbe1559e Add a set of regression tests for the POSIX shm API (shm_open(2) and
shm_unlink(2)).
2008-01-16 15:51:24 +00:00
Christian Brueffer
9074b90047 Remove WITHOUT_FORTRAN from the XMAKE target, it doesn't exist anymore.
Reviewed by:	imp, kan
Approved by:	rwatson (mentor)
MFC after:	3 days
2008-01-16 15:05:49 +00:00
Remko Lodder
149e9017bd Dont accidentally remove a filesocket which is still in use. This gives
problems when the DRM driver is loaded and the AIXGL extension is loaded
, the AIXGL driver requests a drm_close and this will cause the radeon
driver to fail while starting X windows.

PR:		kern/114688
Submitted by:	vehemens <vehemens at verizon dot net>
Prodded by:	Robert Noland
Approved by:	imp (mentor, a while ago already), anholt
MFC After:	1 week
2008-01-16 13:54:40 +00:00
Giorgos Keramidas
82d16f31df Bump manpage date for rev 1.27
MFC after:	3 days
2008-01-16 07:00:55 +00:00
Giorgos Keramidas
b8b4c607d8 Document that loader(8) stops reading `loader.conf' when it
encounters a syntax error, and add a tip about adding first
the `vital' options and then experimental ones.

PR:		docs/119658
Submitted by:	Julian Stacey, jhs at berklix.org
2008-01-16 06:59:22 +00:00
Kip Macy
8030c630da remove superfluous debug printfs 2008-01-16 02:39:33 +00:00
Nate Lawson
e1f13773ec Remove duplicate cpufreq levels, i.e. ones that are within 25 Mhz of each
other.  The first one survives, the rest are removed.  So far, it appears
only some acpi_perf(4) BIOS tables have these invalid states, but address
this in the core to be sure to handle other potential driver data.

PR:		kern/114722
Tested by:	stefan.lambrev / moneybookers.com
MFC after:	3 days
2008-01-16 01:05:21 +00:00
Kip Macy
c833fdd83f Fix mbuf leak caused by freeing packet zone clusters but not their associated mbufs
- Track packet zone mbufs separately from other mbufs
- free packet zone buffers via m_free rather than trying to manage the refcount
  as with clusters - its refcount and management seems to be "special"
2008-01-16 00:28:30 +00:00
Kip Macy
2fd79ec2de put tx queue size back to 1024 2008-01-16 00:26:04 +00:00
David Schultz
a2d171e440 Optimize this a bit better.
Submitted by:	bde (although these aren't all of his changes)
2008-01-15 23:31:24 +00:00
John Baldwin
16670d1bd1 Use '%zd' to print PIO_LEN since it involves a size_t (via sizeof()) to
appease the tinderbox on 32-bit platforms.

Tested on:	amd64, i386
2008-01-15 22:01:26 +00:00
John Baldwin
0678f786c4 Don't cache the new-bus name of a PCI device in the PCI conf structure,
but reread it from the device_t every time the device list is fetched.
Previously the device name in pciconf -l would not be updated when a driver
was unloaded or if a device was detached and attached to a different
driver.

MFC after:	1 week
PR:		kern/104777
Submitted by:	"Iasen Kostoff"  tbyte | otel net
2008-01-15 21:40:46 +00:00
Andrew Gallatin
1e413cf932 Add optional support to mxge for MSI-X interrupts and multiple receive
queues (which we call slices).  The NIC will steer traffic into up to
hw.mxge.max_slices different receive rings based on a configurable
hash type (hw.mxge.rss_hash_type).

Currently the driver defaults to using a single slice, so the default
behavior is unchanged.  Also, transmit from non-zero slices is
disabled currently.
2008-01-15 20:34:49 +00:00
Christian Brueffer
707dd47849 WITHOUT_FORTRAN was removed some time ago. Regen src.conf.5.
PR:		119562
Submitted by:	Daniel Rucci <dan@rucci.org>
MFC after:	3 days
2008-01-15 19:54:17 +00:00
Maxim Sobolev
9e2211fd05 Hide common prints under bootverbose.
Obtained from:	src/sys/dev/rr232x/osm_bsd.c, rev.1.2-1.3
MFC after:	2 weeks
2008-01-15 19:21:08 +00:00
John Baldwin
c7716170ef Remove some now-unused macros.
MFC after:	1 week
2008-01-15 18:55:52 +00:00