dragonfly.git
3 years agosymorder(1): Fix for missing prototypes.
Sascha Wildner [Sun, 16 Jan 2011 04:46:06 +0000 (05:46 +0100)]
symorder(1): Fix for missing prototypes.

3 years agoppp(8): Fix for missing prototypes.
Sascha Wildner [Sun, 16 Jan 2011 04:44:50 +0000 (05:44 +0100)]
ppp(8): Fix for missing prototypes.

3 years agokzip(8): Clean up a bit and raise WARNS to 2.
Sascha Wildner [Sun, 16 Jan 2011 04:39:44 +0000 (05:39 +0100)]
kzip(8): Clean up a bit and raise WARNS to 2.

3 years agorpc.statd(8): Fix for missing prototypes.
Sascha Wildner [Sun, 16 Jan 2011 04:26:19 +0000 (05:26 +0100)]
rpc.statd(8): Fix for missing prototypes.

3 years agorpc.ypxfrc(8): Fix for missing prototypes.
Sascha Wildner [Sun, 16 Jan 2011 04:24:56 +0000 (05:24 +0100)]
rpc.ypxfrc(8): Fix for missing prototypes.

3 years agortadvd(8): Fix for missing prototypes.
Sascha Wildner [Sun, 16 Jan 2011 04:18:09 +0000 (05:18 +0100)]
rtadvd(8): Fix for missing prototypes.

3 years agofsck(8): Fix for missing prototypes.
Sascha Wildner [Sun, 16 Jan 2011 04:12:56 +0000 (05:12 +0100)]
fsck(8): Fix for missing prototypes.

3 years agoliby: Add yyparse() prototype.
Sascha Wildner [Sun, 16 Jan 2011 04:09:23 +0000 (05:09 +0100)]
liby: Add yyparse() prototype.

3 years agox86_64 apic: Remove no longer applicable comment
Sepherosa Ziehau [Sun, 16 Jan 2011 08:08:42 +0000 (16:08 +0800)]
x86_64 apic: Remove no longer applicable comment

3 years agox86_64 intr: Don't pass the vector name to INTR_HANDLER
Sepherosa Ziehau [Sun, 16 Jan 2011 08:07:22 +0000 (16:07 +0800)]
x86_64 intr: Don't pass the vector name to INTR_HANDLER

3 years agox86_64 intr: We no longer have the fast version of intr vectors
Sepherosa Ziehau [Sun, 16 Jan 2011 08:02:35 +0000 (16:02 +0800)]
x86_64 intr: We no longer have the fast version of intr vectors

3 years agox86_64 icu: Strip extra blank lines
Sepherosa Ziehau [Sun, 16 Jan 2011 07:50:47 +0000 (15:50 +0800)]
x86_64 icu: Strip extra blank lines

3 years agox86_64 icu: Remove no onger applicable comment
Sepherosa Ziehau [Sun, 16 Jan 2011 07:47:58 +0000 (15:47 +0800)]
x86_64 icu: Remove no onger applicable comment

3 years agox86_64 intr_abi: Reindent
Sepherosa Ziehau [Sun, 16 Jan 2011 07:41:01 +0000 (15:41 +0800)]
x86_64 intr_abi: Reindent

3 years agoioapic: Use shll in APIC_INTR{DIS,EN}
Sepherosa Ziehau [Sun, 16 Jan 2011 06:12:53 +0000 (14:12 +0800)]
ioapic: Use shll in APIC_INTR{DIS,EN}

3 years agoioapic: macro renaming
Sepherosa Ziehau [Sat, 15 Jan 2011 15:30:25 +0000 (23:30 +0800)]
ioapic: macro renaming

Consistent with i386.  No functional changes

3 years agodloader: Add missing prototype.
Sascha Wildner [Sun, 16 Jan 2011 06:42:47 +0000 (07:42 +0100)]
dloader: Add missing prototype.

3 years agoMove CSTD out of NO_WARNS (i.e., it shall apply too if NO_WARNS is set).
Sascha Wildner [Sun, 16 Jan 2011 03:24:04 +0000 (04:24 +0100)]
Move CSTD out of NO_WARNS (i.e., it shall apply too if NO_WARNS is set).

3 years agotwa(4): Fix some __printflike() issues I overlooked previously.
Sascha Wildner [Sat, 15 Jan 2011 12:23:49 +0000 (13:23 +0100)]
twa(4): Fix some __printflike() issues I overlooked previously.

3 years agotcp: Don't panic if persist timer is started in CLOSED and TERMINATING
Sepherosa Ziehau [Sat, 15 Jan 2011 12:02:34 +0000 (20:02 +0800)]
tcp: Don't panic if persist timer is started in CLOSED and TERMINATING

Persistent timer could go wrong only when SYN is to be turned on in
tcp_output(), however, CLOSED and TERMINATING states' flags does not
contain SYN at all.  And starting persistent timer in CLOSED state is
absolutely valid, e.g. from tcp_drop()

