dragonfly.git
11 years agokernel: Remove some unused variables.
Sascha Wildner [Mon, 17 Sep 2012 12:22:02 +0000 (14:22 +0200)]
kernel: Remove some unused variables.

11 years agokernel/ipx: Remove #ifdef lint checks (and add #endif comments).
Sascha Wildner [Mon, 17 Sep 2012 12:20:13 +0000 (14:20 +0200)]
kernel/ipx: Remove #ifdef lint checks (and add #endif comments).

11 years agoifpoll: Field renaming; if_qpoll -> if_npoll
Sepherosa Ziehau [Mon, 17 Sep 2012 09:30:09 +0000 (17:30 +0800)]
ifpoll: Field renaming; if_qpoll -> if_npoll

Consistent w/ IFF_NPOLLING flag

11 years agoifpoll: Don't limit number of CPUs that perform polling
Sepherosa Ziehau [Mon, 17 Sep 2012 09:13:32 +0000 (17:13 +0800)]
ifpoll: Don't limit number of CPUs that perform polling

11 years agomsgport.9: Catch up with recent changes to lwkt_initport_spin().
Nuno Antunes [Mon, 17 Sep 2012 05:16:52 +0000 (06:16 +0100)]
msgport.9: Catch up with recent changes to lwkt_initport_spin().

11 years agomsgport: Always save owner thread for threads' msgports
Sepherosa Ziehau [Mon, 17 Sep 2012 01:29:28 +0000 (09:29 +0800)]
msgport: Always save owner thread for threads' msgports

This unbreaks the assertion in dropmsg for spin msgport.  Also for shared
spin msgport don't allow dropmsg.

While im here, add comment for mp_dropmsg and adjust comment about mpu_td

Reported-by: pavalos@
11 years agofortune(6)/mutex.9: s/is is/is/
Sascha Wildner [Mon, 17 Sep 2012 00:55:36 +0000 (02:55 +0200)]
fortune(6)/mutex.9: s/is is/is/

11 years agoem.4: Add some words about emx(4) and create MLINKS.
Sascha Wildner [Mon, 17 Sep 2012 00:26:06 +0000 (02:26 +0200)]
em.4: Add some words about emx(4) and create MLINKS.

11 years agoUpdate the pciconf(8) database.
Sascha Wildner [Sun, 16 Sep 2012 15:25:58 +0000 (17:25 +0200)]
Update the pciconf(8) database.

September 14, 2012 snapshot from http://pciids.sourceforge.net/

11 years agokernel - Add vm.read_shortcut_enable
Matthew Dillon [Sun, 16 Sep 2012 03:52:45 +0000 (20:52 -0700)]
kernel - Add vm.read_shortcut_enable

* Add vm.read_shortcut_enable (disabled by default for now).  Set to 1 to
  enable this feature.

  This enables a helper function which HAMMER1 now uses to short-cut read()
  operations on files.  This feature only works on x86-64.

* When enabled this feature allows file read() requests to be satisfied
  directly from the VM page cache using lwbuf's, completely bypassing the
  buffer cache and also bypassing most of the VFS's VOP_READ code.

  The result is an approximate doubling of read() performance in cases
  where the buffer cache is too small to fit the hot data set, but the VM
  page cache is not.

  This feature is able to avoid the buffer cache and thus prevent buffer
  cycling within it which, due to the constant installation and
  deinstallation of pages in KVM cause a great deal of SMP page table
  page invalidations.

11 years agohammer - Adjust record and dirtybuf limits to handle large buffer caches
Matthew Dillon [Sun, 16 Sep 2012 01:43:26 +0000 (18:43 -0700)]
hammer - Adjust record and dirtybuf limits to handle large buffer caches

* Adjust record and dirtybuf limits such that they don't blow up a hammer
  volume if the system's buffer cache is very large.

11 years agortld: Don't call process_nodelete with NULL object pointer
John Marino [Sat, 15 Sep 2012 21:36:39 +0000 (23:36 +0200)]
rtld: Don't call process_nodelete with NULL object pointer

If object loading and relocation fail, the obj pointer will be NULL when
then process_nodelete function is reached.  A crash will occur if the
function is called with a null pointer, so ensure that it doesn't.

Taken-from: FreeBSD SVN 239470 (20 Aug 2012)

11 years agokernel - fix builds
Matthew Dillon [Sat, 15 Sep 2012 20:50:38 +0000 (13:50 -0700)]
kernel - fix builds

* Fix a few kprintf()'d %d -> %ld for nbufs.

Reported-by: vsrinivas
11 years agosystat - remove bounds on buffer cache nbuf count for 64-bit
Matthew Dillon [Sat, 15 Sep 2012 17:04:30 +0000 (10:04 -0700)]
systat - remove bounds on buffer cache nbuf count for 64-bit

