Sepherosa Ziehau [Thu, 7 Feb 2013 06:38:04 +0000 (14:38 +0800)]
emx: Implement multiple hardware TX queue support; disabled by default
Two notes about the multiple hardware TX queue support:
- It could only be enabled on 82571, 82572 and es2lan. Enabling it on
82574, whose datasheet claims multiple hardware TX queue support,
could cause watchdog timeout when heavy TCP receiving test are
conducted.
- It is disabled by default. Since 82571, 82572 and es2lan only have
one global context for TX hardware checksum and TSO, the driver will
have to setup TX context descriptor for each packet. Using TX context
descriptor for each packet could cause serious transmission performance
regression for tiny packets, see comment of following commit:
51e6819fc2ad7cefdf830dcc9f20bcbe2af2aa52
However, multiple hardware TX queues still could be enabled depending
on the workload (*):
o TSO probably are not affected by setting up a TX context descriptor
for each TSO packet.
o Stuffs do not using hardware TX checksum, e.g. IP fast forwarding.
Multiple hardware TX queues could be enabled globally by tunable:
hw.emx.txr=2
Multiple hardware TX queues could be enabled on individual interface by
tunable:
hw.emxY.txr=2
(*) Another thought is to add per-interface metric, which indicates the
size of packets that worth hardware checksum; if the packets' size is
below that metric, software checksum is used.
Sascha Wildner [Thu, 7 Feb 2013 21:55:21 +0000 (22:55 +0100)]
kether_ntoa.9: Fix prototypes.
Sascha Wildner [Thu, 7 Feb 2013 19:05:52 +0000 (20:05 +0100)]
games/atc: Fix a logic bug.
The original logic should have really been:
if ((l < 'a' && l > 'z') || (l < 'A' && l > 'Z'))
But using islower()/isupper() is simpler and more readable.
Taken-from: NetBSD
Sascha Wildner [Thu, 7 Feb 2013 17:38:23 +0000 (18:38 +0100)]
kether_ntoa.9: Mention %D.
Also, perform some minor cleanup.
Sascha Wildner [Thu, 7 Feb 2013 17:37:31 +0000 (18:37 +0100)]
hexncpy.9: Some little cleanup.
Sepherosa Ziehau [Thu, 7 Feb 2013 01:43:48 +0000 (09:43 +0800)]
em/emx: Clear bit 28 of TARC1 for 82571/82572/es2lan
Clearing bit 28 of TARC1 is done in HAL's device initialization, however,
it happens before the MULR bit is turned on in TX unit initialization;
MULR is not necessarily on by default, since its value is loaded from
EEPROM according to the datasheet.
Antonio Huete Jimenez [Thu, 7 Feb 2013 01:07:30 +0000 (02:07 +0100)]
doc - Add a note about %D removal in porting_drivers.txt document.
Antonio Huete Jimenez [Thu, 7 Feb 2013 00:47:25 +0000 (01:47 +0100)]
Add a manpage for hexncpy function.
Also fix .Dd in kether_ntoa(9).
Antonio Huete Jimenez [Wed, 6 Feb 2013 23:03:28 +0000 (00:03 +0100)]
Add manual pages for kether_ntoa and kether_aton functions.
Sepherosa Ziehau [Wed, 6 Feb 2013 08:50:52 +0000 (16:50 +0800)]
igb: Sync w/ intel igb-2.3.7
- Support I210 and I211
- EEE settings are only applied to copper chips
- Explicitly disable DMA coalesce, if not requested
Sepherosa Ziehau [Wed, 6 Feb 2013 04:34:35 +0000 (12:34 +0800)]
em: Sync w/ intel em-7.3.4
- Move PBA configuration into em_reset(); mainly to put hardware into
stable state after the driver attached.
- Add workaround for PCH2 chips during resuming.
- Fixup flow control parameters for PCH, ICH9, ICH10 and ES2LAN chips.
- Remove no longer needed ERT setting for PCH2, ICH9 and ICH10 chips.
Sepherosa Ziehau [Wed, 6 Feb 2013 04:32:16 +0000 (12:32 +0800)]
emx: Sync w/ intel em-7.3.4
Move PBA configuration into emx_reset(); mainly to put hardware into
stable state after the driver attached.
Sepherosa Ziehau [Tue, 5 Feb 2013 09:05:57 +0000 (17:05 +0800)]
ig_hal: Merge intel em-7.3.4 and igb-2.3.7 hardware abstraction layer
Sascha Wildner [Sun, 20 Jan 2013 02:25:15 +0000 (03:25 +0100)]
Enable -Werror for world building with gcc47.
The kernel still has warnings to be reviewed.
Sascha Wildner [Tue, 5 Feb 2013 20:23:52 +0000 (21:23 +0100)]
Remove xlint. It's outdated and there are much better checkers around.
clang static analyzer, cppcheck, coccinelle et al.
So there's no need to maintain it in base.
Sascha Wildner [Sun, 20 Jan 2013 02:15:59 +0000 (03:15 +0100)]
libm: Exclude -Woverflow from -Werror in s_csqrtl.c for gcc47/i386.
The issue is that a long double in gcc47 on i386 doesn't seem to be
able to hold LDBL_MAX. At least a warning is generated. Cause
unknown, might be a bug in gcc (or our gcc's configuration).
gcc47 on FreeBSD/i386 does not show this behavior (no warning
generated at least).
Until we have a better clue, don't turn this warning into an error,
even if -Werror is specified, so that building can go on.
FreeBSD-testing: tuxillo
Sascha Wildner [Tue, 5 Feb 2013 19:54:06 +0000 (20:54 +0100)]
Fix some more things related to the switch to gcc47.
* Adjust make.conf and its manual page.
* Create gcc47 MLINKS properly (clean up the Makefile a bit, too).
* Exclude gcc44 in the qemu setup.
Sascha Wildner [Sun, 3 Feb 2013 11:53:24 +0000 (12:53 +0100)]
UPDATING: Adjust heading.
Venkatesh Srinivas [Wed, 30 Jan 2013 18:21:10 +0000 (10:21 -0800)]
kernel -- ffs: Softdep lock fix (lk unheld in process_worklist_item)
In process_worklist_item, from newdirrem/request_cleanup, the softdep
lock was not held before removing workitems. Make newdirrem take the
softdep lock around request_cleanup.
Reported-by: swildner@
Bug: 2501
Sepherosa Ziehau [Mon, 4 Feb 2013 09:59:04 +0000 (17:59 +0800)]
pktgen: Support multiple TX queues
- Dispatch start operation to subqueue owner CPU's netisr.
- Add PKTGENMQSTART to utilize multiple TX queues
Sepherosa Ziehau [Mon, 4 Feb 2013 09:33:06 +0000 (17:33 +0800)]
pktgen: Factor out pktgen_ref
Will be needed for multiple TX queue support
Sepherosa Ziehau [Mon, 4 Feb 2013 09:29:56 +0000 (17:29 +0800)]
pktgen: Move buflist and stop callout into per-cpu data struct
Prepare for the multiple TX queue support.
François Tigeot [Sun, 3 Feb 2013 12:32:01 +0000 (13:32 +0100)]
Unbreak world with NO_GCC44
gcc44 in now optional, do not require its use during buildworld
anymore.
John Marino [Sun, 3 Feb 2013 09:12:27 +0000 (10:12 +0100)]
Promote GCC 4.7 to be the default compiler
This commit causes world and kernel to be built by GCC 4.7 if the compiler
is not specified. As a side effect, the make variable "NO_GCC47" no longer
functions. GCC 4.7 will always be built. In addition to changing the
default of WORLD_CCVER, the CCVER variable also defaults to "gcc47" now.
The variable "NO_GCC44" has been resurrected to prevent GCC 4.4 from
being built. As noted in the UPDATING file, using this option is highly
discouraged. GCC 4.4 is very useful in building some packages in pkgsrc
that fail to build with GCC 4.7's stricter standards. The new DPorts
system is designed to use GCC 4.4 by default, regardless of the base's
default compiler setting. If at all possible, build *both* compilers
for the maximum flexibility to build packages.
John Marino [Sat, 2 Feb 2013 22:35:27 +0000 (23:35 +0100)]
Unbreak world (gcc47 plugin)
The installincludes target is run before "depend" target, so gtype.state
hasn't been created by the time "installincludes" is executed in stage 4.
Luckily there is a similar functionality for FILES that is executed at
the install phase, which will unbreak world (broken on previous commit).
Other headers are generated as well, so swap INCSGROUPS with FILESGROUPS
for everything to avoid having to figure which ones. The headers are
needed at runtime, not buildtime, so this is okay.
John Marino [Sat, 2 Feb 2013 15:29:40 +0000 (16:29 +0100)]
gcc47: Fix plugin mechanism
There were two problems with gcc 4.7 LTO plugin:
1) It needed a number of object files from libiberty.
Unfortunately the previous object files couldn't be used as they need
to be built with -fPIC and libiberty is only an internal (non-pic) lib.
2) The plugin header directory was missing completely, as seen with
gcc -print-file-name=plugin only returning "plugin".
Sepherosa Ziehau [Sat, 2 Feb 2013 08:23:57 +0000 (16:23 +0800)]
pktgen: Use atomic for pktgen and module reference count
Module's token is no longer needed in many places. Ease the upcoming
changes to support multiple hardware TX queues.
Matthew Dillon [Fri, 1 Feb 2013 21:47:37 +0000 (13:47 -0800)]
kernel - Fix kernel panic caused by rename race
* kern_rename() must temporarily unlock the source ncp when resolving the
target ncp, and will sometimes have to temporarily unlock the target ncp
when relocking both. This can race against a topological removal of one
or both ncp's, resulting in incorrect operation or a panic due to a
NULL vp.
* Detect the case and return EAGAIN if the ncp's have been marked NCF_DESTROYED
or if fromncp loses its vp resolution. Callers detect the EAGAIN and retry
the operation.
Reported-by: ftigeot
Matthew Dillon [Fri, 1 Feb 2013 17:57:55 +0000 (09:57 -0800)]
kernel - cycle vnode in cache_unlink()
* cache_unlink() and cache_rename() are called by VFS's to update the
namecache after a file deletion or rename. cache_rename() also calls
cache_unlink().
* Add code to this function which cycles any vnode attached to the
namecache entry for the case where its refs are 0. This will
trigger VOP_INACTIVE and allow the VFS to detect file deletions.
Generally speaking this means that VFS's no longer have to detect
deleted files in code paths outside of VOP_INACTIVE w/regards to
forcing a reclaim on the vnode.
* HAMMER2 now depends on this behavior. The change in behavior allows
HAMMER2 to do away with inode backpointers from chain structures,
greatly simplifying the code and removing a chicken-egg dependency.
* Other VFSs (HAMMER, TMPFS, UFS) may be adjusted in the future but for
now their file deletion code outside of VOP_INACTIVE is being left
intact.
Matthew Dillon [Fri, 1 Feb 2013 17:54:43 +0000 (09:54 -0800)]
kernel - Fix memory leak on iocom terminaion
* freerd_state was being cleaned up by the reader thread, but during
decomissioning the writer thread can simulate incoming packets
to cleanly shutdown open transactions, and this can reload
freerd_state.
* Move the cleanup for freerd_state and freewr_state out of the
reader/writer threads and into kdmsg_iocom_uninit() proper.
* Fixes dangling 112 bytes of memory left allocated after uninit.
Matthew Dillon [Fri, 1 Feb 2013 17:19:41 +0000 (09:19 -0800)]
hammer2 - serialized flush work part 4
* Hardlink helper functions now take and return hammer2_chain pointers
instead of messing with hammer2_inode's, which simplifies matters
greatly.
* Major cleanup of the hardlink handling code.
* Get hardlink creation/deletion mostly working as expected again.
There is still an issue with hammer_inode aliasing (see TODO),
and the rename-directory-to-some-parent hardlink issue has not been
addressed yet.
Sepherosa Ziehau [Fri, 1 Feb 2013 08:33:21 +0000 (16:33 +0800)]
pktgen: Unbreak compile
Matthew Dillon [Fri, 1 Feb 2013 00:03:59 +0000 (16:03 -0800)]
hammer2 - serialized flush work part 3
* Clean up hammer2_inode vs hammer2_chain. Remove chain->u.ip (the
backpointer from the chain to the inode), which simplifies a lot
of things. This was only used to detect when a vnode might have to
be recycled but we solve that a different way by adjusting the
kernel's cache_unlink() code.
* Revamp hammer2_inode_get(). This routine now always kmalloc()'s a new
hammer2_inode. In HAMMER2, the hammer2_inode structure is actually
an indirect pointer to an underlying chain so it does not have to be
unique. There can multiple ip's pointing to the same chain.
* Revamp hammer2_inode_put(). The ref on ip->chain is dropped via ip->chain,
and the (passed_chain) argument is treated separately and does not
necessarily have to match ip->chain. This makes hammer2_inode_put()'s API
comparable to hammer2_inode_unlock_ex(), reducing confusion.
* Depend on adjustments to cache_unlink() and cache_rename() to detect
vnodes which should be recycled. This code (in the proper kernel, not
here) now triggers a deactivation if the vnode related to the namecache
entry has no refs, allowing HAMMER2 to detect any deletions and vrecycle()
the vnode immediately.
* Numerous ref/lock fixes.
Matthew Dillon [Fri, 1 Feb 2013 00:03:21 +0000 (16:03 -0800)]
Merge branch 'master' of ssh://crater.dragonflybsd.org/repository/git/dragonfly
John Marino [Thu, 31 Jan 2013 19:18:54 +0000 (20:18 +0100)]
Remove legacy lex source files
The ancient lex was replaced by flex recently. The bootstrapping issue
seems to be solved, so let's go ahead and purge lex from base now.
John Marino [Thu, 31 Jan 2013 15:58:59 +0000 (16:58 +0100)]
libstdc++47: Fix iostream bug 2478
c++ iostreams were segfaulting -- apparently _M_table isn't defined in all
cases. Fix inspired from FreeBSD configuration files.
https://bugs.dragonflybsd.org/issues/2478
Matthew Dillon [Thu, 31 Jan 2013 06:41:52 +0000 (22:41 -0800)]
hammer2 - serialized flush work part 2
* Adjust the hammer2_inode_lock*() API to separate the inode lock from
the chain lock (it gets both). The locked chain associated with the
inode is now returned and can change during search iterations, eventually
to be returned via hammer2_inode_unlock*().
* Fixes issues related to threads obtaining more than 1 shared lock on the
same chain, which can deadlock deeper procedures which might need to
temporarily upgrade the lock.
* Continue working through bugs.
Matthew Dillon [Thu, 31 Jan 2013 04:53:27 +0000 (20:53 -0800)]
hammer2 - serialized flush work part 1
This is preliminary work required to support chain structure replication
for the purposes of recording modifications which are then separated by
serialization points (by transaction id). Ultimately this will allow the
flush code to flush to an exact serialization point and in the process
operate completely asynchronously from any further modifications being
made on the frontend after that serialization point.
* Separate hammer2_inode from hammer2_chain.
* Split the locking APIs for inodes and chains into their own functions.
* Move ip_data into chain->data->ipdata (kmalloc'd), instead of embedding
it in hammer2_inode. This allows the inode structure to disconnect from
the chain.
Sascha Wildner [Wed, 30 Jan 2013 22:49:35 +0000 (23:49 +0100)]
usb4bsd: Add missing parameter to ue_start().
Submitted-by: Yellow Rabbit <yrabbit@sdf.lonestar.org>
Dragonfly-bug: <http://bugs.dragonflybsd.org/issues/2503>
Matthew Dillon [Wed, 30 Jan 2013 07:27:01 +0000 (23:27 -0800)]
hammer2 - Start working on the freemap (note: freemap not yet operational)
* hammer2 show now tries to dump all four volume headers
* Minimum storage allocation chunk size is 1K, increase MIN_RADIX and
MIN_ALLOC appropriately.
* Preliminary reserved block mappings for the freemap indirect and bitmap
blocks.
* Preliminary freemap design will use normal indirect blocks (but with
a different bref.type name). The check area of the bref will be used to
store additional freemap hints.
The volume header will contain a blockref to the root of the freemap,
and newfs_hammer2 now initializes this blockref.
* Bring major hammer2_disk.h media structure comments up to snuff.
* Formalize blockref.methods and set proper defaults. This field contains
the crc/check and compression methods for a blockref.
Matthew Dillon [Tue, 29 Jan 2013 23:04:05 +0000 (15:04 -0800)]
kernel - Fix deadlock when umount races an access on the underlying filesystem
* The nlookup code temporarily busies the target mount when diving a
mount point in cases where the base of the mount is not resolved
in the namecache.
* Fix a deadlock which can occur between the namecache structural lock
and the vfs_busy() on the mount structure by reordering the lock.
* Generally only occured if an attempt was made to unmount a filesystem
on which programs are still doing active operations (verses just
passively holding references to the filesystem). For example, a
umount on the target filesystem occuring while a cpdup using an
absolute path is running.
Reported-by: ftigeot
Matthew Dillon [Tue, 29 Jan 2013 19:19:22 +0000 (11:19 -0800)]
kernel - Attempt to fix NULL pointer dereference during console switch
* Attempt to fix NULL pointer dereference during console switch.
Bug 2481.
Reported-by: marino
Matthew Dillon [Tue, 29 Jan 2013 19:11:49 +0000 (11:11 -0800)]
kernel - Fix tty cool-aid
* Fix a tty crash in the ^T handling code. The code can race LWP
destruction and blow up.
Sepherosa Ziehau [Tue, 29 Jan 2013 08:29:35 +0000 (16:29 +0800)]
socket: Mark the asynchronous rcvd netmsg dead, when it is dropped
This is an attempt to fix the race that asynchronous rcvd netmsg
is queued to netisr after it is dropped in tcp_close().
Reported-by: ftigeot@
Sepherosa Ziehau [Tue, 29 Jan 2013 06:48:11 +0000 (14:48 +0800)]
igb: Enable multiple hardware TX queues
Sepherosa Ziehau [Tue, 29 Jan 2013 06:27:11 +0000 (14:27 +0800)]
igb: Implement aggregated RX/TX MSI-X support
Sepherosa Ziehau [Tue, 29 Jan 2013 03:32:32 +0000 (11:32 +0800)]
igb: Rework serializer array setup
Sepherosa Ziehau [Tue, 29 Jan 2013 02:50:14 +0000 (10:50 +0800)]
igb: Setup TX rings' intr CPUID properly if MSI/legacy intr is used
Sepherosa Ziehau [Tue, 29 Jan 2013 02:42:58 +0000 (10:42 +0800)]
igb: Fix up TX rings' MSI-X setup
Sepherosa Ziehau [Mon, 28 Jan 2013 13:37:26 +0000 (21:37 +0800)]
if: Fix wrong assertion condition in ifq_set_subq_mask
Sepherosa Ziehau [Mon, 28 Jan 2013 13:24:55 +0000 (21:24 +0800)]
igb: Utilize power of 2 mask based CPUID to subqueue mapping
Sepherosa Ziehau [Mon, 28 Jan 2013 13:24:17 +0000 (21:24 +0800)]
if: Add power of 2 mask based CPUID to subqueue mapping
Sepherosa Ziehau [Mon, 28 Jan 2013 13:08:16 +0000 (21:08 +0800)]
igb: Setup subqueue count properly
Sepherosa Ziehau [Mon, 28 Jan 2013 13:08:00 +0000 (21:08 +0800)]
if: Add function to set subqueue count
Sepherosa Ziehau [Mon, 28 Jan 2013 11:51:23 +0000 (19:51 +0800)]
igb: Add per-TX ring tx_pkt sysctl node, if IGB_TSS_DEBUG is enabled
Sepherosa Ziehau [Mon, 28 Jan 2013 09:53:23 +0000 (17:53 +0800)]
igb: Add IGB_TSS_DEBUG kernel option
Sepherosa Ziehau [Mon, 28 Jan 2013 09:45:50 +0000 (17:45 +0800)]
igb: Add per-TX ring enable flag.
For TX rings' whose enable flag are not set, which could happen during
polling entering/exiting, its corresponding subqueue will be purged.
Sepherosa Ziehau [Mon, 28 Jan 2013 09:36:36 +0000 (17:36 +0800)]
igb: Move IGB_FLAG_TSO_IPLEN0 into TX rings
Avoid extra access to softc and leave enough space for TX ring specific
flags.
Sepherosa Ziehau [Mon, 28 Jan 2013 09:22:17 +0000 (17:22 +0800)]
igb: Define macros for wreg_nsegs, instead of using magic number
Sepherosa Ziehau [Mon, 28 Jan 2013 01:57:04 +0000 (09:57 +0800)]
wlan: ifaltq is no longer ifqueue
Sepherosa Ziehau [Mon, 28 Jan 2013 01:43:03 +0000 (09:43 +0800)]
wlan: Remove unused ieee80211_drain_ifq
Sepherosa Ziehau [Sun, 27 Jan 2013 13:49:51 +0000 (21:49 +0800)]
igb: Make tx_intr_nsegs and tx_wreg_nsegs nodes aware of multiple TX queues
Sepherosa Ziehau [Sun, 27 Jan 2013 13:21:22 +0000 (21:21 +0800)]
igb: Merge per-RX queue rx_wregs into single rx_wreg_nsegs node
There is no use case that it needs to be tuned on per-RX queue base.
Sascha Wildner [Sat, 26 Jan 2013 13:58:32 +0000 (14:58 +0100)]
kernel/agp: No need to include opt_bus.h here.
Sascha Wildner [Fri, 25 Jan 2013 22:48:59 +0000 (23:48 +0100)]
kernel/mfi: Sort commands by opcode.
Sepherosa Ziehau [Fri, 25 Jan 2013 05:52:59 +0000 (13:52 +0800)]
igb: Don't assume only one TX queue will be enabled.
Prepare multiple TX queue support.
- Add TX queue count when MSI-X is used
- Add currently used TX queue count
Number of TX queues are still limited to 1 as of this commit.
Sepherosa Ziehau [Fri, 25 Jan 2013 04:33:14 +0000 (12:33 +0800)]
igb: Use ifsq_devstart_sched in watchdog and resume methods
So these two method won't consume too much time.
In watchdog method, schedule all subqueues instead of the subqueue
causing watchdog timeout.
Sepherosa Ziehau [Fri, 25 Jan 2013 03:34:36 +0000 (11:34 +0800)]
igb: Setup subqueue CPUID before possible calling of igb_init
Sepherosa Ziehau [Fri, 25 Jan 2013 03:31:01 +0000 (11:31 +0800)]
igb: Utilize subqueue watchdog functions
Prepare for the multiple TX queue support
Sepherosa Ziehau [Fri, 25 Jan 2013 03:29:47 +0000 (11:29 +0800)]
if: Add subqueue watchdog helper functions for driver use
Ease driver's multiple TX queue support
Sepherosa Ziehau [Thu, 24 Jan 2013 12:35:28 +0000 (20:35 +0800)]
igb: Properly set RX ring in use upon enter/exit polling mode
Venkatesh Srinivas [Sat, 19 Jan 2013 09:43:03 +0000 (01:43 -0800)]
kernel -- virtio: Implement virtio-layer lwkt_serializer for devices
* Switch virtio device targets (currently only -blk) to use a
serializer for synchronizing per-target state. Thread the
serializer through virtqueue_notify (release around kick) and
into the bus interrupt setup code.
* Remove dump support from virtio-blk for now; it doesn't work and
results in further panics from an incorrectly setup bio.
* Other cleanups of virtio-blk (de-indirect locks).
Matthew Dillon [Thu, 24 Jan 2013 02:35:10 +0000 (18:35 -0800)]
buildworld - Attempt to fix m4 bootstrapping issue (2)
* m4 depends on flex which exec's (depends on) m4.
* Change m4 to not depend on flex and reorder the [b]yacc build to run
before m4. M4's lex file is now manually generated and made part of
the source archive, and the Makefile simply compiles the .c version
instead of trying to run flex.
Any future update to m4 will require it's lex file to be manually
lex'd. Too bad, that's the way it goes. M4 is a piece of crap and
flex is an even bigger piece of crap for needing to exec M4. I'm not
going to play with this stuff more than I need to to make things compile.
* Remove conditionals from m4 .y and .l files. They were wrong because
they weren't necessarily reflective of which lexer was being run,
and now they aren't needed at all.
Matthew Dillon [Wed, 23 Jan 2013 21:56:37 +0000 (13:56 -0800)]
kernel - Do not allow (devfs) devices to be force-unmounted
* Do not force-unmount devfs devices. Even more importantly, don't
force-unmount devfs devices and then try to force-vflush them.
Filesystems have always been responsible for flushing their underlying
block devices.
These situations occur during halt/reboot.
* Fixes at least one issue when hammer's volume-add is used to specify
a block device in /dev which is then added to the root mount. This
created a situation where the /dev vs / unmount order breaks.
* Should also prevent e.g. the console or other vty hangers-on from being
destroyed out from under active descriptors during a halt or reboot.
Matthew Dillon [Wed, 23 Jan 2013 21:40:40 +0000 (13:40 -0800)]
buildworld - Attempt to fix m4 bootstrapping issue
* Set the M4 environment variable to force the buildworld to use the
bootstrap version of M4 in all passes. This removes the need to
manually build/install the m4 binary due to the recent major tools
refresh.
* Force build ordering for some of the bootstrap utilities, particularly
the m4 binary, so the binary is available to help build other bootstrap
tools later on.
Sascha Wildner [Wed, 23 Jan 2013 19:00:10 +0000 (20:00 +0100)]
m4.1: Remove some unneeded arguments to .Nm
Sascha Wildner [Wed, 23 Jan 2013 16:54:32 +0000 (17:54 +0100)]
Remove some more %D remains here and there.
Sepherosa Ziehau [Wed, 23 Jan 2013 12:37:49 +0000 (20:37 +0800)]
tcp: Limit new segements burst to 4 during extended limited transmit
Javier Alcázar [Thu, 3 Jan 2013 21:36:32 +0000 (06:36 +0900)]
TOP wasn't reporting correctly CPU states without -M
Adding code to get averages and updating man page.
This commit fixes issue #2447
Sepherosa Ziehau [Wed, 23 Jan 2013 11:24:03 +0000 (19:24 +0800)]
tcp: Add comment about "fairsend"
Sepherosa Ziehau [Wed, 23 Jan 2013 09:58:46 +0000 (17:58 +0800)]
ifconfig: IFF_OACTIVE and IFF_POLLING are gone
Sepherosa Ziehau [Wed, 23 Jan 2013 09:48:43 +0000 (17:48 +0800)]
sockio: Sort SIOC into numerical order
While im here, add comment about used SIOC in non-continuous SIOC block
Sepherosa Ziehau [Wed, 23 Jan 2013 09:34:33 +0000 (17:34 +0800)]
if: Update comment about polling cpuid ioctl variables, which is deprecated
Sepherosa Ziehau [Wed, 23 Jan 2013 09:21:03 +0000 (17:21 +0800)]
udp6: Remove pcb from wildcard table before calling in_pcbconnect
DragonFly-bug: http://bugs.dragonflybsd.org/issues/2485
Matthew Dillon [Wed, 23 Jan 2013 00:51:52 +0000 (16:51 -0800)]
kernel - Fix improper tmpfs resource limit check
* Fix an improper check that was causing tmpfs to blow up when used as
backing store for a VN device.
Reported-by: tuxillo
Sascha Wildner [Tue, 22 Jan 2013 19:19:38 +0000 (20:19 +0100)]
kernel/amr: Extend the visibility of AMR_DEBUG.
Half the code was missing the setting of AMR_DEBUG in the config file
because its visibility was reduced to amr.c only.
Reported-by: tuxillo
Antonio Huete Jimenez [Tue, 22 Jan 2013 18:49:00 +0000 (19:49 +0100)]
Replace few more cases where %D format string is used.
Also remove a reference to %D in kvcprintf's comment.
Sepherosa Ziehau [Thu, 17 Jan 2013 08:33:55 +0000 (16:33 +0800)]
tcp: Improve sender-sender and sender-receiver fairness on the same netisr
Yield to other senders or receivers on the same netisr if the current TCP
stream has sent certain amount of segments (currently 4) and is going to
burst more segments. sysctl net.inet.tcp.fairsend could be used to tune
how many segements are allowed to burst. For TSO capable devices, their
TSO aggregate size limit could also affect the number of segments allowed
to burst. Set net.inet.tcp.fairsend to 0 will allow single TCP stream to
burst as much as it wants (the old TCP sender's behaviour).
"Fairsend" is performed at the places that do not affect segment sending
during congestion control:
- User requested output path
- ACK input path
Measured improvement in the following setup:
+---+ +---+
| |<-----------| B |
| | +---+
| A |
| | +---+
| |----------->| C |
+---+ +---+
A (i7-2600, w/ HT enabled), 82571EB
B (e3-1230, w/ HT enabled), 82574L
C (e3-1230, w/ HT enabled), 82574L
The performance stats are gathered from 'systat -if 1'
When A runs 8 TCP senders to C and 8 TCP receivers from B, sending
performance are same ~975Mbps, however, the receiving performance before
this commit stumbles between 670Mbps and 850Mbps; w/ "fairsend" receiving
performance stays at 981Mbps.
When A runs 16 TCP senders to C and 16 TCP receivers from B, sending
performance are same ~975Mbps, however, the receiving performance before
this commit goes from 960Mbps to 980Mbps; w/ "fairsend" receiving
performance stays at 981Mbps stably.
When there are more senders and receivers running on A, there is no
noticable performance difference on either sending or receiving between
non-"fairsend" and "fairsend", because senders are no longer being able
to do continuous large burst.
"Fairsend" also improves Jain's fairness index between various amount of
senders (8 ~ 128) a little bit (sending only tests).
Sepherosa Ziehau [Wed, 16 Jan 2013 11:02:36 +0000 (19:02 +0800)]
tcp/tso: Add per-device TSO aggregation size limit
- Prevent possible TSO large burst, when it is inappropriate (plenty of
>24 segements bursts were observered, even when 32 parallel sending TCP
streams are running on the same GigE NIC).
TSO large burst has following drawbacks on a single TX queue, even on
the devices that are multiple TX queues capable:
o Delay other senders' packet transmission quite a lot.
o Has negative effect on TCP receivers, which sends ACKs.
o Cause buffer bloat in software sending queues, whose upper limit is
based on "packet count".
o Packet scheduler's decision could be less effective.
On the other hand, TSO large burst could improve CPU usage.
- Improve fairness between multiple TX queues on the devices that are
multiple TX queues capable but only fetch data on TSO large packet
boundary instead of TCP segment boundary.
Drivers could supply their own TSO aggregation size limit. If driver
does not set it, the default value is 6000 (4 segments if MTU is 1500).
The default value increases CPU usage a little bit: on i7-2600 w/ HT
enabled, single TCP sending stream, CPU usage increases from 14%~17%
to 17%~20%.
User could configure TSO aggregation size limit by using ifconfig(8):
ifconfig ifaceX tsolen _n_
Sascha Wildner [Mon, 21 Jan 2013 18:28:54 +0000 (19:28 +0100)]
kernel/nexus: Remove some unneeded includes.
Sascha Wildner [Sun, 20 Jan 2013 10:52:59 +0000 (11:52 +0100)]
kernel/802_11: Put a couple more ethstr[] under IEEE80211_DEBUG.
Sascha Wildner [Sat, 19 Jan 2013 23:02:26 +0000 (00:02 +0100)]
libdmsg: Mark some return values unused.
Sascha Wildner [Sat, 19 Jan 2013 23:01:05 +0000 (00:01 +0100)]
libfetch: Remove an unused variable.
Sascha Wildner [Sat, 19 Jan 2013 23:05:28 +0000 (00:05 +0100)]
bmake: Mark a return value unused.
Sascha Wildner [Sat, 19 Jan 2013 22:58:40 +0000 (23:58 +0100)]
libdmsg: last{dist,rnss} are used with REQUIRE_SYMMETRICAL only.
While here, also remove two unused variables.
Sascha Wildner [Sat, 19 Jan 2013 22:41:46 +0000 (23:41 +0100)]
m4/ngctl/ppp: Silence gcc47 -Wcast-qual warnings.
Sascha Wildner [Sat, 19 Jan 2013 12:42:36 +0000 (13:42 +0100)]
hotplugd(8): Remove some compat defines and add comments about it.
Sascha Wildner [Sat, 19 Jan 2013 21:21:12 +0000 (22:21 +0100)]
Fix buildkernel for lex/yacc upgrades, too.
John Marino [Sat, 19 Jan 2013 16:32:39 +0000 (17:32 +0100)]
m4: define yylex based on __DragonFly_version
The old lex wants it and emits errors if it's not there.
The new lex doesn't want it, and emits warnings if it is there.
On gcc44, the build breaks on an error.
To make both happy, switch it on based on recent __DragonFly_version bump.
Bump __DragonFly_version to be 100% everyone can upgrade
John Marino [Sat, 19 Jan 2013 17:59:03 +0000 (18:59 +0100)]
atc game: lex cleanup