Reported-by: dillon@
3 years agoAdd __printflike's where possible and fix all related bugs & issues.
Sascha Wildner [Sat, 15 Jan 2011 02:43:46 +0000 (03:43 +0100)]
Add __printflike's where possible and fix all related bugs & issues.

3 years agokernel - Fix maximum file size limit for NFSv3
Matthew Dillon [Fri, 14 Jan 2011 04:56:05 +0000 (20:56 -0800)]
kernel - Fix maximum file size limit for NFSv3

* Remove throwback from an older era where the buffer cache used 32 bit
  block numbers.

* Maximum file size for NFSv3 is not 2^63-1

Reported-by: Rick Macklem <rmacklem@uoguelph.ca>
3 years agokernel - Fix an inefficiency in wait*()
Matthew Dillon [Fri, 14 Jan 2011 02:44:22 +0000 (18:44 -0800)]
kernel - Fix an inefficiency in wait*()

* The exit code was not taking into account the fact that a parent
  process might race an exiting child, causing a tsleep(... "lwpzomb", hz)
  to delay an entire second.

  Issue the proper wakeup in all cases where p->p_nthreads drops to 1 or 0.

* Improves buildworld performance a little.

3 years agopf: statekey needs to be initialized for IPv6, too.
YONETANI Tomokazu [Thu, 13 Jan 2011 00:14:35 +0000 (09:14 +0900)]
pf: statekey needs to be initialized for IPv6, too.

This fixes the panic described in issue1956.

3 years agoMerge branch 'master' of ssh://crater.dragonflybsd.org/repository/git/dragonfly
Matthew Dillon [Wed, 12 Jan 2011 20:12:04 +0000 (12:12 -0800)]
Merge branch 'master' of ssh://crater.dragonflybsd.org/repository/git/dragonfly

3 years agoMerge branch 'master' of /repository/git/dragonfly
Venkatesh Srinivas [Wed, 12 Jan 2011 20:09:37 +0000 (12:09 -0800)]
Merge branch 'master' of /repository/git/dragonfly

3 years agokernel - Fix minor build error when building without INVARIANTS
Matthew Dillon [Wed, 12 Jan 2011 20:08:11 +0000 (12:08 -0800)]
kernel - Fix minor build error when building without INVARIANTS

* Fix an unused variable when building without INVARIANTS that was
  tripping up the kernel compile.

3 years agokernel -- tmpfs: Make tmpfs_strategy MPSAFE.
Venkatesh Srinivas [Wed, 12 Jan 2011 19:43:30 +0000 (11:43 -0800)]
kernel -- tmpfs: Make tmpfs_strategy MPSAFE.

tmpfs_strategy now acquires only the per-mount token directly.

3 years agokernel -- tmpfs: Make tmpfs_read() MPSAFE.
Venkatesh Srinivas [Wed, 12 Jan 2011 05:46:31 +0000 (21:46 -0800)]
kernel -- tmpfs: Make tmpfs_read() MPSAFE.

tmpfs_read() no longer takes the MPlock or per-mount token via the VOP
callbacks. It obtains the mount token itself around the uncached read path.

3 years agoHAMMER VFS - Remove B-Tree allocation hints, add double_buffer option.
Matthew Dillon [Wed, 12 Jan 2011 03:43:23 +0000 (19:43 -0800)]
HAMMER VFS - Remove B-Tree allocation hints, add double_buffer option.

* Remove the allocation hints when allocating b-tree nodes and
  remove over-full test in the blockmap allocator for b-tree and
  meta-data elements.

  The hinting and leaving some space unused in the big-blocks did
  not improve performance.  Write performance is actually slightly
  better when new allocations are made linearly.

* Either way we have to depend on the reblocker to reorganize the
  B-Tree.