* Adjust systat to the new kernel reality.

11 years agokernel - remove bounds on buffer cache nbuf count for 64-bit
Matthew Dillon [Sat, 15 Sep 2012 17:00:54 +0000 (10:00 -0700)]
kernel - remove bounds on buffer cache nbuf count for 64-bit

* Remove arbitrary 1GB buffer cache limitation

* Adjusted numerous 'int' fields to 'long'.  Even though nbuf is not
  likely to exceed 2 billion buffers, byte calculations using the
  variable began overflowing so just convert that and various other
  variables to long.

* Make sure we don't blow-out the temporary valloc() space in early boot
  due to nbufs being too large.

* Unbound 'kern.nbuf' specifications in /boot/loader.conf as well.

11 years agoipcs - Fix kvm accesses for new semid structures
Matthew Dillon [Sat, 15 Sep 2012 07:11:04 +0000 (00:11 -0700)]
ipcs - Fix kvm accesses for new semid structures

* semid_ds -> semid_pool, primarily.

11 years agokernel - Implement segment pmap optimizations for x86-64 (6)
Matthew Dillon [Sat, 15 Sep 2012 06:44:10 +0000 (23:44 -0700)]
kernel - Implement segment pmap optimizations for x86-64 (6)

* Improve process exit.  When the last process referencing a shared
  anonymous memory VM object exits the kernel destroys the object
  and its shared pmap.

  Removal of pages from the shared pmap was causing the system to IPI
  EVERY cpu for EACH pte.  Needless to say this caused a process to take
  ~2 minutes to remove a ~6GB shared segment.  Optimize this case by
  not bothering the do the IPI/invlpg invalidations since the pmap is not
  actually active.

* This also applies to any exiting process.  When cleaning out the pmap
  we no longer invlpg each pte, since nobody is referencing the pmap except
  the current thread in the kernel doing the exit.  It will simply issue
  a cpu_invltlb() when it is all done.

11 years agokernel - Enhance sysv semaphore performance (2)
Matthew Dillon [Sat, 15 Sep 2012 06:43:04 +0000 (23:43 -0700)]
kernel - Enhance sysv semaphore performance (2)

* Change SEMMAP default from 30 to 128.  Also note that most other
  semaphore-related defaults were increased significantly in prior
  commits.

11 years agokernel - Enhance sysv semaphore performance
Matthew Dillon [Sat, 15 Sep 2012 05:05:13 +0000 (22:05 -0700)]
kernel - Enhance sysv semaphore performance

* Make the locks used by the semaphore module significantly more
  fine-grained.

* Reorganize the semaphore related structures significantly to
  reduce locking conflicts.

* Reduce overhead and improve performance for handling SEM_UNDO semops.

11 years agokernel - Add kern.gettimeofday_quick sysctl
Matthew Dillon [Sat, 15 Sep 2012 05:03:39 +0000 (22:03 -0700)]
kernel - Add kern.gettimeofday_quick sysctl

* Add a sysctl that forces gettimeofday() to return a coarse timestamp
  instead of a fine-grained timestamp.

  This sysctl is mainly intended for performance debugging.

11 years agokernel - Use pool tokens to protect unix domain PCBs (2)
Matthew Dillon [Fri, 14 Sep 2012 17:13:39 +0000 (10:13 -0700)]
kernel - Use pool tokens to protect unix domain PCBs (2)

* Fix mismatched token unlock in last commit.

11 years agokernel - Use pool tokens to protect unix domain PCBs
Matthew Dillon [Fri, 14 Sep 2012 16:10:06 +0000 (09:10 -0700)]
kernel - Use pool tokens to protect unix domain PCBs

* The read, status, and write paths now use per-pcb pool tokens
  instead of the global unp_token.  The global token is still used
  for accept, connect, disconnect, etc.

* General semantics for making this SMP safe is to obtain a pointer
  to the unp from so->so_pcb, then obtain the related pool token,
  then re-check that so->so_pcb still equals unp.

* Pool token protects the peer pointer, unp->unp_conn.  Any change
  to unp->unp_conn requires both the pool token and the global token.

* This should improve concurrent reading and writing w/unix domain
  sockets.

11 years agokernel - Fix unix domain socket portfn routing
Matthew Dillon [Fri, 14 Sep 2012 08:47:19 +0000 (01:47 -0700)]
kernel - Fix unix domain socket portfn routing

* sonewconn_faddr() / sonewconn() was improperly overriding the sync_port
  setting for unix domain sockets, causing unnecessary netmsg traffic to
  the netisr threads.

* This should significantly improve unix domain socket performance.

With-help-from: sephe

