nwhitehorn [Sun, 28 Oct 2012 02:15:35 +0000 (02:15 +0000)]
Extend dim's hack from r228978: not only clang but gcc on non-x86 platforms
warns about unused variables in this code, so always add -Wno-unused to
the warning flags. Why gcc on x86 *doesn't* warn about this, I will never
know. The code itself should probably be fixed at some point.
mav [Sat, 27 Oct 2012 10:14:12 +0000 (10:14 +0000)]
Remove priority enforcement from xpt_ation(). It is not good and even not
safe in some cases to reduce CCB priority after it was scheduled with high
priority. This fixes reproducible deadlock when command sent through the
pass interface while ATA XPT recovers from command timeout.
Instead of that enforce priority at passioctl(). libcam provides no obvious
interface to specify CCB priority and so much (all?) code specifies zero
(highest) priority. This change limits pass CCBs priority to NORMAL run
level, allowing XPT to complete bus and device recovery after reset before
running any payload.
glebius [Fri, 26 Oct 2012 21:06:33 +0000 (21:06 +0000)]
o Remove last argument to ip_fragment(), and obtain all needed information
on checksums directly from mbuf flags. This simplifies code.
o Clear CSUM_IP from the mbuf in ip_fragment() if we did checksums in
hardware. Some driver may not announce CSUM_IP in theur if_hwassist,
although try to do checksums if CSUM_IP set on mbuf. Example is em(4).
o While here, consistently use CSUM_IP instead of its alias CSUM_DELAY_IP.
After this change CSUM_DELAY_IP vanishes from the stack.
Submitted by: Sebastian Kuzminsky <seb lineratesystems.com>
imp [Fri, 26 Oct 2012 20:43:30 +0000 (20:43 +0000)]
Siba, in theory, is a architecturally neutral bus, so place it in
files. It used to be in files.mips before the clean-room rewrite and
really doesn't belong there. If we need to grow arch specific code,
we can move it into $ARCH/$ACH/siba_machdep.c.
mav [Fri, 26 Oct 2012 20:03:08 +0000 (20:03 +0000)]
Implement CAM_ATAIO_NEEDRESULT (fetching full set of result registers) for
ata(4) driver in ATA_CAM mode. That slighty improves error reporting and
also should fix `smartctl -l scterc /dev/adaX` operation.
adrian [Fri, 26 Oct 2012 19:06:24 +0000 (19:06 +0000)]
Allow net80211 to be built on -9 and -8.
There are some people who use the -HEAD net80211 and wireless drivers
on earlier FreeBSD versions in order to get the updated 802.11n support.
The previous if_clone API changes broke this.
adrian [Fri, 26 Oct 2012 16:56:55 +0000 (16:56 +0000)]
Fix up some initial issues with creation and deletion of hotplugged
net80211 devices and vaps.
* vnet sets vnet0 during kldload and device probe/attach, but not for
the hotplug event. Thus, plugging in a NIC causes things to panic.
So, add a CURVNET_SET(vnet0) for now during the attach phase, until
the hotplug code is taught to set CURVNET_SET(vnet0).
* there's also no implied detach vnet context - so teach the detach
path about ifp->if_vnet.
* When creating/deleting vaps, also set the vnet context appropriately.
These can be done at any time.
Now, the problems!
* ieee80211.c is supposed to be OS-portable code, with no OS-specific stuff
like vnet. That should be fixed.
* When the device hotplug code gets taught about CURVNET_SET(vnet0), the
device vnet set can go away; but the VAP vnet set still needs to be there.
* .. and there still is the question about potentially adding an implied
CURVNET_SET(ifp->if_vnet) on if_free(), since any/all devices may end up
being detached by a hotplug event in today's world. That's going to be
a topic of a subsequent commit.
mav [Fri, 26 Oct 2012 16:32:20 +0000 (16:32 +0000)]
Fix loader crash when some unhalted exception happens during `include`
command execution. In case of such unhandled exception, vmReset() inside
ficlExecC() flushes the VM state. Attempt to return back to Forth after
that cause garbage dereference with unexpected results. To avoid that
situation call vmThrow() directly instead of expecting Forth to do it.
adrian [Fri, 26 Oct 2012 16:31:12 +0000 (16:31 +0000)]
Since it's not immediately obvious whether the current TX path handles
fragment rate lookups correctly, add a comment describing exactly that.
The assumption in the fragment duration code is the duration of the next
fragment will match the rate used by the current fragment. But I think
a rate lookup is being done for _each_ fragment. For older pre-sample
rate control this would almost always be the case, but for sample
it may be incorrect more often then correct.
avg [Fri, 26 Oct 2012 14:50:16 +0000 (14:50 +0000)]
zfs: fix label validation code in vdev_geom_read_config
POOL_STATE_SPARE and POOL_STATE_L2CACHE were not handled correctly
and thus the cache and spare disks would not be correctly probed.
Reported by: Michael Schmiedgen <schmiedgen@gmx.net>,
Matthew D. Fuller <fullermd@over-yonder.net>
Tested by: Michael Schmiedgen <schmiedgen@gmx.net>,
flo
MFC after: 5 days
hselasky [Fri, 26 Oct 2012 06:04:47 +0000 (06:04 +0000)]
Add missing CTLFLAG_TUN flag to tunable sysctls in USB stack.
Rearrange the tunables and belonging sysctl declarations, so
that they are next to eachother.
alc [Fri, 26 Oct 2012 03:02:39 +0000 (03:02 +0000)]
Port the new PV entry allocator from amd64/i386. This allocator has two
advantages. First, PV entries are roughly half the size. Second, this
allocator doesn't access the paging queues, and thus it allows for the
removal of the page queues lock from this pmap.
Replace all uses of the page queues lock by a R/W lock that is private
to this pmap.
dteske [Fri, 26 Oct 2012 00:31:25 +0000 (00:31 +0000)]
Switch from using a msgbox to display help files to a textbox instead. The
problem with using a msgbox was one of truncation in the case of Xdialog(1)
and lack of screen real-estate (since the msgbox is not scrollable in X11
while a textbox is).
The textbox renders the text much better and is more appropriate for this
type of data display.
jmallett [Fri, 26 Oct 2012 00:08:50 +0000 (00:08 +0000)]
Add support for Radisys as a vendor of Octeon hardware. Add some preliminary
support for what their boot loader refers to as the "RSYS4GBE", of which there
are two instances ("Data Processing Blocks") on the Radisys ATCA-7220.
sobomax [Thu, 25 Oct 2012 22:54:29 +0000 (22:54 +0000)]
Second attempt to add @every_second keyword support. Due to multiple
requests, default to the previous 60-seconds scheduling method
unless there is any @every_second entries to conserve CPU cycles and
power.
This change also improves scheduling in the default mode by running
as close to the beginning of the minnute as possible by replacing
sleep(3) with nanosleep(2). Previously, the tasks would run anywhere
within the first second of the minute and that offset drifted back
and forth each time cron(8) was engaged.
dteske [Thu, 25 Oct 2012 21:04:11 +0000 (21:04 +0000)]
When Xdialog(1) is passed a NULL argument to its `--help' option, Xdialog(1)
acts like dialog(1) in that it returns exit status 2 when the help button is
chosen.
davide [Thu, 25 Oct 2012 20:23:04 +0000 (20:23 +0000)]
- Remove the references to the deprecated zalloc kernel interface
- Use M_ZERO flag in malloc() rather than bzero()
- malloc() with M_NOWAIT can't return NULL so there's no need to check
ed [Thu, 25 Oct 2012 20:16:38 +0000 (20:16 +0000)]
Let lpr build with -Wmissing-variable-declarations.
Mark variables static where possible and place the uid/euid variables in
lp.h, so that we can compile-time enforce that these variables have the
same type.
np [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 [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.
ae [Thu, 25 Oct 2012 09:39:14 +0000 (09:39 +0000)]
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.
imp [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.
imp [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.
imp [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.
imp [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 [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 [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.
jimharris [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).
kib [Wed, 24 Oct 2012 18:21:59 +0000 (18:21 +0000)]
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