* Add a sysctl vfs.hammer.double_buffer, defaulting to off.  This
  is currently used for debugging and testing live-dedup.

  Normally only small-data blocks are run through the device vnode's
  buffer cache (allowing us to consolidate many small data blocks
  within the device vnode's buffer cache), and large data blocks are
  read directly into the file vnode's buffer.

  Turning on double_buffer cases ALL file data to run through the
  device vnode's buffer cache, resulting in double data caching
  which is not normally useful, so leave this off for now.  It will
  not improve performance.

3 years agobus_dma.9: Document the recently added flags for bus_dma_tag_create().
Sascha Wildner [Wed, 12 Jan 2011 03:07:59 +0000 (04:07 +0100)]
bus_dma.9: Document the recently added flags for bus_dma_tag_create().

3 years agoHAMMER VFS - Unlock around uiomove
Matthew Dillon [Wed, 12 Jan 2011 00:37:06 +0000 (16:37 -0800)]
HAMMER VFS - Unlock around uiomove

* Unlock the uncached read path's lock and the write path's lock
  around the uiomove().  The cached read path is already unlocked
  around the uiomove().

* Results in a marginal improvement in concurrency.  Full buffers (64K)
  are large enough to warrent the unlock/relock.

3 years agokernel - Fix very annoying lockup (SMP)
Matthew Dillon [Tue, 11 Jan 2011 22:36:24 +0000 (14:36 -0800)]
kernel - Fix very annoying lockup (SMP)

* Fix an extremely annoying lockup that took a week+ to find.  The cpusync
  code is rather fragile and any for (;;) or while (1) style loops in the
  kernel can trip it up and cause a deadlock.  These loops are careful to
  call lwkt_process_ipiq() to ensure that cpusync processing occurs.

  However, there is a race in the LWKT thread migration code where a thread
  deschedules itself on one cpu and schedules itself on another via a remote
  ipi.  The target cpu expects the thread's TDF_RUNNING state to clear and
  will loop until that happens.

  An IPI could sneak itself into the deschedule/lwkt_switch() path and
  deadlock against a cpusync, preventing the thread from leaving the
  TDF_RUNNING state.

  The solution is to ensure that lwkt_process_ipiq() is *NOT* run in
  the lwkt_switch() path if the calling thread has descheduled itself.

* The original bug could be reproduced by running blogbench in one window
  and a while (1) ps axl shell script in another.

* Add DEBUG_PUSH_INFO(msg)/DEBUG_POP_INFO() macros which record (msg)
  in the globaldata structure as a debugging aid.

* Remove unused platform/pc64/x86_64/systimer.c file.  The entire contents
  of this file was #ifdef'd out and its functionality is handled elsewhere
  by the lapic timer code.

* #if 0 out numerous debugging bits but don't remove the code because it
  is extremely useful for finding lockup conditions.

3 years agokernel - Enhance getcacheblk() (improve saturated write performance (3)).
Matthew Dillon [Tue, 11 Jan 2011 09:19:55 +0000 (01:19 -0800)]
kernel - Enhance getcacheblk() (improve saturated write performance (3)).

* Change getcacheblk() to use getblk() instead of findblk() when the
  block size is known, allowing a cached buffer to be reinstantiated
  from VM backing store in the MPSAFE path.

  Well, mostly MPSAFE, the vm_token is still acquired, but this is still
  much faster than what HAMMER does when the buffer is not in-cache.

* This more than doubles blogbench performance w/HAMMER and further reduces
  concurrent read vs write conflicts.

3 years agoMerge branch 'master' of ssh://crater.dragonflybsd.org/repository/git/dragonfly
Matthew Dillon [Tue, 11 Jan 2011 09:19:19 +0000 (01:19 -0800)]
Merge branch 'master' of ssh://crater.dragonflybsd.org/repository/git/dragonfly

3 years agoHAMMER VFS - Improve saturated write performance (2).
Matthew Dillon [Tue, 11 Jan 2011 07:17:34 +0000 (23:17 -0800)]
HAMMER VFS - Improve saturated write performance (2).

* Change the dirty io buffer lists from TAILQs to Red-Black trees.

* The dirty io buffers are sorted by disk address on a flush-group by
  flush-group basis and I/O writes are initiated in sorted order.

  This significantly improves write I/O throughput to normal HDs.
  Essentially what is happening here is that the sheer number of
  unsorted buffers are overwhelming the HDs own caches.  Having HAMMER
  pre-sort the buffers, of which there can be upwards of 100MBs worth,
  allow the HD to write more optimally.

3 years agoHAMMER VFS - Improve saturated write performance.
Matthew Dillon [Tue, 11 Jan 2011 02:07:20 +0000 (18:07 -0800)]
HAMMER VFS - Improve saturated write performance.

* Change vfs.hammer.limit_reclaim to auto-scale to 1/10 the maximum
  number of vnodes, instead of using a fixed value of 4000.  On a
  typical i386 box this will be around ~10000 and on a typical x86-64
  box this will be ~50000.

* Greatly reduce the vfs.hammer.autoflush default from 2000 inodes
  to 500 inodes.

  This results in better locality of reference within the flush groups
  and better pipelining when the reclaim limit is approached (when the
  vnode cache is saturated).

* Refactor the sequencing of the hammer_flush_group structure, fixing
  a number of issues which caused the structures to hold an inconsistent
  number of inodes.

* Refactor the flusher's sequence space management.

* Blogbench performance is greatly improved, as is mixed random read/write
  I/O in general.

  Note, however, that typical production operations do not involve
  hundreds of thousands of files and will not be impacted as much.

3 years agoMerge branch 'master' of ssh://crater.dragonflybsd.org/repository/git/dragonfly
Venkatesh Srinivas [Tue, 11 Jan 2011 04:19:28 +0000 (23:19 -0500)]
Merge branch 'master' of ssh://crater.dragonflybsd.org/repository/git/dragonfly

3 years agoRemove prototype of disksort().
Venkatesh Srinivas [Tue, 11 Jan 2011 04:09:35 +0000 (23:09 -0500)]
Remove prototype of disksort().

3 years agokernel -- kref: Add KREF_DEC macro to allow braced blocks for destructors.
Venkatesh Srinivas [Tue, 11 Jan 2011 04:01:02 +0000 (20:01 -0800)]
kernel -- kref: Add KREF_DEC macro to allow braced blocks for destructors.

Convert sfbuf to use braced blocks on unref.

3 years agoHAMMER VFS - Change default hammer fs version from 4 to 5
Matthew Dillon [Mon, 10 Jan 2011 23:42:24 +0000 (15:42 -0800)]
HAMMER VFS - Change default hammer fs version from 4 to 5

* change the default hammer fs from 4 to 5.  newfs_hammer calls with
  newly built worlds will now create version 5 by default.

  The version 5 filesystem media format supports de-dup.

3 years agoHAMMER VFS - Implement Version 6 features as WIP (work in progress)
Matthew Dillon [Mon, 10 Jan 2011 23:39:47 +0000 (15:39 -0800)]
HAMMER VFS - Implement Version 6 features as WIP (work in progress)

* Add a new directory hash which generates segmented CRC and then adds
  them together for the filename.

  This tends to result in a directory key offset instead of a complete
  re-randomization when a temporary file extension is renamed to its base
  filename.

  Numerous programs create temporary files and then rename them.  This
  tends to maintain inode number / directory name entry ordering a bit
  better.

* This is a work in progress version.  Production systems should not upgrade
  their HAMMER filesystem to version 6 at this time.

3 years agokernel64 - Add some lapic timer based debugging (disabled by default)
Matthew Dillon [Mon, 10 Jan 2011 23:37:01 +0000 (15:37 -0800)]
kernel64 - Add some lapic timer based debugging (disabled by default)

* Adjust the Xtimer interrupt to unconditionally call
  lapic_timer_always() regardless of the critical section state.

* Create a procedure lapic_timer_always() on x86-64 which is #if 0'd
  out by default with some on-screen debugging that can be used to
  help find system lockups.

3 years agokernel - Do a better job with the filesystem background sync
Matthew Dillon [Mon, 10 Jan 2011 23:31:29 +0000 (15:31 -0800)]
kernel - Do a better job with the filesystem background sync

* Adjust code for MNT_LAZY, MNT_NOWAIT, and MNT_WAITOK to reflect
  the fact that they are three different flags and not enumeration
  constants.

* HAMMER now sets VMSC_ONEPASS for MNT_LAZY syncs (background filesystem
  sync).  This generally reduces instances where the background sync
  winds up running continuously when heavy filesystem ops saturate
  the disk.  Fewer vnodes dirtied after the sync is initiated will get
  caught up in the sync.

3 years agokernel - Refactor VMSC_ONEPASS
Matthew Dillon [Mon, 10 Jan 2011 23:26:31 +0000 (15:26 -0800)]
kernel - Refactor VMSC_ONEPASS

* Refactor the VMSC_ONEPASS flag to only iterate the current number
  of vnodes associated with a mount point, instead of 2x the vnodes.
  This makes 'sync' a bit more consistent in the face of heavy filesystem
  activity.

3 years agokernel - Ensure rover in vfs_cache is not optimized.
Matthew Dillon [Mon, 10 Jan 2011 23:25:47 +0000 (15:25 -0800)]
kernel - Ensure rover in vfs_cache is not optimized.

* Add a cpu_ccfence() to ensure that the static rover variable is
  not optimized by the compiler.

3 years agokernel - refactor cpusync and pmap_inval code, fix lockup
Matthew Dillon [Mon, 10 Jan 2011 23:17:25 +0000 (15:17 -0800)]
kernel - refactor cpusync and pmap_inval code, fix lockup

* Simplify the cpusync API.  The API now has only one initialization call,
  one simplified rollup call, and two primary calls handling a single
  function callback (instead of three callbacks).

  cpusync_interlock() interlocks the specified set of cpus and ensures they
  are running in a safe place, cpusync_deinterlock() executes the initialized
  function on the cpu set and does not return until all cpus have completed
  the operation.

* Simplify the pmap_inval per-platform API.  pmap_inval_interlock() and
  pmap_inval_deinterlock() now reflect similar functionality to the cpusync
  API.  pmap/pte operations are now synchronized when pmap_inval_deinterlock()
  is called and not when pmap_inval_done() is called, reducing the range of
  code which can execute while the cpu set is held quiescent.

  pmap_inval_flush() has been removed.  Critical section handling has also
  been rearranged slightly in the pmap_inval* and cpusync* APIs.

* Fixes a cpusync lockup which occurs when the x86-64 pmap and pmap_inval
  code is used to hold a cpu mask quiescent across complex subsystem calls.
  Primarily accomplished by moving the synchronization out of
  pmap_inval_flush() and into pmap_inval_deinterlock().

3 years agox86_64: Put the x86_64 specific "seg-fault..." message under bootverbose.
Sascha Wildner [Sun, 9 Jan 2011 16:15:28 +0000 (17:15 +0100)]
x86_64: Put the x86_64 specific "seg-fault..." message under bootverbose.

Reported-by: John Marino
3 years agointr: Support upto 192 IDT entries in ipl and intr vector asm code
Sepherosa Ziehau [Thu, 6 Jan 2011 15:53:19 +0000 (23:53 +0800)]
intr: Support upto 192 IDT entries in ipl and intr vector asm code

Remove 32bits gd_fpending mask and add 32bits gd_ipending mask array
which has 6 elements.  This allows 192 intrs to be pending.

192 is chosen, because the first 32 entries in IDT is reserved, while
the last 32 entries in IDT are used for IPIs.

This paves the way toward correcting interrupt routing using MPTable
or ACPI and supporting MSI and MSI-X

3 years agoapic: Remove no longer applicable comment
Sepherosa Ziehau [Thu, 6 Jan 2011 04:59:22 +0000 (12:59 +0800)]
apic: Remove no longer applicable comment

3 years agointr: Don't pass the vector name to INTR_HANDLER
Sepherosa Ziehau [Thu, 6 Jan 2011 04:51:09 +0000 (12:51 +0800)]
intr: Don't pass the vector name to INTR_HANDLER

3 years agointr: We no longer have the fast version of intrs
Sepherosa Ziehau [Thu, 6 Jan 2011 04:34:33 +0000 (12:34 +0800)]
intr: We no longer have the fast version of intrs

3 years agoicu: Strip extra blank lines
Sepherosa Ziehau [Thu, 6 Jan 2011 04:30:56 +0000 (12:30 +0800)]
icu: Strip extra blank lines

3 years agoicu: Remove no onger applicable comment
Sepherosa Ziehau [Thu, 6 Jan 2011 04:29:44 +0000 (12:29 +0800)]
icu: Remove no onger applicable comment

3 years agointr_abi: Reindent
Sepherosa Ziehau [Thu, 6 Jan 2011 04:28:14 +0000 (12:28 +0800)]
intr_abi: Reindent

3 years agoRevert "Revert "IO APIC: Assign pins dedicated to PCI in the early stage.""
Sepherosa Ziehau [Wed, 5 Jan 2011 12:23:02 +0000 (20:23 +0800)]
Revert "Revert "IO APIC: Assign pins dedicated to PCI in the early stage.""

This reverts commit 4612bd39e96dec8f15117c89cbaa12c6bdfb75d2.

3 years agopf: It's opt_carp.h not use_carp.h
Sepherosa Ziehau [Sun, 9 Jan 2011 07:01:32 +0000 (15:01 +0800)]
pf: It's opt_carp.h not use_carp.h

3 years agoBring in sephe's recent intr/apic work to x86_64.
Sascha Wildner [Sun, 9 Jan 2011 06:36:45 +0000 (07:36 +0100)]
Bring in sephe's recent intr/apic work to x86_64.

The following commits:

6ab7c3a intr: Clean up comment of Local APIC TPR
84bf7d5 intr: Remove unused TRP macros
e4a4c49 intr: Remove unused typedef
507bf37 intr: Make sure that changing IPI offset will also update related TPR
072d9b3 intr: Move IO/APIC IDT vector offset into isa/intr_machdep.h
7b32a0a apic: Remove unused macros and duplicated comment
2ce3ae8 apic: Remove unused macros
26408d7 intr: Remove call_fast_unpend() declaration
87e3ca2 intr: Start hardware interrupt at IDT_OFFSET
90a567f apic: Clear all entries in int table

3 years agopci: MPTable pcib/hostb should not be used, if !apic_io_enable
Sascha Wildner [Sun, 9 Jan 2011 06:35:08 +0000 (07:35 +0100)]
pci: MPTable pcib/hostb should not be used, if !apic_io_enable

MP Table is not parsed at all if !apic_io_enable

[Recent work by sephe brought in from i386.]

3 years agokernel: Uncomment aacp in the configs.
Sascha Wildner [Sat, 8 Jan 2011 23:21:09 +0000 (00:21 +0100)]
kernel: Uncomment aacp in the configs.

3 years agotws.4: Bump some dates.
Sascha Wildner [Sat, 8 Jan 2011 23:03:42 +0000 (00:03 +0100)]
tws.4: Bump some dates.

3 years agoAdd tws(4), a driver for the LSI 3ware 9750 series SATA/SAS RAID controllers.
Sascha Wildner [Sat, 8 Jan 2011 20:47:12 +0000 (21:47 +0100)]
Add tws(4), a driver for the LSI 3ware 9750 series SATA/SAS RAID controllers.

It should support the following controllers:

* LSI 3ware SAS 9750-4i
* LSI 3ware SAS 9750-4i4e
* LSI 3ware SAS 9750-8i
* LSI 3ware SAS 9750-8e
* LSI 3ware SAS 9750-16i4e
* LSI 3ware SAS 9750-24i4e

It was tested with the 9750-4i.

Many thanks to LSI Corporation. The driver is a port of their FreeBSD driver
that comes on the Installation CD (manual page added by me).

Thanks to vsrinivas and sephe for helping with finding and fixing a busdma
locking issue.

3 years agobusdma: Free map, if bus_dmamap_create() fails
Sepherosa Ziehau [Fri, 31 Dec 2010 09:43:11 +0000 (17:43 +0800)]
busdma: Free map, if bus_dmamap_create() fails

3 years agobusdma: Make sure bounce zone's sysctl tree is created before destroying it
Sepherosa Ziehau [Fri, 31 Dec 2010 09:28:12 +0000 (17:28 +0800)]
busdma: Make sure bounce zone's sysctl tree is created before destroying it

3 years agobusdma: Free bounce zone if any error happens during bus_dma_tag_create()
Sepherosa Ziehau [Fri, 31 Dec 2010 09:25:05 +0000 (17:25 +0800)]
busdma: Free bounce zone if any error happens during bus_dma_tag_create()

3 years agobusdma: Add PROTECTED bus_dma_tag_create() flag.
Sepherosa Ziehau [Mon, 27 Dec 2010 08:24:03 +0000 (16:24 +0800)]
busdma: Add PROTECTED bus_dma_tag_create() flag.

PROTECTED
  All of the functions called with the dma_tag are already protected by
  the caller, so busdma code need not to protect the internal data
  structures.  Panic, if the "defered dmamap load callback" is going to
  happen.

When used along with PRIVBZONE, ALLOCALL and ALLOCNOW, it could greatly
reduce the work load of fixing all of the drivers that mal-use busdma
functions.

3 years agobusdma: Add PRIVBZONE and ALLOCALL bus_dma_tag_create() flags.
Sepherosa Ziehau [Mon, 27 Dec 2010 07:44:23 +0000 (15:44 +0800)]
busdma: Add PRIVBZONE and ALLOCALL bus_dma_tag_create() flags.

PRIVBZONE
  Use a private bounce zone instead of a shared one.  A private bounce
  zone will vanish if the dma_tag is destroyed.

ALLOCALL
  Allocate all required resources (mainly bounce buffer), if any
  allocation failes, bus_dmamap_create() will fail.

Using PRIVBZONE alone could possiblely reduce the contention between
driver instances.

Using PRIVBZONE and ALLOCALL could promise that the "defered dmamap
load callback" will not happen.  This could be used to ease some driver
work and reduce the work load to fix the existing drivers which may
(incorrectly) rely on or may not expect the "defered dmamap load
callback" semantic of bus_dmamap_load().

3 years agoRevert "Remove the broken burncd(8)."
Sascha Wildner [Sat, 8 Jan 2011 12:47:55 +0000 (13:47 +0100)]
Revert "Remove the broken burncd(8)."

This reverts commit fd6f482a63584f75b8a119c8815ad384815c990a.

A number of people disagreed with this commit, so I'm reverting
it.

The reason I removed burncd(8) was that it didn't work here at
all and that others (on IRC) had reported the same. So bring it
back for now so we can re-evaluate.

3 years agopthread.h: Fix prototypes.
Peter Avalos [Sat, 8 Jan 2011 01:36:38 +0000 (15:36 -1000)]
pthread.h: Fix prototypes.

We need to remove the condition of _POSIX_THREAD_PROCESS_SHARED for the
pshared prototypes.  Otherwise, programs have to include unistd.h (to
get the definition of _POSIX_THREAD_PROCESS_SHARED) before pthread.h.
This is not the way to do things.

This fixes at least kde4, and I'm sure there's others.

3 years agoaac(4): Use bio (not bp) for the bio pointer.
Sascha Wildner [Fri, 7 Jan 2011 05:48:10 +0000 (06:48 +0100)]
aac(4): Use bio (not bp) for the bio pointer.

3 years agoaac(4): Update to version 2.1.9-1 (current FreeBSD).
Sascha Wildner [Fri, 7 Jan 2011 05:14:19 +0000 (06:14 +0100)]
aac(4): Update to version 2.1.9-1 (current FreeBSD).

This brings in support for ~40 additional controllers of the family. See
the manual page for the full list.

It also fixes dumping to aac(4).

Tested with a Dell PERC 320/DC.

Reported-by: Archimedes Gaviola <archimedes.gaviola@gmail.com>
Dragonfly-bug: <http://bugs.dragonflybsd.org/issue1391>

3 years agoxargs(1): Add -P option for parallel mode.
Sascha Wildner [Thu, 6 Jan 2011 12:48:03 +0000 (13:48 +0100)]
xargs(1): Add -P option for parallel mode.

Submitted-by: Axel Scheepers <axel@axel.truedestiny.net>
Taken-from:    FreeBSD
Dragonfly-bug: <http://bugs.dragonflybsd.org/issue1953>

3 years agoRemove the broken burncd(8).
Sascha Wildner [Wed, 5 Jan 2011 23:11:07 +0000 (00:11 +0100)]
Remove the broken burncd(8).

There's cdrecord from pkgsrc/sysutils/cdrtools (which also comes on our
LiveCD).

