François Tigeot [Mon, 6 Aug 2012 08:37:47 +0000 (10:37 +0200)]
kernel: Import sglist subsystem from FreeBSD
Fixes-from: swildner
Blessed-by: vsrinivas
Matthew Dillon [Sat, 8 Dec 2012 05:21:55 +0000 (21:21 -0800)]
kernel - Adjust NFS server for new allocvnode() code
* Adjust the NFS server to check for LWP_MP_VNLRU garbage collection
requests and act on them.
This prevents excessive allocation of vnodes by the nfsd's.
Matthew Dillon [Sat, 8 Dec 2012 02:52:30 +0000 (18:52 -0800)]
kernel - Change allocvnode() to not recursively block freeing vnodes
allocvnode() has caused many deadlock issues over the years, including
recent issues with softupdates, because it is often called from deep
within VFS modules and attempts to clean and free unrelated vnodes when
the vnode limit is reached to make room for the new one.
* numvnodes is not protected by any locks and needs atomic ops.
* Change allocvnode() to always allocate and not attempt to free
other vnodes.
* allocvnode() now flags the LWP to handle reducing the number of vnodes
in the system as of when it returns to userland instead. Consolidate
several flags into a single conditional function call, lwpuserret().
When triggered, this code will do a limited scan of the free list to
try to find vnodes to free.
* The vnlru_proc_wait() code existed to handle a separate algorithm
related to vnodes with cached buffers and VM pages but represented
a major bottleneck in the system.
Remove vnlru_proc_wait() and allow vnodes with buffers and/or non-empty
VM objects to be placed on the free list.
This also requires not vhold()ing the vnode for related buffer cache
buffer since the vnode will not go away until related buffers have been
cleaned out. We shouldn't need those holds.
Testing-by: vsrinivas
Matthew Dillon [Fri, 7 Dec 2012 22:44:26 +0000 (14:44 -0800)]
kernel - Fix filesystem lookup error due to parent directory recyclement race
* When looking up a path the parent ncp's vnode is needed to pass into
the VFS code as the directory vnode (dvp) for the element being looked up.
* Fix a timing race whereby a system under extreme vnode pressure (such as
when kern.maxvnodes is set to a very low value) can squeek in recyclement
of this directory vnode when there are no children under it in the
namecache.
We fix the problem by holding the directory vnode during the nlookup() and
cache_resolve().
Matthew Dillon [Fri, 7 Dec 2012 22:20:31 +0000 (14:20 -0800)]
kernel - Fix issues where tmpfs loses file data
* For TMPFS, UIO_NOCOPY writes must use bawrite() or bwrite() and must NEVER
used buwrite() because these operations are being called via the VM page
cleaning code via the pageout daemon or the vnode termination code
(when maxvnodes is reached), and the underlying pages are about to be
destroyed.
* vm_object_terminate() must call vinvalbuf() both before (for normal
filesystems) and also after (for tmpfs style filesystems). Otherwise
buffers potentially not disposed of during the page cleaning might
get left hanging. This is a safety feature.
* Remove post-flush test code from vm_object_page_collect_flush() entirely.
The IO's are in progress at this point so it makes no sense to set
PG_CLEANCHK here.
* vm_page_need_commit() must make the object writeable and dirty, I think.
* Fix multiple places where m->dirty is tested and PG_NEED_COMMIT is not.
Reported-by: vsrinivas, others
Sascha Wildner [Fri, 7 Dec 2012 20:31:05 +0000 (21:31 +0100)]
etc/Makefile: Some cleanup.
* Stop creating .profile and .cshrc symlinks in the / directory.
* Silence a bmake warning (the check only applies to i386).
Reported-by: ftigeot, sephe
While here, simplify the way /COPYRIGHT is installed.
Sascha Wildner [Fri, 7 Dec 2012 18:18:59 +0000 (19:18 +0100)]
rc.conf.5: Document rc.conf.d/
Taken-from: FreeBSD
Pointed-out-by: fgudin
Sascha Wildner [Fri, 7 Dec 2012 11:54:14 +0000 (12:54 +0100)]
iso639: Sync with Library of Congress list.
Sascha Wildner [Thu, 6 Dec 2012 11:06:06 +0000 (12:06 +0100)]
Remove MFILES from kernel module Makefiles. It should not be needed.
Sascha Wildner [Thu, 6 Dec 2012 10:54:31 +0000 (11:54 +0100)]
kern.fwd.mk: Move comments to the start of the line.
Else they would get output to the screen.
Reported-by: tuxillo
Sascha Wildner [Thu, 6 Dec 2012 09:36:21 +0000 (10:36 +0100)]
agp(4): Fix some minor issues.
* Move AGP_DEBUG to the global 'options' file. No need to split it by
platform.
* Add missing file to the Makefile.
* Fix a cast.
Sascha Wildner [Wed, 5 Dec 2012 22:28:33 +0000 (23:28 +0100)]
twe(4): Sync with FreeBSD.
Main change is making it MPSAFE. There's also some cleanup and misc
fixes.
I tested it with an Escalade 8506-8.
Sascha Wildner [Wed, 5 Dec 2012 20:21:22 +0000 (21:21 +0100)]
Remove some unneeded semicolons across the tree.
Matthew Dillon [Wed, 5 Dec 2012 19:40:01 +0000 (11:40 -0800)]
kernel - Fix memory starvation issue w/tmpfs
* TMPFS relies on the pagedaemon to retire dirty pages to swap. The normal
buffer cache flushing won't do the job (nor do we want it to). To avoid
starving the system we change bio_page_alloc() to not dig into the
system reserve when allocating pages for TMPFS.
Reported-by: tuxillo (Antonio Huete)
François Tigeot [Wed, 5 Dec 2012 07:19:40 +0000 (08:19 +0100)]
agp: Fix a kernel panic on boot issue
* A pointer wasn't correctly initialized, leading to a
Fatal trap 12: page fault while in kernel mode panic
* This commit fixes bug report #2467
Tested-by: Eric Christeson, David Shao
Matthew Dillon [Wed, 5 Dec 2012 07:32:30 +0000 (23:32 -0800)]
cluster - Stabilization
* Fix disconnect/reconnect sequence for autoconn (/etc/hammer2/autoconn).
The pipe used to signal termination of the iocom_core() was not supposed
to be closed by iocom_done().
* The shutdown code now simply sets DMSG_IOCOMF_EOF instead of trying to
shutdown() the socket.
* Fix double mutex lock in dmsg_msg_alloc().
Matthew Dillon [Wed, 5 Dec 2012 03:24:54 +0000 (19:24 -0800)]
cluster - xdisk automatic BIO restart
* The xdisk driver now detects failed transactions due to failed circuits
and will restart the BIOs on another circuit or hold onto them until
connectivity is restored and a new circuit is reforged.
Automatic restarts only occur if the xa* disk is open()'d (i.e. mounted
or being accessed by userland). Kernel disk subsystem probes on attach
will be failed normally and not stall on lost connectivity.
* subr_diskiocom now reports the correct DMSG error code for failed BIOs
instead of reporting a kernel error code.
Matthew Dillon [Wed, 5 Dec 2012 03:23:54 +0000 (19:23 -0800)]
cluster - misc cleanup
* Rename the routing function to something that I remember.
Matthew Dillon [Tue, 4 Dec 2012 22:30:42 +0000 (14:30 -0800)]
cluster - misc work
* Use a different API function for state-based reply in the volconf code.
Matthew Dillon [Tue, 4 Dec 2012 22:23:22 +0000 (14:23 -0800)]
cluster - Improve hammer2 connect directive, add /etc/hammer2/autoconn
* Improve the hammer2 connect directive, fixing a socket descriptor reuse
race.
* Monitor the file /etc/hammer2/autoconn which contains a list of hosts
the hammer2 service demon whould automatically maintain connections to.
* Adjust the dmsg_master_service() API to also allow an alternative
signalling descriptor and callback to be specified. This simplifies
forced connection terminations.
* Fix descriptor leak in dmsg_master_service() on closure.
Sascha Wildner [Tue, 4 Dec 2012 19:37:30 +0000 (20:37 +0100)]
Fix LINT building.
Sascha Wildner [Tue, 4 Dec 2012 19:20:03 +0000 (20:20 +0100)]
twe(4): Remove non-existing flag from the Makefile.
Sascha Wildner [Tue, 4 Dec 2012 18:43:47 +0000 (19:43 +0100)]
kernel: Remove NULL checks after kmalloc(..., M_INTWAIT).
M_INTWAIT will not return NULL unless M_NULLOK is passed too.
rnoland [Mon, 21 Dec 2009 03:28:05 +0000 (03:28 +0000)]
agp: Fix a handful of issues with via agp support
* Read the pci capability register to identify AGP 3 support
* Add missing smaller aperture sizes for AGP3 chips.
* Fix the aperture size calculation on AGP2 chips.
All sizes between 32M and 256M reported as 256M.
* Add \n to error string.
This all seems to get the CLE266 EPIA-M board agp working properly
Obtained-from: FreeBSD
François Tigeot [Tue, 4 Dec 2012 07:16:33 +0000 (08:16 +0100)]
agp: Sync with FreeBSD
* Add support for AMD64 Family 10h processors. FreeBSD PR: kern/128331
* Add a few VIA bridges for Intel Core/Core 2 and VIA Nano processors
* Fix AGP debugging code
* Rename agp_x86_64.c to agp_amd64.c again, keeping the same file name
on both DragonFly and FreeBSD
* Fix prototypes to be consistent
* offset parameter has vm_offset_t type
* vm_offset_t is unsigned and therefore can not be negative
* Use si_drv1 instead of dev2unit() inside agp(4).
* i810: Aperture size and stolen memory are now printed on one line
* Add pci ids for Intel Ironlake chipsets
Matthew Dillon [Tue, 4 Dec 2012 06:01:57 +0000 (22:01 -0800)]
cluster - Kernel cluster code work
* Major stability work.
* Misc bug fixes and cleanups.
* xdisk/diskiocom links are now relatively stable over a real network.
Still need to deal with reconnects properly.
Matthew Dillon [Tue, 4 Dec 2012 06:00:37 +0000 (22:00 -0800)]
cluster - Add 'circ <msgid>' command to cluster debug shell
* Add a debug shell command to help test virtual circuits.
Matthew Dillon [Tue, 4 Dec 2012 05:58:16 +0000 (21:58 -0800)]
cluster - more libdmsg work
* Fix numerous bugs, including a nasty edge case in the encryption code.
* Do a better job locking things (state structures still need help).
Matthew Dillon [Mon, 3 Dec 2012 18:20:29 +0000 (10:20 -0800)]
kernel - Reorder dsched teardown to fix race
* Remove the struct disk from its list prior to tearing down the device
instead of after in order to fix a race related to disk enumerations.
* Wait for active references on the disk structure to go away before
tearing down the device.
Matthew Dillon [Mon, 3 Dec 2012 05:40:13 +0000 (21:40 -0800)]
cluster - Major kernel component work (diskiocom, xdisk, kdmsg)
* Major implementation and stabilization work. Fix lots of bugs,
improve the AUTO flags and APIs.
* xdisk and diskiocom are now operational for the first time.
xdisk is a consumer of remote block devices. You pass it one end of
a pipe and use an ioctl to create /dev/xa* devices. The kernel's
nominal disk management subsystem handles /dev/serno/* and will also
probe the /dev/xa* devices to create the slices.
diskiocom is a block device service. An ioctl is used to connect a
raw disk device to the network via a pipe.
* The hammer2 service demon ties the two together over the network.
* Initial testing with a local hammer2 service daemon looping da0 to xa0
succeeded, ~46MB/sec unoptimized using dd.
Matthew Dillon [Mon, 3 Dec 2012 05:37:55 +0000 (21:37 -0800)]
cluster - circuit tracking, bug fixes
* Misc virtual circuit tracking work and bug fixes
Sepherosa Ziehau [Mon, 3 Dec 2012 01:53:20 +0000 (09:53 +0800)]
jme: Improve tiny packets transmission performance on low frequency CPU
Update TXCSR register a little bit often; mainly to improve timeliness of
packets transmission:
The TXCSR register is updated after certain amount of TX descriptors are
added to the hardware TX ring. The default value of the amount of TX
descriptors are 16. This value could be further tuned by per-device sysctl
node hw.jmeX.tx_wreg.
The default value improves tiny packets transmission performance w/ JMC250
on AMD970@2200Mhz (831Kpps -> 911Kpps), on AMD970@800Mhz (484Kpps -> 834Kpps)
and it does not increase CPU usage on AMD970@3500Mhz (CPU usage stays @26%,
JMC250 could only do 911Kpps).
Sepherosa Ziehau [Sun, 2 Dec 2012 12:30:40 +0000 (20:30 +0800)]
bge: Improve tiny packets transmission performance on low frequency CPU
Update TX HOST_PROD register a little bit often; mainly to improve
timeliness of packets transmission:
The TX HOST_PROD register is updated after certain amount of TX
descriptors are added to the hardware TX ring. The default value of the
amount of TX descriptors are 16. This value could be further tuned by
per-device sysctl node hw.bgeX.tx_wreg.
The default value improves tiny packets transmission performance w/ 5721
on AMD970@800Mhz (770Kpps -> 800Kpps) and it does not increase CPU usage
on AMD970@3500Mhz (CPU usage stays @20%, 5721 could only do 810Kpps).
NOTE: Tuning hw.bgeX.tx_coal_bds to 32 could make packets transmission
performance w/ 5721 on AMD970@800Mhz to be 810Kpps, however, this shows
no performance improvement on commonly used CPU frequency like 2200Mhz
and 3500Mhz. And this tuning could burden systems not using polling(4).
Sepherosa Ziehau [Sun, 2 Dec 2012 10:42:37 +0000 (18:42 +0800)]
bge: Commit coalesce parameters change in polling code
Sascha Wildner [Sun, 2 Dec 2012 23:36:26 +0000 (00:36 +0100)]
mount_ntfs.8: Fix synopsis and add another example (from FreeBSD).
Sascha Wildner [Sun, 2 Dec 2012 17:55:41 +0000 (18:55 +0100)]
kernel/ntfs: Remove two unused variables.
Sascha Wildner [Sun, 2 Dec 2012 17:47:48 +0000 (18:47 +0100)]
kernel/ntfs: Add ntfs_statvfs.
This fixes for example df output for large filesystems.
Sascha Wildner [Sun, 2 Dec 2012 10:22:38 +0000 (11:22 +0100)]
ifconfig.8: Fix month
Sascha Wildner [Sat, 1 Dec 2012 23:16:47 +0000 (00:16 +0100)]
make upgrade: Remove /usr/include/bus/isa/isa_compat.h
Sascha Wildner [Sat, 1 Dec 2012 23:09:09 +0000 (00:09 +0100)]
kernel/i386: With stl(4) and cy(4) made PCI only, remove COMPAT_OLDISA.
Sascha Wildner [Sat, 1 Dec 2012 22:54:54 +0000 (23:54 +0100)]
UPDATING: Note that aic(4) was deISAized (forgot to mention at the time).
Sascha Wildner [Sat, 1 Dec 2012 22:46:53 +0000 (23:46 +0100)]
cy(4): Remove ISA support.
Sascha Wildner [Sat, 1 Dec 2012 22:24:50 +0000 (23:24 +0100)]
kernel: Remove an #include I forgot previously.
Matthew Dillon [Sat, 1 Dec 2012 20:53:19 +0000 (12:53 -0800)]
kernel - Turn off machdep.pmap_mmu_optimize by default
* Turn off machdep.pmap_mmu_optimize by default. There are some bugs that
need to be resolved which are messing up both apache and rtorrent.
* (this feature is already turned off by default on RELEASE).
Sascha Wildner [Sat, 1 Dec 2012 17:59:16 +0000 (18:59 +0100)]
Move stlstats(8) to usr.sbin/
Sascha Wildner [Sat, 1 Dec 2012 17:48:21 +0000 (18:48 +0100)]
Remove stli(4). Also remove ISA support from stl(4).
stli(4) was ISA only. stl(4) was for ISA/PCI controllers.
The stlload(8) and stlstty(8) utilities were for ISA controllers only,
so remove them too (along with ISA only firmware).
While here, clean up stl(4) a bit.
Sascha Wildner [Sat, 1 Dec 2012 12:44:28 +0000 (13:44 +0100)]
UPDATING: Mention that bt(4) is PCI only now.
Sascha Wildner [Sat, 1 Dec 2012 12:42:55 +0000 (13:42 +0100)]
UPDATING: Use release version numbers.
Matthew Dillon [Sat, 1 Dec 2012 10:24:49 +0000 (02:24 -0800)]
cluster - remote block device work
* xdisk(client) <-> diskiocom(server) now successfully does a full
message transaction over a VC for xa_open(). Still lots to do.
* Fix I/O request deferrals since the open can occur before the VC is
fully established. This fixes a deadlock.
* Fix state->msg tracking in kern_dmsg.c. Fixes a double-free.
Matthew Dillon [Fri, 30 Nov 2012 23:43:28 +0000 (15:43 -0800)]
hammer2 - cluster / hammer2 service daemon work
* Reformulate the service demon to use the updated libdmsg API
* Add code to track remote block device SPANs and to interface to the
local /dev/xdisk to create local block devices for the remotes.
Matthew Dillon [Fri, 30 Nov 2012 23:39:12 +0000 (15:39 -0800)]
hammer2 - cluster / libdmsg circuit work
* Major work on the virtual circuit code. Note there are still some thread
races.
* Major work on the spanning tree code to allow for future symmetric
pathing support.
* fs_label is now part of the RB tree compare, along with pfs_fsid.
(e.g. the serial number for BLK protocol services).
* Rip out the 'router' structure, replace with the 'circuit' structure.
Embed circuit0 in the iocom.
Matthew Dillon [Fri, 30 Nov 2012 23:37:17 +0000 (15:37 -0800)]
hammer2 - reformualte cluster messaging interface
* Reformulate the interface to use the revamped kern_dmsg.c API
Matthew Dillon [Fri, 30 Nov 2012 23:35:44 +0000 (15:35 -0800)]
kernel - Preliminary xdisk remote block driver for cluster
* Basic infrastructure, ties into kern_dmsg.c cluster messaging system.
(still a skeleton).
* Allows a userland program (aka hammer2 service) to add networked block
devices to the local machine.
Matthew Dillon [Fri, 30 Nov 2012 23:33:49 +0000 (15:33 -0800)]
hammer2 - kernel cluster messaging support API work
* Rework the API significantly
* Add circuit tracking and sniffing features
* Add flags to automate the LNK_CONN, LNK_SPAN, and LNK_CIRC state machines.
* Misc improvemenets.
Matthew Dillon [Fri, 30 Nov 2012 23:30:35 +0000 (15:30 -0800)]
kernel - Move dsched_disk_destroy_callback() call
* Move the dsched_disk_destroy_callback() call from the caller to the
message handler to avoid racing a disk probe that might be running at
the time (if a disk device is added and destroyed quickly).
Matthew Dillon [Fri, 30 Nov 2012 19:17:50 +0000 (11:17 -0800)]
kernel - Fix races in disk iteration and diskctx handling
* Add disk->d_refs to prevent a disk structure from being destroyed out
from under an iteration.
* Redo the disk_enumeration() API to use markers and d_refs.
* Make adjustments to the dsched API. In particular, do not return
unreferenced tdio pointers in situations where they aren't used by
the caller.
* Properly implement the ref count on the tdio's, one for each of the two
lists the tdio belongs to, and ensure that dsched_thread_io_alloc()
keeps an extra ref on the tdio after releasing the diskctx lock to prevent
it from being ripped out while the code is pondering whether to place
the tdio on the tdctx list.
* When deleting the tdio's for a tdctx try to destroy the diskctx. That is,
simply dereferencing it from the thread is not sufficient.
* When deleting the tdio's for a diskctx try to destroy the tdctx. That is,
simply dereferencing it from the diskctx is not sufficient.
* Handle destroy/ref races.
Sascha Wildner [Fri, 30 Nov 2012 17:57:06 +0000 (18:57 +0100)]
kernel: Fix typo (inavlid -> invalid).
Sascha Wildner [Thu, 29 Nov 2012 20:57:05 +0000 (21:57 +0100)]
int64_t is long on x86_64, and not always equivalent to long long.
Similarly, uint64_t is unsigned long.
For their min/max value definitions, change LL/ULL suffixes to L/UL.
The bug report has some C++ sample code that show issues resulting
from treating them as long long.
Reported-by: David Shao <davshao@gmail.com>
Dragonfly-bug: <http://bugs.dragonflybsd.org/issues/2461>
Sascha Wildner [Thu, 29 Nov 2012 17:20:48 +0000 (18:20 +0100)]
bt(4): Sync with FreeBSD.
Main change is making it MPSAFE.
Taken-from: FreeBSD
Sepherosa Ziehau [Thu, 29 Nov 2012 09:16:06 +0000 (17:16 +0800)]
bpf: Use bpf global token instead mplock to protect bpf stuffs
Submitted-by: tuxillo@ w/ modification
Sepherosa Ziehau [Thu, 29 Nov 2012 05:55:02 +0000 (13:55 +0800)]
sosendudp: Try to optimize out the additional mbuf alloc on output path
This optimization leaves enough space at the beginning of the mbuf, so
later on M_PREPEND() probably will not allocate addition mbuf.
This probably will not benefit any data that will be fragmented, e.g. by
IPv4, so this optimization is only performed when the size of data and
max size of protocol+link headers fit into one mbuf cluster.
This optimization could be turned off by net.inet.udp.sosend_prepend,
which is on by default.
Sascha Wildner [Thu, 29 Nov 2012 00:52:11 +0000 (01:52 +0100)]
bt(4): Remove support for ISA adapters.
The driver also supports PCI cards and we do want to keep this support,
because it is offered by current VirtualBox, for example.
Sascha Wildner [Wed, 28 Nov 2012 23:26:41 +0000 (00:26 +0100)]
<sys/errno.h>: Try to fix errno's declaration a bit better for C++.
The test code from the bug ticket seems to work with it at least.
Reported-by: David Shao <davshao@gmail.com>
Dragonfly-bug: <http://bugs.dragonflybsd.org/issues/2463>
In-discussion-with: vsrinivas
Matthew Dillon [Wed, 28 Nov 2012 18:21:38 +0000 (10:21 -0800)]
kernel - Fix proc_reparent() race/assertion panic
* Fix proc_reparent() race/assertion panic. p_pptr changes can race,
and the procedure had an assertion for the case. Recode the procedure
to retry on a mismatch instead of assert.
* Also move the old-parent-wakeup code into the procedure so it is
properly executed in all cases.
Reported-by: Peter Avalos
Sepherosa Ziehau [Wed, 28 Nov 2012 09:21:53 +0000 (17:21 +0800)]
max_linkhdr: Increase from 16 to 20; mainly to cooperate SW VLAN tagging
Matthew Dillon [Tue, 27 Nov 2012 21:50:54 +0000 (13:50 -0800)]
installer: Clarity language when asking the user for time-date info.
* Clarity language when asking the user for time-date info so the
user is not confused between UTC vs his or her selected timezone.
The program wants the user to enter the time and date in his or her
selected timezone.
Antonio Huete Jimenez [Mon, 26 Nov 2012 23:14:14 +0000 (00:14 +0100)]
vkernel - Add machdep.wall_cmos_clock sysctl.
Programs that rely on this sysctl won't exit due its absence
and they will consider CMOS doesn't keep the local time.
Note the sysctl is read-only so programs like adjkerntz(8)
won't be able to change it.
Sascha Wildner [Mon, 26 Nov 2012 18:39:57 +0000 (19:39 +0100)]
installer: Fix handling of CMOS set to UTC vs. CMOS set to wall time.
It was reversed in the installer (compared to tzsetup(8)).
/etc/wall_cmos_clock needs to be created when the CMOS is set to the
time of the clock on the wall. While here, also add removing the file
in case the user selects 'CMOS set to UTC'. This is if he chose the
other setting previously and then tried again.
Reported-by: many
Dragonfly-bug: <http://bugs.dragonflybsd.org/issues/39>
Dragonfly-bug: <http://bugs.dragonflybsd.org/issues/2060>
Sepherosa Ziehau [Mon, 26 Nov 2012 13:41:20 +0000 (21:41 +0800)]
polling: Increase default status polling fraction to 80
Before we bumped the polling frequency from 1000 to 2000, the status
polling fraction was 20; keep the original ratio.
Sepherosa Ziehau [Mon, 26 Nov 2012 13:38:48 +0000 (21:38 +0800)]
bce: Commit coalesce parameters changes in polling code
Sepherosa Ziehau [Mon, 26 Nov 2012 13:32:42 +0000 (21:32 +0800)]
bce: Improve tiny packets transmission performance on low frequency CPU
Update TX HOST_IDX and HOST_BSEQ registers a little bit often; mainly to
improve timeliness of packets transmission:
The TX HOST_IDX and HOST_BSEQ registers are updated after certain amount
of TX descriptors are added to the hardware TX ring. The default value
of the amount of TX descriptors are 8. This value could be further
tuned by per-device sysctl node hw.bceX.tx_wreg.
The default value greatly improves tiny packets transmission performance
w/ 5709C on AMD970@800Mhz (513Kpps -> 1Mpps) and it does not increase CPU
usage on AMD970@3500Mhz (CPU usage stays @24%, 5709C could only do 1Mpps).
Sepherosa Ziehau [Sun, 25 Nov 2012 12:57:57 +0000 (20:57 +0800)]
bce: Don't mess w/ MQ_COMMAND on TX path; it seems useless
Tested-with: 5706C, 5708C and 5709C
Sepherosa Ziehau [Sun, 25 Nov 2012 11:00:50 +0000 (19:00 +0800)]
bce: Reformat comment in bce_npoll_compat a little bit
Sepherosa Ziehau [Sun, 25 Nov 2012 06:35:31 +0000 (14:35 +0800)]
igb: Use SYSCTL_ADD_INT for hw.igbX.tx_wreg_nsegs
It actually does not have any constraints.
Sepherosa Ziehau [Sun, 25 Nov 2012 06:34:21 +0000 (14:34 +0800)]
emx: Use SYSCTL_ADD_INT for hw.emxX.wreg_tx_nsegs
It actually does not have any constraints.
Sepherosa Ziehau [Sun, 25 Nov 2012 06:08:31 +0000 (14:08 +0800)]
bnx: Improve tiny packets transmission performance on low frequency CPU
- Reduce TX coalesce BDs from 128 to 64. This improves tiny packets
transmission performance on AMD970@2200Mhz a little bit (1.40Mpps
-> 1.48Mpps)
- Update TX PROD register a little bit often; mainly to improve timeliness
of packets transmission:
The TX PROD register is updated after certain amount of TX descriptors
are added to the hardware TX ring. The default value of the amount of
TX descriptors are 8. This value could be further tuned by per-device
sysctl node hw.bnxX.tx_wreg. The default value greatly improves tiny
packets performance on AMD970@800Mhz (780Kpps -> 1.11Mpps) and it does
not increase CPU usage on AMD970@3500Mhz (CPU usage stays @31%).
Sepherosa Ziehau [Sat, 24 Nov 2012 13:24:14 +0000 (21:24 +0800)]
bnx: Commit coalesce parameters changes in polling code
Sascha Wildner [Sat, 24 Nov 2012 23:13:20 +0000 (00:13 +0100)]
kernel: Remove some code that does nothing.
Sascha Wildner [Sat, 24 Nov 2012 22:14:45 +0000 (23:14 +0100)]
Fix some typos (unknow -> unknown).
Sascha Wildner [Sat, 24 Nov 2012 20:35:21 +0000 (21:35 +0100)]
usb4bsd: Initial round of build fixes for serial drivers.
Not hooked into the build because some things are still missing,
most importantly ucom(4) porting.
Sascha Wildner [Sat, 24 Nov 2012 20:11:30 +0000 (21:11 +0100)]
ndis(4): Bring in some fixes from FreeBSD.
Sascha Wildner [Sat, 24 Nov 2012 20:22:55 +0000 (21:22 +0100)]
ndis(4): Make NDIS compile with usb4bsd too.
However, testing results are pretty much as modest as with the old USB
stack. Maybe someone else has more luck.
New files taken from FreeBSD.
Sascha Wildner [Fri, 23 Nov 2012 18:46:19 +0000 (19:46 +0100)]
usb4bsd: Fix buildkernel with device usb4bsd.
Sascha Wildner [Fri, 23 Nov 2012 18:11:29 +0000 (19:11 +0100)]
wpa_supplicant.8: Document all options.
Reported-by: Max Herrgard <herrgard@gmail.com>
Taken-from: FreeBSD
Sascha Wildner [Fri, 23 Nov 2012 18:02:53 +0000 (19:02 +0100)]
wpa_supplicant.conf.5: Fix section order.
François Tigeot [Fri, 23 Nov 2012 06:57:26 +0000 (07:57 +0100)]
VFS quota: hpfs is now read-only, remove support
François Tigeot [Mon, 19 Nov 2012 09:30:34 +0000 (10:30 +0100)]
Documentation: unrhdr to idr conversion
Sascha Wildner [Thu, 22 Nov 2012 19:44:23 +0000 (20:44 +0100)]
vkernel: Make "options IPX" compilable into the vkernel.
Usage of "errno" in userspace as a variable name results in sad code.
Rename them to "error" instead.
Reported-by: tuxillo
Sascha Wildner [Thu, 22 Nov 2012 17:27:14 +0000 (18:27 +0100)]
kernel: Remove some NULL checks after kmalloc(..., M_WAITOK).
Sascha Wildner [Thu, 22 Nov 2012 17:24:47 +0000 (18:24 +0100)]
kernel: Use M_ZERO instead of bzero()ing.
Sascha Wildner [Thu, 22 Nov 2012 16:41:11 +0000 (17:41 +0100)]
ah[cd](4): Clean up some #ifdefs so it's clearer what we are doing.
Sepherosa Ziehau [Thu, 22 Nov 2012 12:53:36 +0000 (20:53 +0800)]
emx: Don't update TDT upon very packets transmitted
The TDT is updated only after certain amount of TX descriptors are
added to the hardware TX ring. The default value of the amount of
TX descriptors are 8. This value could be further tuned by per-device
sysctl node hw.emxX.tx_wreg_nsegs.
CPU usage when transmitting 18bytes tiny UDP datagrams @1.48Mpps with
82571 on AMD970 (3500Mhz) are reduced from 50% to 30% with the default
value.
Inspired-by: FreeBSD netmap's paper
Sepherosa Ziehau [Thu, 22 Nov 2012 12:02:31 +0000 (20:02 +0800)]
igb: Don't update TDT upon very packets transmitted
The TDT is updated only after certain amount of TX descriptors are
added to the hardware TX ring. The default value of the amount of
TX descriptors are 8. This value could be further tuned by per-device
sysctl node hw.igbX.tx_wreg_nsegs.
CPU usage when transmitting 18bytes tiny UDP datagrams @1.48Mpps with
82575 on AMD970 (3500Mhz) are reduced from 55% to 38% with the default
value.
Inspired-by: FreeBSD netmap's paper
Sepherosa Ziehau [Sat, 17 Nov 2012 10:07:21 +0000 (18:07 +0800)]
pktgen: Rework to improve performance using low CPU frequency
The performance improvement is measured on AMD970 operating at 800Mhz
w/ Intel 82575 NIC using 18bytes UDP datagrams.
- Don't refill and allocate new packets for each transmission, instead
a set of pregenerated packets are used.
- Use NIC driver's "txeof" to tick out more packets instead of bindly
trying to inject more packets into NIC's TX ring.
These above two modifications give me ~200Kpps (710Kpps -> 910Kpps)
transmission rate improvement.
- Don't use hardware TX checksum offloading feature. Since the set of
packets to be used are pregenerated, this will not hurt performance,
instead, this could improve performance on certain hardwares, e.g.
Intel's NIC chipsets which require additional TX descriptor for setting
up hardware TX checksum offload context.
The above modification give me additional ~40Kpps transmission rate
improvement.
Antonio Huete Jimenez [Thu, 22 Nov 2012 10:47:58 +0000 (11:47 +0100)]
hpfs - Fix a couple panics and a little cleanup.
* Fix compilation with HPFS_DEBUG.
* Fix a panic due CNP_PDIRUNLOCK flag not being cleared.
* Fix a panic where returned vnode after a lookup is not
NULL in the ENOENT case.
* Disable write support completely. It was pretty minimal
and operations like create or rename were not supported.
It has been tested with a filesystem created by OS/2 Warp 2.1.
Copying data out of it worked fine, but there is still an
outstanding issue with overlapping buffers.
Matthew Dillon [Wed, 21 Nov 2012 17:59:55 +0000 (09:59 -0800)]
kernel - Fix NFS panic when competing clients collide on hardlink
* Fix recursive execlusive lock on vnode.
* For example, if several boxes are nfs booting and have the same writable
/var/log, simultanious attempts to rotate logs can cause a panic due to
higher layers of the OS's hardlink code not being able to detect
duplicate vnodes which are created by some other client racing the same
operation.
* Adds CNP_NOTVP and cn_notvp flag which vop_compat_nlink() uses to notify
NFS's VOP_LOOKUP function to check for a vnode lookup collision.
-Matt
Sascha Wildner [Wed, 21 Nov 2012 17:13:43 +0000 (18:13 +0100)]
Remove some duplicated semicolons (mostly in the kernel).
Sascha Wildner [Wed, 21 Nov 2012 03:26:47 +0000 (04:26 +0100)]
hptiop(4): Add support for RocketRAID 4520 and 4522.
This adds support for HighPoint's recent 6Gb/s SAS/SATA RAID cards.
It's not tested in DragonFly, unfortunately, due to lack of hardware,
but I'm confident. :)
Taken-from: FreeBSD
Sepherosa Ziehau [Tue, 20 Nov 2012 12:26:52 +0000 (20:26 +0800)]
igb: Dispatch callout to the CPU that is checking status
This reduces sporadic contentions on the main serializer.
Sascha Wildner [Tue, 20 Nov 2012 05:23:49 +0000 (06:23 +0100)]
aac(4): Add a missing unlock.