ed [Thu, 28 Aug 2014 11:50:52 +0000 (11:50 +0000)]
Unlock the right lock.
The adist_remote_lock is not held in this place, whereas the
adist_recv_list_lock lock is and is picked up during the next iteration.
I found this by annotating our libpthread with Clang's -Wthread-safety
attributes. I will send out a patch for this in the nearby future,
because it's awesome.
adrian [Thu, 28 Aug 2014 07:44:59 +0000 (07:44 +0000)]
Inform the rate control code if a single frame AMPDU transmission succeeds
but has some retries.
Without this, single frame transmission in AMPDU will always look like
it succeeded fine, and thus AMRR will think it's totally fine to just
keep upping the rate upwards.
Now, this is still not quite right! For multi-frame aggregates the
completion happens in two parts - the TX done and the BA received.
The driver is currently double accounting those a little - there's no
way to say to the rate control code "I completed X frames, Y worked fine,
there were Z retries." And it's a bit odd with iwn, as the firmware
retransmits frames for us so we don't get to see how many retransmits
happened; only that it took longer than normal. I may have to extend
the rate control API to properly track that.
So this may keep the rate lower than it should be, but that's better
than keeping it higher than it should be.
adrian [Thu, 28 Aug 2014 03:18:27 +0000 (03:18 +0000)]
Fix antenna configuration, microcode version checks and rate selection
in preparation for the 5300 3x3 NIC.
During this particular adventure, I did indeed discover that a whole
swath of things made little to no sense.
Those included, and are fixed here:
* A lot of the antenna configuration bits assume the NIC has two receive
chains. That's blatantly untrue for NICs that don't.
* There was some disconnect between the antenna configuration when
forming a PLCP rate DWORD (which includes the transmit antenna
configuration), separate to the link quality antenna configuration.
So now there's helper functions to return which antenna configurations
to use and those are used wherever an antenna config is required.
* The 5300 does up to three stream TX/RX (so MCS0->23), however
the link quality table has only 16 slots. This means all of the
rate entries are .. well, dual-stream rates. If this is the case,
the "last MIMO" parameter can't be 16 or it panics the firmware.
Set it to 15.
* .. and since yes it has 16 slots, it only would try retransmitting
from MCS8->MCS23, which can be quite .. terrible. Hard-code the last
two retry slots to be the lowest configured rate.
* I noticed some transmit configuration command stuff is different
based on firmware API version, so I lifted that code from Linux.
* Add / augment some more logging to make it easier to capture this
stuff.
Now, 3x3 is still terrible because the link quality configuration is
plainly not good enough. I'll have to think about that.
However, the original goal of this - 3x3 operation on the Intel
5300 NIC - actually worked.
There are also rate control bugs in the way this driver handles
notifying the net80211 rate control code when AMPDU is enabled.
It always steps the rate up to the maximum rate possible - and
this eventually ends in much sadness. I'll fix that later.
As a side note - 2GHz HT40 now works on all the NICs I have tested.
As a second side note - this exposed some bad 3x3 behaviour in
the ath(4) rate control code where it starts off at a 3-stream rate
and doesn't downgrade quickly enough. This makes the initial
dhcp exchange take a long time. I'll fix the ath(4) rate code
to start at a low fixed 1x1 MCS rate and step up if everything
works out.
Thank you to Michael Kosarev <russiane39@gmail.com> for donating the
Intel 5300 NIC and pestering me about it since last year to try and
make it all work.
pluknet [Wed, 27 Aug 2014 19:26:35 +0000 (19:26 +0000)]
MFV of r270725, tzdata2014f
- Russia time zone changes.
- New zones: Asia/Chita and Asia/Srednekolymsk.
- Lots of changes wrt. time zone abbreviations and historical data.
- New zone tab data format.
jmg [Wed, 27 Aug 2014 18:56:12 +0000 (18:56 +0000)]
add scripts for generating a diff from p4...
awkdiff is the script from scottl that he got from ken a long time
ago... It no longer lives in his home dir, so give it a new home...
This does simple massaging of p4 output to create a useful diff...
The script p4diffbranch will create a diff that includes new and
deleted files unlike the normal diff2 -b command... So will be useful
for extracting patches from p4... It does take a changeset that will
be used to diff against...
pluknet [Wed, 27 Aug 2014 18:49:41 +0000 (18:49 +0000)]
Vendor import of tzdata2014f.
- Russia time zone changes.
- New zones: Asia/Chita and Asia/Srednekolymsk.
- Lots of changes wrt. time zone abbreviations and historical data.
- New zone tab data format.
dumbbell [Wed, 27 Aug 2014 15:10:28 +0000 (15:10 +0000)]
vt(4): Fix mouse cursor handling in vt_fb/creator_vt/ofwfb
There were two issues:
1. The area given to vt_is_cursor_in_area() was adding the drawable
area offset, something already handled by this function.
2. The cursor was shifted on the screen by the offset of this area
and thus was misplaced or not erased. Furthermore, when reaching
the bottom or right borders, the cursor was either totally
removed or not erased correctly.
hselasky [Wed, 27 Aug 2014 13:21:53 +0000 (13:21 +0000)]
- Update the OFED Linux Emulation layer as a preparation for a
hardware driver update from Mellanox Technologies.
- Remove empty files from the OFED Linux Emulation layer.
- Fix compile warnings related to printf() and the "%lld" and "%llx"
format specifiers.
- Add some missing 2-clause BSD copyrights.
- Add "Mellanox Technologies, Ltd." to list of copyright holders.
- Add some new compatibility files.
- Fix order of uninit in the mlx4ib module to avoid crash at unload
using the new module_exit_order() function.
dumbbell [Wed, 27 Aug 2014 10:04:10 +0000 (10:04 +0000)]
vt(4): Add cngrab() and cnungrab() callbacks
They are used when a panic occurs or when entering a DDB session for
instance.
cngrab() forces a vt-switch to the console window, no matter if the
original window is another terminal or an X session. However, cnungrab()
doesn't vt-switch back to the original window currently.
dumbbell [Wed, 27 Aug 2014 09:34:41 +0000 (09:34 +0000)]
vt(4): Implement basic support for KDSETMODE ioctl
With the current implementation, this allows an X11 server to tell
the console it switches a particular window in "graphics mode". This
information is used by the mouse handling code to ignore sysmouse events
in the window taken by the X server: only him should receive those
events.
dumbbell [Tue, 26 Aug 2014 17:48:05 +0000 (17:48 +0000)]
vt(4): When creating a window buffer, fill it entirely
... not just the visible part.
This fixes a bug where, when switching from eg. vt_vga to vt_fb (ie. the
resolution goes up), the originally hidden, uninitialized area of the
buffer is displayed on the screen. This leads to a missing text cursor
when it's over an unitialized area.
This was also visible when selecting text: the uninitialized area was
not highlighted.
Internally, this area was zeroed: characters were all 0x00000000,
meaning the foreground and background color was black. Now, everything
is filled with a space with a gray foreground color, like the visible
area.
While here, remove the check for the mute flag and always use
TERMINAL_NORM_ATTR as the character attribute (ie. gray foreground,
black background).
alc [Tue, 26 Aug 2014 16:40:20 +0000 (16:40 +0000)]
Back in the days when the kernel was single threaded, testing
"vm_paging_target() > 0" was a reasonable way of determining if the
inactive queue scan met its target. However, now that other threads
can be allocating pages while the inactive queue scan is running, it's
an unreliable method. The effect of it being unreliable is that we
can start swapping out processes when we didn't intend to.
This issue has existed since the kernel was multithreaded, but the
changes to the inactive queue target in 10.0-RELEASE have made its
effects visible.
This change introduces a more direct method for determining if the
inactive queue scan met its target that is not affected by the actions
of other threads.
glebius [Tue, 26 Aug 2014 14:44:08 +0000 (14:44 +0000)]
- Remove socket file operations declaration from sys/file.h.
- Make them static in sys_socket.c.
- Provide generic invfo_truncate() instead of soo_truncate().
ae [Tue, 26 Aug 2014 13:11:38 +0000 (13:11 +0000)]
Remove leading '/' from hardlink name when removing them from the
regular file name. This fixes the problem, when bsdtar can not create
hardlinks to extracted files.
se [Tue, 26 Aug 2014 11:13:07 +0000 (11:13 +0000)]
Back-out the references to vt(4) from this man-page. It appears that the
splash support in vt is implemented within the vt driver and does not
depend on splash(4).
se [Tue, 26 Aug 2014 09:37:43 +0000 (09:37 +0000)]
Remove band.aid that made kbdcontrol lookup keymap files in the syscons
path even under vt, which is no longer useful, since the syscons keymap
files have been converted and committed for use by vt.
se [Tue, 26 Aug 2014 08:13:30 +0000 (08:13 +0000)]
Add references to vt(4) and the configuration files in /usr7share/vt where
appropriate (i.e. where syscons was already mentioned and vt supports the
feature). Comments in defaults/rc.conf are updated to match the contents
of the modified man-page rc.conf(5).
dumbbell [Mon, 25 Aug 2014 19:06:31 +0000 (19:06 +0000)]
vt(4): Store a rectangle for the drawable area, not just the top-left corner
This allows backends to verify they do not draw outside of this area.
This fixes a bug in vt_vga where the text was happily drawn over the
right and bottom margins, when using the Gallant font.
davide [Mon, 25 Aug 2014 17:06:18 +0000 (17:06 +0000)]
Rather than using an hardcoded reclaim age, rely on an LRU-like approach
for dirhash cache, setting a target percent to reclaim (exposed via
SYSCTL). This allows to always make some amount of progress keeping the maximum
reclaim age dynamic.
dumbbell [Mon, 25 Aug 2014 16:56:33 +0000 (16:56 +0000)]
vt(4): Take font offset into account in vt_is_cursor_in_area()
This fixes a "General protection fault" in vt_vga, where
vt_is_cursor_in_area() erroneously reported that the cursor was over the
text. This led to negative integers stored in "unsigned int" and chaos.
adrian [Mon, 25 Aug 2014 05:03:10 +0000 (05:03 +0000)]
i915 driver - enable opregion handle; program CADL.
add opregion handling for drm2 - which exposes some ACPI video configuration
pieces that some Lenovo laptop models use to flesh out which video device
to speak to. This enables the brightness control in ACPI to work these models.
The CADL bits are also important - it's used to figure out which ACPI
events to hook the brightness buttons into. It doesn't yet seem to work
for me, but it does for the OP.
Tested:
* Lenovo X230 (mine)
* OP: ASUS UX51VZ
PR: 190186
Submitted by: Henry Hu <henry.hu.sh@gmail.com>
Reviewed by: dumbbell
rodrigc [Mon, 25 Aug 2014 01:36:56 +0000 (01:36 +0000)]
If the VM was reset via "/sbin/reboot" or "shutdown -r",
then it is no longer necessary to "bhyvectl --destroy" the VM when it reboots.
Move the "bhyvectl --destroy" outside of the while loop.
markj [Sun, 24 Aug 2014 17:10:47 +0000 (17:10 +0000)]
Restore the correct value when disabling probes. Otherwise the instrumented
tracepoints would continue to generate traps, which would be ignored but
could consume noticeable amounts of CPU if, say, all functions in the kernel
were instrumented.
kib [Sun, 24 Aug 2014 16:37:50 +0000 (16:37 +0000)]
Revert the handling of all siginfo sa_flags except SA_SIGINFO to the
pre-r270321. Namely, the flags are preserved for SIG_DFL and SIG_IGN
dispositions.
Requested and reviewed by: jilles
Sponsored by: The FreeBSD Foundation
MFC after: 1 week
neel [Sun, 24 Aug 2014 01:10:06 +0000 (01:10 +0000)]
Add "hw.vmm.topology.threads_per_core" and "hw.vmm.topology.cores_per_package"
tunables to modify the default cpu topology advertised by bhyve.
Also add a tunable "hw.vmm.topology.cpuid_leaf_b" to disable the CPUID
leaf 0xb. This is intended for testing guest behavior when it falls back
on using CPUID leaf 0x4 to deduce CPU topology.
The default behavior is to advertise each vcpu as a core in a separate soket.
neel [Sat, 23 Aug 2014 22:44:31 +0000 (22:44 +0000)]
Fix a bug in the emulation of CPUID leaf 0x4 where bhyve was claiming that
the vcpu had no caches at all. This causes problems when executing applications
in the guest compiled with the Intel compiler.
Submitted by: Mark Hill (mark.hill@tidalscale.com)
adrian [Sat, 23 Aug 2014 18:55:51 +0000 (18:55 +0000)]
Shut down RX before TX - in theory, this should make the chip less likely
to get upset.
The Qualcomm Atheros reference design code goes through significant
hacks to shut down RX before TX. It doesn't even try do do it in the
driver - it actually makes the DMA stop routines in the HAL shut down
RX before shutting down TX.
So, to make this work for chips that aren't the AR9380 and later, do
it in the driver. Shuffle the TX stop/drain HAL calls to be called
*after* the RX stop HAL call.
mav [Sat, 23 Aug 2014 17:31:56 +0000 (17:31 +0000)]
Restore pre-r239157 handling of sched_yield(), when thread time slice was
aborted, allowing other threads to run. Without this change thread is just
rescheduled again, that was illustrated by provided test tool.
dim [Sat, 23 Aug 2014 15:54:22 +0000 (15:54 +0000)]
In r260015, I renamed several identifiers to avoid -Wsystem-header
warnings. In r261283, I imported libc++ 3.4 release, but this contained
one identifier that had not been renamed yet, leading to a compilation
error when using -std=c++1y. Fix the compilation error by correctly
renaming the identifier.
Reported by: rcarter@pinyon.org
PR: base/192139
MFC after: 3 days