3 years agofinger - Fix seg-fault
Matthew Dillon [Wed, 5 Jan 2011 20:48:07 +0000 (12:48 -0800)]
finger - Fix seg-fault

* Fix a seg-fault where finger was improperly assuming that w->tty and w->host
  where char arrays when in fact they were simply char pointers.

Reported-by: Robin Carey <robin.carey1@googlemail.com>
3 years agohptmv(4): Save some unneeded variables in the locking functions.
Sascha Wildner [Wed, 5 Jan 2011 14:49:44 +0000 (15:49 +0100)]
hptmv(4): Save some unneeded variables in the locking functions.

3 years agohptmv(4): Fix shutting down.
Sascha Wildner [Wed, 5 Jan 2011 04:20:56 +0000 (05:20 +0100)]
hptmv(4): Fix shutting down.

This didn't work at all. pAdapter->eh was never assigned to and the event
handler for deregistering was wrong, too.

So the driver ended up deregistering all callbacks of the shutdown_final
handler during shutdown_post_sync.

3 years agovkernel - Fix corrupt tailq (vkernel64 only)
Matthew Dillon [Tue, 4 Jan 2011 23:06:59 +0000 (15:06 -0800)]
vkernel - Fix corrupt tailq (vkernel64 only)

* Properly remove an exiting thread from any tsleep queue it might be
  enqueued on (due to tsleep_interlock() use cases) prior to exiting.

