Navdeep Parhar [Thu, 25 Oct 2012 18:11:04 +0000 (18:11 +0000)]
Initialize the response queue mutex a bit earlier to avoid a panic that
occurs if t3_sge_alloc_qset fails and then t3_free_qset attempts to
destroy an uninitialized mutex.
Submitted by: Vijay Singh <vijju dot singh at gmail>
MFC after: 3 days
Ed Schouten [Thu, 25 Oct 2012 10:13:58 +0000 (10:13 +0000)]
Pull in r166498 from upstream clang trunk:
Add a new warning -Wmissing-variable-declarations, to warn about variables
defined without a previous declaration. This is similar to
-Wmissing-prototypes, but for variables instead of functions.
Remove the IPFIREWALL_FORWARD kernel option and make possible to turn
on the related functionality in the runtime via the sysctl variable
net.pfil.forward. It is turned off by default.
Warner Losh [Thu, 25 Oct 2012 04:55:04 +0000 (04:55 +0000)]
Remove the links: target. It too is homelessly outdated since it
relies on the outdated defines list. It likely hasn't been useful in
15 years, and certainly not in the last decade.
Warner Losh [Thu, 25 Oct 2012 04:44:17 +0000 (04:44 +0000)]
Restore r184194 | marcel | 2008-10-22 20:16:38 -0600 (Wed, 22 Oct 2008) | 11 lines
which made geom_bsd and geom_mbr optional. They are redundant with the DEFAULTS
BSD and MBR support for g_part, which is standard.
Warner Losh [Thu, 25 Oct 2012 04:21:05 +0000 (04:21 +0000)]
List all the mips MACHINE_ARCH values in the options file to allow
conditional inclusion based on the MACHINE_ARCH we're compiling for.
Make ucmpdi2 conditional on mips or mipsel.
Warner Losh [Thu, 25 Oct 2012 02:38:05 +0000 (02:38 +0000)]
We need ucmpdi2 for XLR and XLP when compiled in 32-bit mode. Include
it here unconditionally while I figure out why "optional mips |
mipsel" didn't work.
Alfred Perlstein [Thu, 25 Oct 2012 02:12:05 +0000 (02:12 +0000)]
Show the number of times we block waiting for mbufs.
Machines can stall out because mbufs are low, however sometimes we won't
see "requests denied", instead we see user land processes or kernel threads
blocking waiting for mbufs because they set M_WAIT. These consumers do not
see errors, only stalling.
Unfortunately until now, netstat did not export this information
so you could have experienced an mbuf shortage and have no way of
seeing it unless you happen to run netstat at the exact time of the
shortage and see "in use" = "max".
By exporting the number of times processes are blocked, we can
effectively see how often non-interrupt context threads are effectively
"denied".
Alfred Perlstein [Thu, 25 Oct 2012 01:46:20 +0000 (01:46 +0000)]
Allow autotune maxusers > 384 on 64 bit machines
A default install on large memory machines with multiple 10gigE interfaces
were not being given enough mbufs to do full bandwidth TCP or NFS traffic.
To keep the value somewhat reasonable, we scale back the number of
maxuers by 1/6 past the 384 point. This gives us enough mbufs for most
of our pretty basic 10gigE line-speed tests to complete.
Jim Harris [Wed, 24 Oct 2012 18:36:41 +0000 (18:36 +0000)]
Pad tdq_lock to avoid false sharing with tdq_load and tdq_cpu_idle.
This enables CPU searches (which read tdq_load) to operate independently
of any contention on the spinlock. Some scheduler-intensive workloads
running on an 8C single-socket SNB Xeon show considerable improvement with
this change (2-3% perf improvement, 5-6% decrease in CPU util).
Dirty the newly copied anonymous pages after the wired region is
forked. Otherwise, pagedaemon might reclaim the page without saving
its content into the swap file, resulting in the valid content
replaced by zeroes.
Reported and tested by: pho
Reviewed and comment update by: alc
MFC after: 1 week
Warner Losh [Wed, 24 Oct 2012 16:53:02 +0000 (16:53 +0000)]
Move common fdt into files. Duplicate in files.powerpc the files
shared with aim. Config is smart enough to cope with multiple lines
of the same path with different options. This reduces the needless
duplication.
Dimitry Andric [Wed, 24 Oct 2012 16:39:49 +0000 (16:39 +0000)]
Pull in r165367 from upstream llvm trunk:
Make sure always-inline functions get inlined. <rdar://problem/12423986>
Without this change, when the estimated cost for inlining a function with
an "alwaysinline" attribute was lower than the inlining threshold, the
getInlineCost function was returning that estimated cost rather than the
special InlineCost::AlwaysInlineCost value. That is fine in the normal
inlining case, but it can fail when the inliner considers the opportunity
cost of inlining into an internal or linkonce-odr function. It may decide
not to inline the always-inline function in that case. The fix here is just
to make getInlineCost always return the special value for always-inline
functions. I ran into this building clang with libc++. Tablegen failed to
link because of an always-inline function that was not inlined. I have been
unable to reduce the testcase down to a reasonable size.
This should fix the link errors that were reported when atf-run was
compiled with clang -stdlib=libc++. In this case, at -O3 optimization,
some calls to basic_ios::clear() were not inlined, even when the
function was marked __always_inline__.
Reported by: Jan Beich <jbeich@tormail.org>
MFC after: 1 week
Fix USB audio specification compliance by filtering which descriptors can
appear on which interface. This fixes detection of some USB audio adapters.
Also increase the channel limit for FULL speed devices to 4 channels.
Make several timing parameters of the USB enumeration sequence tuneable.
Also update the port reset time from 250ms to 50ms. Some USB devices
have a hard limit in hardware at 222ms for the port reset time and will
not enumerate unless this delay is closer to the usb.org defined value.
This patch can fix enumeration with some USB devices.
Tested by: Guido van Rooij
Submitted by: Nick Hibma
MFC after: 1 week
Pyun YongHyeon [Wed, 24 Oct 2012 05:22:41 +0000 (05:22 +0000)]
Ethernet@WireSpeed is defined for 1000baseT adapter to establish a
link at a lower speed so enabling it for fiber adapters is wrong.
Fix the issue by setting BGE_PHY_NO_WIRESPEED such that brgphy(4)
wouldn't enable the feature.
While I'm here move PHY specific feature/bug configuration to new
location(just before mii attach) for readability.
Dimitry Andric [Tue, 23 Oct 2012 18:57:20 +0000 (18:57 +0000)]
For building GNU libstdc++ and libsupc++, filter out libc++-specific and
-std= flags above c++98 or gnu++98 from CXXFLAGS *after* including
bsd.lib.mk, otherwise some additions to CXXFLAGS done in bsd.*.mk might
not be preserved.
Dimitry Andric [Tue, 23 Oct 2012 18:45:32 +0000 (18:45 +0000)]
Fix a number of other clang warnings in libstdc++, which could appear
when building other C++ software with it. Also fix one actual bug in
libsupc++, which was exposed by such a warning. This latter fix is the
only functional change.
Alexander Motin [Tue, 23 Oct 2012 16:03:00 +0000 (16:03 +0000)]
Remove two more 'periph == NULL' checks missed in r241404.
This condition can never be true as functions are called from single place
and the checks just pollute the code and confuse Clang Static Analyzer.
Gleb Smirnoff [Tue, 23 Oct 2012 08:33:13 +0000 (08:33 +0000)]
Do not reduce ip_len by size of IP header in the ip_input()
before passing a packet to protocol input routines.
For several protocols this mean that now protocol needs to
do subtraction itself, and for another half this means that
we do not need to add header length back to the packet.
Make ip_stripoptions() to adjust ip_len, since now we enter
this function with a packet header whose ip_len does represent
length of entire packet, not payload only.
Gleb Smirnoff [Mon, 22 Oct 2012 21:09:03 +0000 (21:09 +0000)]
Switch the entire IPv4 stack to keep the IP packet header
in network byte order. Any host byte order processing is
done in local variables and host byte order values are
never[1] written to a packet.
After this change a packet processed by the stack isn't
modified at all[2] except for TTL.
After this change a network stack hacker doesn't need to
scratch his head trying to figure out what is the byte order
at the given place in the stack.
[1] One exception still remains. The raw sockets convert host
byte order before pass a packet to an application. Probably
this would remain for ages for compatibility.
[2] The ip_input() still subtructs header len from ip->ip_len,
but this is planned to be fixed soon.
Dimitry Andric [Mon, 22 Oct 2012 19:44:17 +0000 (19:44 +0000)]
Allow building libc++ with any custom -std=xxx flag. Note that using
-std=gnu++98 will give a lot of warnings with clang, so please use
-std=c++0x or higher, or use NO_WERROR.
Dimitry Andric [Mon, 22 Oct 2012 18:25:04 +0000 (18:25 +0000)]
Import libc++ trunk r165949. Among other improvements and bug fixes,
this has many visibility problems fixed, which should help with
compiling certain ports that exercise C++11 mode (i.e. Firefox).
Also, belatedly add the LICENSE.TXT and accompanying CREDITS.TXT files,
which are referred to in all the source files.
Remove the support for using non-mpsafe filesystem modules.
In particular, do not lock Giant conditionally when calling into the
filesystem module, remove the VFS_LOCK_GIANT() and related
macros. Stop handling buffers belonging to non-mpsafe filesystems.
The VFS_VERSION is bumped to indicate the interface change which does
not result in the interface signatures changes.
Make PFIL use per-VNET lock instead of per-AF lock. Since most used packet
filters (ipfw and PF) use the same ruleset with the same lock for both
AF_INET and AF_INET6 there is no need in more fine-grade locking.
However, it is possible to request personal lock by specifying
PFIL_FLAG_PRIVATE_LOCK flag in pfil_head structure (see pfil.9 for
more details).
Export PFIL lock via rw_lock(9)/rm_lock(9)-like API permitting pfil consumers
to use this lock instead of own lock. This help reducing locks on main
traffic path.
pfil_assert() is currently not implemented due to absense of rm_assert().
Waiting for some kind of r234648 to be merged in HEAD.
This change is part of bigger patch reducing routing locking.