11 years agopci/mptable: Let parent route the interrupt before using the intline
Sepherosa Ziehau [Fri, 14 Sep 2012 01:48:28 +0000 (09:48 +0800)]
pci/mptable: Let parent route the interrupt before using the intline

Tested-by: swildner@
11 years agols - Add -I to reverse -A
Matthew Dillon [Fri, 14 Sep 2012 00:51:13 +0000 (17:51 -0700)]
ls - Add -I to reverse -A

* ls implies -A when run as root. Add the -I option
  which disables this behavior.

* Note that -A and -I will override each other on the
  command line.

11 years agokernel - Implement segment pmap optimizations for x86-64 (5)
Matthew Dillon [Thu, 13 Sep 2012 20:47:03 +0000 (13:47 -0700)]
kernel - Implement segment pmap optimizations for x86-64 (5)

* Fix self-deadlock in pmap_remove_*() sequence.  The sequence calls
  pmap_remove_callback() -> pmap_release_pv(proc_pt_pv) but the caller
  may already be holding the parent, proc_pd_pv, locked.  If
  pmap_release_pv() needs to get the parent it deadlocks.

  Fixed by passing the parent into pmap_release_pv() for this case.

11 years agokernel - Implement segment pmap optimizations for x86-64 (4)
Matthew Dillon [Thu, 13 Sep 2012 18:39:11 +0000 (11:39 -0700)]
kernel - Implement segment pmap optimizations for x86-64 (4)

* Fix pmap_pte_quick() when it is called on a VM object's simple pmap.
  Fixes a panic during postgres init w/ postgres/mmap.  Simple pmaps
  do not have PDP or PML4 pages or pv_entry's, only from PD on down.

* Do some minor API work on the pte-indexing functions.

11 years agoMerge branch 'master' of ssh://crater.dragonflybsd.org/repository/git/dragonfly
Matthew Dillon [Thu, 13 Sep 2012 18:38:22 +0000 (11:38 -0700)]
Merge branch 'master' of ssh://crater.dragonflybsd.org/repository/git/dragonfly

11 years agokernel - Implement segment pmap optimizations for x86-64 (3)
Matthew Dillon [Thu, 13 Sep 2012 17:58:19 +0000 (10:58 -0700)]
kernel - Implement segment pmap optimizations for x86-64 (3)

* Fix pmap optimization bugs triggered by XORG (startx) and postgres/mmap

* The simple-mode pmaps embedded in VM objects do not have the PML4 or PDP
  layer.  This caused pmap_scan() to miss pages, resulting in an assertion
  and panic during object frees if the objects were large enough.

* Improve postgres 9.2/mmap, still more work to go.

11 years agoSync zoneinfo database with tzdata2012f from ftp://ftp.iana.org/tz/releases
Sascha Wildner [Thu, 13 Sep 2012 17:06:15 +0000 (19:06 +0200)]
Sync zoneinfo database with tzdata2012f from ftp://ftp.iana.org/tz/releases

* australasia (Pacific/Fiji): Fiji DST is October 21 through January 20
    this year.  (Thanks to Steffen Thorsen.)

* Theory: Correct a typo.

11 years agoExpand a comment in lwkt_switch().
Nuno Antunes [Thu, 13 Sep 2012 07:07:08 +0000 (08:07 +0100)]
Expand a comment in lwkt_switch().

11 years agokernel: remove useless for (;;).
Nuno Antunes [Wed, 12 Sep 2012 11:25:39 +0000 (12:25 +0100)]
kernel: remove useless for (;;).

Discussed-with: dillon

11 years agokernel: Use NULL instead of 0 for pointers, part 2/x.
Sascha Wildner [Thu, 13 Sep 2012 09:57:19 +0000 (11:57 +0200)]
kernel: Use NULL instead of 0 for pointers, part 2/x.