* Fixes tailq corruption which can occur with threaded programs.

* Fix is only applicable to vkernel64.  All other platforms already
  properly remove the thread.

* Assert that an exiting thread has been removed from any sleep queue
  before freeing it in kern_exit.c to catch any future cases.

3 years agohammer - Describe live_dedup_cache_size sysctl
Samuel J. Greear [Tue, 4 Jan 2011 21:39:46 +0000 (21:39 +0000)]
hammer - Describe live_dedup_cache_size sysctl

3 years agoHAMMER - Add live_dedup_cache_size sysctl
Ilya Dryomov [Tue, 4 Jan 2011 16:15:48 +0000 (18:15 +0200)]
HAMMER - Add live_dedup_cache_size sysctl

* There is now a hammer_live_dedup_cache_size variable which can be
  set via sysctl vfs.hammer.live_dedup_cache_size.  The default is 4096.

* A better solution is to make it scale automatically according to
  nbufs or a number of vnodes.

3 years agohammer - Furnish descriptions for the live dedup sysctl's
Samuel J. Greear [Tue, 4 Jan 2011 15:55:50 +0000 (15:55 +0000)]
hammer - Furnish descriptions for the live dedup sysctl's

3 years agoplatform - Allow building without COMPAT_DF12
Samuel J. Greear [Tue, 4 Jan 2011 15:53:39 +0000 (15:53 +0000)]
platform - Allow building without COMPAT_DF12

3 years agoAdd hptmv(4), a driver for HighPoint RocketRAID 182x controllers.
Sascha Wildner [Tue, 4 Jan 2011 15:19:23 +0000 (16:19 +0100)]
Add hptmv(4), a driver for HighPoint RocketRAID 182x controllers.

It was tested with an 1820A card.

Thanks to HighPoint and FreeBSD (from which it was ported).

3 years agoMake some space in sys/dev/raid/Makefile.
Sascha Wildner [Sun, 26 Dec 2010 13:00:46 +0000 (14:00 +0100)]
Make some space in sys/dev/raid/Makefile.

3 years agonetwork - Fix pf build when no INET6
Ilya Dryomov [Tue, 4 Jan 2011 12:13:27 +0000 (14:13 +0200)]
network - Fix pf build when no INET6

  * Definition of struct ip6_hdr is not included when no INET6, #ifdef
    out the code that uses it.

3 years agokernel - Fix vkernel lwp stuck thread bug
Matthew Dillon [Tue, 4 Jan 2011 04:22:47 +0000 (20:22 -0800)]
kernel - Fix vkernel lwp stuck thread bug

* Fix a tsleep hz / 100 which calculates to 0 due to the vkernel's 20hz
  tick rate.  This could cause threads running under the vkernel to get
  stuck.