Found-with: Coccinelle (http://coccinelle.lip6.fr/)

11 years agokernel - Implement segment pmap optimizations for x86-64 (2)
Matthew Dillon [Thu, 13 Sep 2012 09:38:36 +0000 (02:38 -0700)]
kernel - Implement segment pmap optimizations for x86-64 (2)

* Reorder code to fix an assertion when a non-optimized PT belonging
  to the process pmap needs to be replaced by an optimized PT belonging
  to a shared pmap.

Reported-by: ftigeot
11 years agokernel - Add sysctls and tunables for [ALT_]BREAK_TO_DEBUGGER, change
Matthew Dillon [Thu, 13 Sep 2012 09:10:38 +0000 (02:10 -0700)]
kernel - Add sysctls and tunables for [ALT_]BREAK_TO_DEBUGGER, change
 serial console

* Add kern.break_to_debugger and kern.alt_break_to_debugger sysctls and
  /boot/loader.conf tunables.

* Allows enabling of these features without having to specify the
  related options in the kernel config.

* Do not override current sio settings when checking, inputting, and
  outputing characters via the console functions.  The serial port
  will be set up initially according to the console specs.

11 years agokernel - Implement segment pmap optimizations for x86-64 (1)
Matthew Dillon [Thu, 13 Sep 2012 07:23:00 +0000 (00:23 -0700)]
kernel - Implement segment pmap optimizations for x86-64 (1)

* Relax the mmap() size requirement when auto-aligning the address.
  Also auto-align to a segment boundary if the size is > 16 * SEG_SIZE.
  It previously only allowed size to be an exact multiple of SEG_SIZE.

* Some pages at the end won't be optimized, but the bulk of the mmap()
  will be.

11 years agokernel - Implement segment pmap optimizations for x86-64
Matthew Dillon [Thu, 13 Sep 2012 01:25:19 +0000 (18:25 -0700)]
kernel - Implement segment pmap optimizations for x86-64

* Implement 2MB segment optimizations for x86-64.  Any shared read-only
  or read-write VM object mapped into memory, including physical objects
  (so both sysv_shm and mmap), which is a multiple of the segment size
  and segment-aligned can be optimized.

* Enable with sysctl machdep.pmap_mmu_optimize=1

  Default is off for now.  This is an experimental feature.

* It works as follows:  A VM object which is large enough will, when VM
  faults are generated, store a truncated pmap (PD, PT, and PTEs) in the
  VM object itself.

  VM faults whos vm_map_entry's can be optimized will cause the PTE, PT,
  and also the PD (for now) to be stored in a pmap embedded in the VM_OBJECT,
  instead of in the process pmap.

  The process pmap then creates PT entry in the PD page table that points
  to the PT page table page stored in the VM_OBJECT's pmap.

* This removes nearly all page table overhead from fork()'d processes or
  even unrelated process which massively share data via mmap() or sysv_shm.
  We still recommend using sysctl kern.ipc.shm_use_phys=1 (which is now
  the default), which also removes the PV entries associated with the
  shared pmap.  However, with this optimization PV entries are no longer
  a big issue since they will not be replicated in each process, only in
  the common pmap stored in the VM_OBJECT.

* Features of this optimization:

  * Number of PV entries is reduced to approximately the number of live
    pages and no longer multiplied by the number of processes separately
    mapping the shared memory.

  * One process faulting in a page naturally makes the PTE available to
    all other processes mapping the same shared memory.  The other processes
    do not have to fault that same page in.

  * Page tables survive process exit and restart.

  * Once page tables are populated and cached, any new process that maps
    the shared memory will take far fewer faults because each fault will
    bring in an ENTIRE page table.  Postgres w/ 64-clients, VM fault rate
    was observed to drop from 1M faults/sec to less than 500 at startup,
    and during the run the fault rates dropped from a steady decline into
    the hundreds of thousands into an instant decline to virtually zero
    VM faults.

  * We no longer have to depend on sysv_shm to optimize the MMU.

  * CPU caches will do a better job caching page tables since most of
    them are now themselves shared.  Even when we invltlb, more of the
    page tables will be in the L1, L2, and L3 caches.

* EXPERIMENTAL!!!!!

11 years agokernel - Segment-align mmap and sysv_shm when possible
Matthew Dillon [Thu, 13 Sep 2012 01:20:51 +0000 (18:20 -0700)]
kernel - Segment-align mmap and sysv_shm when possible

* Segment align mmap and sysv_shm mappings which are large enough
  and whos size is a multiple of the segment-size.

  NOTE: MAP_FIXED mappings will not be segment-aligned, but the
optimization will sitll work if the passed address is already
segment-aligned.

* This will allow them to be optimized automatically by
  machdep.pmap_mmu_optimize.

11 years agokernel: Remove unused headers.
Sascha Wildner [Wed, 12 Sep 2012 21:42:18 +0000 (23:42 +0200)]
kernel: Remove unused headers.

11 years agokernel: Remove some unused variables.
Sascha Wildner [Wed, 12 Sep 2012 17:58:43 +0000 (19:58 +0200)]
kernel: Remove some unused variables.

11 years agohammer(8): add HAMMER_RSH environment variable support.
Chris Turner [Wed, 12 Sep 2012 13:11:31 +0000 (13:11 +0000)]
hammer(8): add HAMMER_RSH environment variable support.

Add support for a HAMMER_RSH environment variable which can be used
to select an alternate remote shell to be used for hammer remote operations,
change remote shell invocation to rsh(1) style '-l user host' instead of
ssh-style user@host to permit usage of rsh(1) as an alternate HAMMER_RSH
without the need for a wrapper script. Also change exec call of subshell
to use execvp instead of a hardcoded path to facillitate this change.

Update hammer.8 docs, along with minor formatting fix to environment
variable summary header sentence.

11 years agohammer - Add ssh-remote directive
Matthew Dillon [Tue, 11 Sep 2012 21:39:17 +0000 (14:39 -0700)]
hammer - Add ssh-remote directive

* Adds a feature that allows you to set up a command="..." prefix for a
  ssh key in your ~/.ssh/authorized_keys file that only runs the hammer
  utility and only with specific commands and filesystem paths.

  For example:

  command="/sbin/hammer ssh-remote mirror-read,mirror-write /path/" ssh-rsa...

  Currently requires a trailing '/' if you want to restrict the path to
  a subdirectory.  Multiple commands can be listed but the filesystem path
  restriction is only currently tested for mirror-read and mirror-write.

* This allows ssh to be used for mirroring without having to give shell
  access to the remote.

11 years agohammer - Add scoreboard file option
Matthew Dillon [Tue, 11 Sep 2012 16:54:02 +0000 (09:54 -0700)]
hammer - Add scoreboard file option

* Add -e <scoreboardfile> option for mirror-stream, so one can see the
  progress of mirror-streams running in the background.

11 years agonetisr: rename cpu_portfn() to netisr_portfn().
Nuno Antunes [Tue, 11 Sep 2012 10:49:51 +0000 (11:49 +0100)]
netisr: rename cpu_portfn() to netisr_portfn().

No functional change.

Searched and replaced with:
find sys/ -type f -exec sed -i "" 's/cpu_portfn/netisr_portfn/g' '{}' \;

11 years agohier.7: Oops, use Xr
Sascha Wildner [Tue, 11 Sep 2012 12:52:03 +0000 (14:52 +0200)]
hier.7: Oops, use Xr

11 years agohier.7: Add some words about /usr/share/terminfo.
Sascha Wildner [Tue, 11 Sep 2012 12:43:43 +0000 (14:43 +0200)]
hier.7: Add some words about /usr/share/terminfo.

11 years agoFix buildworld.
Sascha Wildner [Tue, 11 Sep 2012 11:25:50 +0000 (13:25 +0200)]
Fix buildworld.

11 years agoixgbe: Document a performance tuning sysctl
François Tigeot [Tue, 11 Sep 2012 09:30:37 +0000 (11:30 +0200)]
ixgbe: Document a performance tuning sysctl

* It is needed to consistently increase single stream TCP send
  performance

* Without it, single tcp connections rarely reach the maximum
  recorded speed of 9.4Gb/s

11 years agokernel/inet: Remove some unused variables.
Sascha Wildner [Tue, 11 Sep 2012 08:39:21 +0000 (10:39 +0200)]
kernel/inet: Remove some unused variables.

11 years agomfi(4): Break some overly long lines.
Sascha Wildner [Tue, 11 Sep 2012 08:06:14 +0000 (10:06 +0200)]
mfi(4): Break some overly long lines.

11 years agoacpi/resource: We still need to make sure that IRQ is valid at least
Sepherosa Ziehau [Tue, 11 Sep 2012 01:40:48 +0000 (09:40 +0800)]
acpi/resource: We still need to make sure that IRQ is valid at least

11 years agokernel: Use NULL instead of 0 for pointers, part 1/x.
Sascha Wildner [Mon, 10 Sep 2012 21:37:54 +0000 (23:37 +0200)]
kernel: Use NULL instead of 0 for pointers, part 1/x.

Found-with: Coccinelle (http://coccinelle.lip6.fr/)

11 years agohammer - Fix core dump during remote termination of mirror-stream
Matthew Dillon [Mon, 10 Sep 2012 21:03:30 +0000 (14:03 -0700)]
hammer - Fix core dump during remote termination of mirror-stream

* Fix issue where remote-end hammer can core trying to fprintf() an error
  message if a mirror-stream connection is lost unexpectedly.

11 years agokernel/acpi: Add missing include (for acpi_sci_irqno()).
Sascha Wildner [Mon, 10 Sep 2012 17:00:54 +0000 (19:00 +0200)]
kernel/acpi: Add missing include (for acpi_sci_irqno()).

11 years agoixgbe: Replace the TX lockmgr lock by a serializer
François Tigeot [Sun, 9 Sep 2012 08:37:34 +0000 (10:37 +0200)]
ixgbe: Replace the TX lockmgr lock by a serializer

11 years agoixgbe: Do all RX/TX processing in ithreads
François Tigeot [Mon, 10 Sep 2012 12:11:41 +0000 (14:11 +0200)]
ixgbe: Do all RX/TX processing in ithreads

* There is no need to launch taskqueues if there is more data to
  process, the next interrupt thread will handle it.

* This will be no later than 125µs in the general case anyway.

* This change can even increase performance by removing lock contention
  between ithreads and taskqueues trying to run at the same time.

11 years agoifpoll: Dispatch netmsgs to netisr, which is MPSAFE now
Sepherosa Ziehau [Mon, 10 Sep 2012 09:45:15 +0000 (17:45 +0800)]
ifpoll: Dispatch netmsgs to netisr, which is MPSAFE now

11 years agoacpi/resource: Only skip SCI trigger/polarity configuration
Sepherosa Ziehau [Mon, 10 Sep 2012 09:03:41 +0000 (17:03 +0800)]
acpi/resource: Only skip SCI trigger/polarity configuration

The code before this commit could cause interrupt storm on certain
systems, on which certain IRQs are configured into different mode
but the configured IRQs are actually never used.

Reported-by: swildner@
11 years agoperiodic.conf(5): document new 'daily_clean_hammer_pfslist' variable.
Chris Turner [Mon, 10 Sep 2012 04:30:21 +0000 (04:30 +0000)]
periodic.conf(5): document new 'daily_clean_hammer_pfslist' variable.

On further reflection - as hammer cleanup is not limited to pfs's -
should this this variable be called 'fslist'? but then - does that
make the usage for pfs's less obvious. Hmm. A philosophical question.

Leave the name for now, and take a sip from a glass 100% full of
some percentage of air and liquid.

suggested-by: swildner@

11 years agoperiodic/daily: add option to specify list of pfs's to daily/160.clean-hammer
Chris Turner [Mon, 10 Sep 2012 00:55:21 +0000 (00:55 +0000)]
periodic/daily: add option to specify list of pfs's to daily/160.clean-hammer

Add a new variable, daily_clean_hammer_pfslist, which can be used to
specify a list of pfs's to cleanup. This is useful e.g. on systems
with offline hammer slave pfs's which should be cleaned but would
not be done so with the default 'hammer cleanup' command.

Defaults to previous online-only cleanup behavior if this variable is
not set.

11 years agoiscontrol(8): Remove unused header file.
Sascha Wildner [Sun, 9 Sep 2012 21:16:28 +0000 (23:16 +0200)]
iscontrol(8): Remove unused header file.

11 years agoixgbe: Remove the Adaptative Interrupt Moderation code
François Tigeot [Sun, 9 Sep 2012 12:30:05 +0000 (14:30 +0200)]
ixgbe: Remove the Adaptative Interrupt Moderation code

* It didn't work correctly, the number of ixgbe interrupts per second
  could become excessive

* Use a fixed rate for all interrupts, be they legacy, MSI or
  MSI-X vectors. 8000 intr/s is a good default value.

* This change increases single stream tcp performance up to almost 50%
  in the sending direction

11 years agoixgbe: Move sysctl creation to a separate function
François Tigeot [Thu, 6 Sep 2012 11:58:55 +0000 (13:58 +0200)]
ixgbe: Move sysctl creation to a separate function

11 years agokernel/bce: Fix an impossible && that should really be a ||.
Sascha Wildner [Sun, 9 Sep 2012 12:54:20 +0000 (14:54 +0200)]
kernel/bce: Fix an impossible && that should really be a ||.

Reviewed-by: sephe
11 years agoInstall apm(4)'s manual page on x86_64, too.
Sascha Wildner [Sun, 9 Sep 2012 13:00:26 +0000 (15:00 +0200)]
Install apm(4)'s manual page on x86_64, too.

acpi(4) emulates apm(4)'s ioctls so it is relevant on x86_64 too.

Also, mention these things.

11 years agoixgbe: Enable existing MSI-X code
François Tigeot [Thu, 6 Sep 2012 12:43:17 +0000 (14:43 +0200)]
ixgbe: Enable existing MSI-X code

11 years agokernel: Remove two bogus break statements.
Sascha Wildner [Fri, 7 Sep 2012 21:24:45 +0000 (23:24 +0200)]
kernel: Remove two bogus break statements.

11 years agoRemove pcidevs_data.h via 'make upgrade'.
Sascha Wildner [Fri, 7 Sep 2012 20:18:45 +0000 (22:18 +0200)]
Remove pcidevs_data.h via 'make upgrade'.

11 years agoBUS_SETUP_INTR.9: Add missing comma and bump .Dd
Sascha Wildner [Fri, 7 Sep 2012 20:02:08 +0000 (22:02 +0200)]
BUS_SETUP_INTR.9: Add missing comma and bump .Dd

11 years agokernel/hptmv: Fix the completion of a write.
Sascha Wildner [Fri, 7 Sep 2012 19:51:17 +0000 (21:51 +0200)]
kernel/hptmv: Fix the completion of a write.

What is intended here is to perform BUS_DMASYNC_POSTWRITE when a write
is completed, but the 'else if' had the wrong check.

11 years agoRename notes/ directory to doc/
François Tigeot [Fri, 7 Sep 2012 19:18:12 +0000 (21:18 +0200)]
Rename notes/ directory to doc/

11 years agodoc - Fix previous commit.
Antonio Huete Jimenez [Fri, 3 Sep 2010 08:39:27 +0000 (10:39 +0200)]
doc - Fix previous commit.

11 years agodoc - Add some more porting notes regarding CVS ids.
Antonio Huete Jimenez [Fri, 3 Sep 2010 08:32:38 +0000 (10:32 +0200)]
doc - Add some more porting notes regarding CVS ids.

11 years agoAdd some notes I had lying in my tree.
Sascha Wildner [Thu, 25 Dec 2008 21:57:13 +0000 (22:57 +0100)]
Add some notes I had lying in my tree.

11 years agoLose LK_EXCLUSIVE in the lockinit example and a typo fix.
Peter Avalos [Sun, 6 Apr 2008 19:08:30 +0000 (19:08 +0000)]
Lose LK_EXCLUSIVE in the lockinit example and a typo fix.

11 years agoAdd some documentation on converting sleep mutexes and fix a couple of typos.
Sascha Wildner [Sat, 29 Dec 2007 18:35:59 +0000 (18:35 +0000)]
Add some documentation on converting sleep mutexes and fix a couple of typos.

Submitted-by: Aggelos Economopoulos <aoiko@cc.ece.ntua.gr>
11 years agoAdd a section about renamed kernel functions and clean up a bit.
Sascha Wildner [Wed, 31 Oct 2007 04:52:52 +0000 (04:52 +0000)]
Add a section about renamed kernel functions and clean up a bit.

11 years agoAdd an internal document describing (in a very incomplete way at the moment) how...
Matthew Dillon [Sun, 3 Dec 2006 20:49:59 +0000 (20:49 +0000)]
Add an internal document describing (in a very incomplete way at the moment) how to port a driver from FreeBSD.

11 years agoDocument bus_setup_intr_descr(9)
François Tigeot [Fri, 7 Sep 2012 09:43:17 +0000 (11:43 +0200)]
Document bus_setup_intr_descr(9)

11 years agoVFS.9: Add a reference to VFS_SET(9).
Sascha Wildner [Fri, 7 Sep 2012 15:57:04 +0000 (17:57 +0200)]
VFS.9: Add a reference to VFS_SET(9).

Reported-by: Raimundo Santos <raitech@gmail.com>
11 years agokernel/ipx: Add a missing 'goto set_head;'.
Sascha Wildner [Fri, 7 Sep 2012 12:57:48 +0000 (14:57 +0200)]
kernel/ipx: Add a missing 'goto set_head;'.

11 years agoixgbe: Explicitely enable PCIe bus mastering
François Tigeot [Sat, 1 Sep 2012 17:25:04 +0000 (19:25 +0200)]
ixgbe: Explicitely enable PCIe bus mastering

11 years agokernel: Use NULL for pointers in some places.
Sascha Wildner [Thu, 6 Sep 2012 11:11:03 +0000 (13:11 +0200)]
kernel: Use NULL for pointers in some places.

11 years agokernel: Remove pcidevs_data.h. It serves no purpose.
Sascha Wildner [Wed, 5 Sep 2012 21:32:42 +0000 (23:32 +0200)]
kernel: Remove pcidevs_data.h. It serves no purpose.

11 years agokernel/ixgbe: Add missing braces.
Sascha Wildner [Tue, 4 Sep 2012 17:21:16 +0000 (19:21 +0200)]
kernel/ixgbe: Add missing braces.

11 years agotcp: Implement asynchronized pru_rcvd
Sepherosa Ziehau [Mon, 3 Sep 2012 09:46:58 +0000 (17:46 +0800)]
tcp: Implement asynchronized pru_rcvd

This mainly avoids extra scheduling cost on the reception path due to
lwkt_domsg().  lwkt_sendmsg() is now used to carry out TCP pru_rcvd.

Since TCP's pru_rcvd could be batched, one pru_rcvd netmsg is embedded
into struct socket to avoid pru_rcvd netmsg allocation for each pru_rcvd,
and this netmsg will be used by lwkt_sendmsg().  Whether this embedded
pcu_rcvd netmsg should be sent or not is determined by its MSG_DONE bit.
Since user thread and netisr thread could be on different CPUs, the
embedded pru_rcvd netmsg's MSG_DONE bit is protected by a spinlock.

To cope with the following race that could drop window updates,
tcp_usr_rcvd() replies asynchronized rcvd netmsg before tcp_output():

      netisr thread                     user thread

tcp_usr_rcvd()                   sorcvtcp()
{                                {
    tcp_output()                          :
          :                               :
          :                          sbunlinkmbuf()
          :                          if (rcvd & MSG_DONE) (2)
          :                              lwkt_sendmsg(rvcd)
          :                               :
    lwkt_replymsg(rcvd) (1)
}

At (2) window update is dropped, since rcvd netmsg is not replied yet at (1)

The result:
On i7-2600 (4C/8T, 3.4GHz):
32 parallel netperf -H 127.0.0.1 -t TCP_STREAM -P0 -l 30 (4 runs, unit: Mbps)

old   30253.88 30242.58 30162.55 30101.51
new   33962.74 33798.70 33499.92 33482.35

This gives ~12% performance improvement.

11 years agomsgport.9: Fix a path.
Nuno Antunes [Mon, 3 Sep 2012 04:30:05 +0000 (05:30 +0100)]
msgport.9: Fix a path.

* sys/kern/netisr.c -> sys/net/netisr.c

Pointed-out-by: Romick <yellowrabbit2010@gmail.com>
11 years agoacpi: Remove some unused files.
Sascha Wildner [Mon, 3 Sep 2012 04:04:38 +0000 (06:04 +0200)]
acpi: Remove some unused files.

11 years agoRemove another unused header (<machine/ultrasound.h>).
Sascha Wildner [Mon, 3 Sep 2012 03:04:55 +0000 (05:04 +0200)]
Remove another unused header (<machine/ultrasound.h>).

11 years agoRemove an unused old ral(4) firmware header.
Sascha Wildner [Mon, 3 Sep 2012 02:28:19 +0000 (04:28 +0200)]
Remove an unused old ral(4) firmware header.

11 years agoRemove an unused and empty header (<machine/mtpr.h>).
Sascha Wildner [Mon, 3 Sep 2012 02:18:05 +0000 (04:18 +0200)]
Remove an unused and empty header (<machine/mtpr.h>).

11 years agolibprop: Add two missing MLINKS.
Sascha Wildner [Sun, 2 Sep 2012 16:08:50 +0000 (18:08 +0200)]
libprop: Add two missing MLINKS.

11 years agotbridge: Sync NAME, SYNOPSIS and MLINKS.
Sascha Wildner [Sun, 2 Sep 2012 15:55:30 +0000 (17:55 +0200)]
tbridge: Sync NAME, SYNOPSIS and MLINKS.

11 years agolibm: Add missing MLINK.
Sascha Wildner [Sun, 2 Sep 2012 15:47:26 +0000 (17:47 +0200)]
libm: Add missing MLINK.

11 years agoBring in a VFS_SET(9) manual page (from FreeBSD).
Sascha Wildner [Sun, 2 Sep 2012 11:31:33 +0000 (13:31 +0200)]
Bring in a VFS_SET(9) manual page (from FreeBSD).

11 years agolink.2: Use .Fn and add .Nm linkat
Sascha Wildner [Sat, 1 Sep 2012 22:26:04 +0000 (00:26 +0200)]
link.2: Use .Fn and add .Nm linkat

11 years agoamr(4): Remove some unused code (amr_timeout()).
Sascha Wildner [Fri, 31 Aug 2012 22:06:05 +0000 (00:06 +0200)]
amr(4): Remove some unused code (amr_timeout()).

Taken-from: FreeBSD

11 years agoAdd CARP support to the GENERIC kernels.
Sascha Wildner [Fri, 31 Aug 2012 21:00:35 +0000 (23:00 +0200)]
Add CARP support to the GENERIC kernels.

http://leaf.dragonflybsd.org/mailarchive/users/2012-08/msg00086.html

Suggested-by: Charles Rapenne <charles.rapenne@gmail.com>
Approved-by: sephe
11 years agousched_bsd4 - topology sched: go for safe defaults
Alex Hornung [Thu, 30 Aug 2012 08:17:12 +0000 (08:17 +0000)]
usched_bsd4 - topology sched: go for safe defaults

 * When we don't know how to handle the level of the current CPU, go for
   safe defaults disabling both cache-coherent and SMT scheduling.

 * This seems to be the case on single-core machines where the level is
   the PACKAGE_LEVEL.

Reported-by: Max Herrgard, Ferruccio Zamuner, David Shao
Dragonfly-bug: http://bugs.dragonflybsd.org/issue2408
Dragonfly-bug: http://bugs.dragonflybsd.org/issue2413

11 years agosorecvtcp: Remove unapplied code
Sepherosa Ziehau [Thu, 30 Aug 2012 04:13:08 +0000 (12:13 +0800)]
sorecvtcp: Remove unapplied code