3 years agoHAMMER VFS - Increase directory object cache
Matthew Dillon [Tue, 4 Jan 2011 04:19:59 +0000 (20:19 -0800)]
HAMMER VFS - Increase directory object cache

* Increase from 1024 to 2048 allocation blocks.

3 years agoHAMMER VFS - Fix TAILQ bug
Matthew Dillon [Tue, 4 Jan 2011 04:14:22 +0000 (20:14 -0800)]
HAMMER VFS - Fix TAILQ bug

* Fix two cases where an ocp (object id allocation cache block for
  directories) is kfree()'d without removing it from hmp->objid_cache_list.
  These could cause a panic or lockup.

* Increase the inode allocation / directory hash matching bitmap fill
  level from 50% to 75%.

* Properly account hmp->objid_cache_count in hammer_destroy_objid_cache().

3 years agoHAMMER - Add live dedup sysctl and support
Ilya Dryomov [Tue, 4 Jan 2011 01:07:02 +0000 (03:07 +0200)]
HAMMER - Add live dedup sysctl and support

* Adds *experimental* live dedup (aka efficient cp) support

* sysctl vfs.hammer.live_dedup
    0 - disabled (default)
    1 - enabled, populate dedup cache on reads
    2 - enabled, populate dedup cache on reads and writes

3 years ago<dev/netif/wi/if_wavelan_ieee.h>: Uncomment wi_req.
Sascha Wildner [Mon, 3 Jan 2011 06:39:17 +0000 (07:39 +0100)]
<dev/netif/wi/if_wavelan_ieee.h>: Uncomment wi_req.

This, in conjunction with a few patches I submitted to pkgsrc, will
eventually fix building the following packages:

net/gtk_wicontrol
net/wimon
net/wistumbler
net/wistumbler2
net/xfce4-wavelan-plugin (and thereby meta/xfce4-extras)

3 years agohammer(8) rebalance: change default saturation_percentage a few more places
Thomas Nikolajsen [Mon, 3 Jan 2011 06:26:09 +0000 (07:26 +0100)]
hammer(8) rebalance: change default saturation_percentage a few more places

3 years agohammer(8) - Take in account the saturation level passed to rebalance.
Antonio Huete Jimenez [Sun, 2 Jan 2011 21:16:48 +0000 (22:16 +0100)]
hammer(8) - Take in account the saturation level passed to rebalance.

Also change the default saturation level from 75% to 85%.

3 years agokernel: Remove support for the Xerox Network Systems (NS) protocol.
Sascha Wildner [Sun, 2 Jan 2011 19:16:05 +0000 (20:16 +0100)]
kernel: Remove support for the Xerox Network Systems (NS) protocol.

It was previously removed from LINT with commit 67bf99c4 and its removal
was also announced here:

http://leaf.dragonflybsd.org/mailarchive/kernel/2010-09/msg00025.html

To be on the safe side, bump _DragonFly_version due to /usr/include/netns
going away. In the unlikely event of something breaking in pkgsrc we'll
have a version to patch against, if needed.

3 years agobluetooth(4): Fix loading bluetooth without pf.
Sascha Wildner [Sun, 2 Jan 2011 17:43:19 +0000 (18:43 +0100)]
bluetooth(4): Fix loading bluetooth without pf.

bluetooth(4) was previously using pf(4)'s pool_* macros. Now that pool_get()
has been turned into a function in pf(4), this is no longer possible, since
the bluetooth(4) module would have to depend on the pf(4) module for that.

To unbreak module loading, convert all calls to these macros to the zone(9)
calls which they really are.

3 years agoaibs(4): Add missing module dependency.
Sascha Wildner [Sun, 2 Jan 2011 17:38:47 +0000 (18:38 +0100)]
aibs(4): Add missing module dependency.

3 years agoMerge branch 'master' of ssh://crater.dragonflybsd.org/repository/git/dragonfly
Samuel J. Greear [Sun, 2 Jan 2011 15:14:55 +0000 (15:14 +0000)]
Merge branch 'master' of ssh://crater.dragonflybsd.org/repository/git/dragonfly

3 years agokernel - s/so_pru_control/so_pru_control_direct/
Samuel J. Greear [Sun, 2 Jan 2011 15:12:14 +0000 (15:12 +0000)]
kernel - s/so_pru_control/so_pru_control_direct/

* This enables building without COMPAT_43

3 years agoRearrange the previous commit a bit and fix a pathname.
Sascha Wildner [Sun, 2 Jan 2011 11:28:37 +0000 (12:28 +0100)]
Rearrange the previous commit a bit and fix a pathname.

3 years agopf: Do not install pfsync man pages, as we lack support for it.
Jan Lentfer [Sun, 2 Jan 2011 11:09:20 +0000 (12:09 +0100)]
pf: Do not install pfsync man pages, as we lack support for it.

3 years agopf: Update man pages, too
Jan Lentfer [Sat, 1 Jan 2011 23:22:05 +0000 (00:22 +0100)]
pf: Update man pages, too

3 years agoFix 64 bit build.
Sascha Wildner [Sat, 1 Jan 2011 11:42:33 +0000 (12:42 +0100)]
Fix 64 bit build.