dragonfly.git
14 years agowpa_supplicant/hostapd: Update to 0.6.10
Jan Lentfer [Thu, 4 Feb 2010 15:57:55 +0000 (16:57 +0100)]
wpa_supplicant/hostapd: Update to 0.6.10

14 years agohostapd: Update vendor branch to 0.6.10
Jan Lentfer [Thu, 4 Feb 2010 12:26:03 +0000 (13:26 +0100)]
hostapd: Update vendor branch to 0.6.10

14 years agowpa_supplicant: update vendor branch to 0.6.10
Jan Lentfer [Thu, 4 Feb 2010 08:37:41 +0000 (09:37 +0100)]
wpa_supplicant: update vendor branch to 0.6.10

14 years agohostpad: Update to work without version tag
Jan Lentfer [Wed, 3 Feb 2010 11:50:47 +0000 (12:50 +0100)]
hostpad: Update to work without version tag

14 years agohostapd: remove version tag from directory
Jan Lentfer [Wed, 3 Feb 2010 10:45:18 +0000 (11:45 +0100)]
hostapd: remove version tag from directory

14 years agowpa_supplicant: Update to work without verision tag
Jan Lentfer [Wed, 3 Feb 2010 10:23:03 +0000 (11:23 +0100)]
wpa_supplicant: Update to work without verision tag

14 years agowpa-supplicant: remove version tag from directory
Jan Lentfer [Wed, 27 Jan 2010 21:55:51 +0000 (22:55 +0100)]
wpa-supplicant: remove version tag from directory

14 years agokate(4): put missing \n into device_printf(9) calls
Constantine A. Murenin [Sun, 14 Feb 2010 08:57:54 +0000 (03:57 -0500)]
kate(4): put missing \n into device_printf(9) calls

14 years agotest commit
Constantine A. Murenin [Sun, 14 Feb 2010 08:49:56 +0000 (03:49 -0500)]
test commit

14 years agokernel - TMPFS - Stabilization pass, fix vnode list corruption
Matthew Dillon [Sun, 14 Feb 2010 01:31:19 +0000 (17:31 -0800)]
kernel - TMPFS - Stabilization pass, fix vnode list corruption

* Clean up tn_size when destroying a VLNK node.

* Interlock the vnode while holding the node lock before calling
  vget() to prevent it from being ripped out from under the vget().

  Then re-test that the relationship between the tmpfs node and
  vnode holds.

* Minor formatting cleanup in the same area.

14 years agokernel - Cleanup, add assertions in the vnode freeing path
Matthew Dillon [Sun, 14 Feb 2010 01:30:02 +0000 (17:30 -0800)]
kernel - Cleanup, add assertions in the vnode freeing path

* Remove debug kprintf: "Warning ncp ... deadlock avoided".

* Add assertions on the vnode flag state when adding and removing
  from the freelist, or when dtor() is called by the backing store.

14 years agokate.4 & km.4: Silence 'make manlint' warnings.
Sascha Wildner [Sat, 13 Feb 2010 18:18:49 +0000 (19:18 +0100)]
kate.4 & km.4: Silence 'make manlint' warnings.

14 years agokgdb - Fix kernel trapframe backtraces for x86_64
Matthew Dillon [Sat, 13 Feb 2010 17:41:33 +0000 (09:41 -0800)]
kgdb - Fix kernel trapframe backtraces for x86_64

* Bring in same infrastructure that i386 uses

* Make the stack trace cross the "trapframe" frame properly.

14 years agokernel - More readdirplus deadlock avoidance work
Matthew Dillon [Sat, 13 Feb 2010 17:23:33 +0000 (09:23 -0800)]
kernel - More readdirplus deadlock avoidance work

* Add cache_nlookup_nonblock() and nfs_nget_nonblock()

* Adjust the readdirplus code to use the new functions.   Basically
  there are too many locks being held by callers and then readdirplus
  goes and tries to acquire (and lock) nodes for the directory elements
  on top of that, leading to deadlocks.

  Attempts to order the locks have failed so now we just use a
  non-blocking approach since the readdirplus entries are all
  advisory anyway.

14 years agoinstaller: Fix the check for partitions <50GB a bit more.
Sascha Wildner [Sat, 13 Feb 2010 17:07:04 +0000 (18:07 +0100)]
installer: Fix the check for partitions <50GB a bit more.

/boot or swap could have '*' for size too, in theory.

14 years agoinstaller: Raise the size proposal for /boot to 768M for HAMMER installs.
Sascha Wildner [Sat, 13 Feb 2010 16:44:02 +0000 (17:44 +0100)]
installer: Raise the size proposal for /boot to 768M for HAMMER installs.

Rewrite the algorithm for calculating size recommendations to be a bit
more flexible, especially with smaller disks (as in VMs e.g.). It should
always give a valid set now.

/boot tries to be 768M if space permits. This way several kernels and
module directories can comfortably fit on it.

Reported-by: many
While I'm here, fix another issue regarding HAMMER installs:

The check for filesystems <50GB wasn't working at all. Fix and improve it.
Instead of checking only the root filesystem, check the sizes of all HAMMER
filesystems created. If a HAMMER filesystem <50GB has been encountered,
display a warning similar to hammer_newfs(8) and allow the user to either
confirm or cancel.

14 years agokate(4) and km(4): temperature sensors for AMD Family 0Fh, 10h and 11h AMD64 processors
Constantine A. Murenin [Sat, 13 Feb 2010 04:05:19 +0000 (23:05 -0500)]
kate(4) and km(4): temperature sensors for AMD Family 0Fh, 10h and 11h AMD64 processors

14 years agopcidevs: unbreak a75ee873 from 2009-10-04 (geode/cs5536)
Constantine A. Murenin [Sat, 13 Feb 2010 07:53:01 +0000 (02:53 -0500)]
pcidevs: unbreak a75ee873 from 2009-10-04 (geode/cs5536)

14 years agolibevtr: fix warnings
Aggelos Economopoulos [Sat, 13 Feb 2010 13:32:50 +0000 (15:32 +0200)]
libevtr: fix warnings

14 years agoevtranalyze: fix sloppy format strings
Aggelos Economopoulos [Sat, 13 Feb 2010 13:00:24 +0000 (15:00 +0200)]
evtranalyze: fix sloppy format strings

Patch-by: nant@
14 years agoktrdump: always sort entries when dumping
Aggelos Economopoulos [Sat, 13 Feb 2010 12:49:12 +0000 (14:49 +0200)]
ktrdump: always sort entries when dumping

Also remove duplicate setting of rflag in ktrdump -a.

14 years agoevtr: dump core frequencies and use them to print timestamps in usecs
Aggelos Economopoulos [Sat, 13 Feb 2010 12:35:15 +0000 (14:35 +0200)]
evtr: dump core frequencies and use them to print timestamps in usecs

This commit dumps the same frequency for each core; there's no
point supporting different frequencies unless we monitor frequency
change events. We use the frequency to print out relative timestamps
in microseconds. This relies on ktrdump having done correct sorting.

14 years agolibevtr: fix thinko
Aggelos Economopoulos [Sat, 13 Feb 2010 12:31:30 +0000 (14:31 +0200)]
libevtr: fix thinko

14 years agoevtranalyze: correct a couple of filtering bugs
Aggelos Economopoulos [Fri, 12 Feb 2010 20:17:40 +0000 (22:17 +0200)]
evtranalyze: correct a couple of filtering bugs

14 years agoPut evtranalyze and ktrdump in the already existing i386 check.
Sascha Wildner [Sat, 13 Feb 2010 12:31:34 +0000 (13:31 +0100)]
Put evtranalyze and ktrdump in the already existing i386 check.

14 years agotest utilities - eatmem.c - Change size parameter from int to size_t
Matthew Dillon [Sat, 13 Feb 2010 10:02:16 +0000 (02:02 -0800)]
test utilities - eatmem.c - Change size parameter from int to size_t

* Allows large multi-gigabyte allocations on 64-bit boxes

14 years agokernel - TMPFS - Bug fixing pass - paging to/from swap, vnode recycling
Matthew Dillon [Sat, 13 Feb 2010 09:58:02 +0000 (01:58 -0800)]
kernel - TMPFS - Bug fixing pass - paging to/from swap, vnode recycling

* vm_page_set_validdirty() needs to flag the underlying object or
  the vfsync() code for the vnode will not know that its dirty.

* Any paging activity has to sync to swap because the kernel marks the
  VM pages as clean afterwords even if we [re]dirty them during the I/O.

  Testing the uio for UIO_NOCOPY is sufficient to detect when a tmpfs_write()
  is due to VM paging or not.

  This fixes vnode recycling - where the data is forced out to swap, and
  later can be paged back in, as well as paging due to memory pressure.

14 years agokernel - swapcache - vm_object_page_remove()
Matthew Dillon [Sat, 13 Feb 2010 08:01:13 +0000 (00:01 -0800)]
kernel - swapcache - vm_object_page_remove()

* vm_object_page_remove() may have to act on swap-backing for the VM
  object even if it contains no resident VM pages.

14 years agokernel - TMPFS - Bug fixing pass - vinitvmio(), umount, readdir
Matthew Dillon [Sat, 13 Feb 2010 07:57:53 +0000 (23:57 -0800)]
kernel - TMPFS - Bug fixing pass - vinitvmio(), umount, readdir

* Call vinitvmio() with a properly bufcache-aligned number of pages

* Do not call vinitvmio() for symlinks or directories (we don't use
  the buffer cache for those vnode types).

* Adjust tmpfs_dir_attach() and tmpfs_dir_detach() so the detach
  code can be called from umount, and call it from umount to fix
  a panic.

* tmpfs_dir_getdotdotdent() needed to be adjusted to handle the
  root vnode's NULL parent pointer.  Fixed empty root directories
  for the mount.

* Acquire TMPFS_NODE_LOCK() around opreations on dnode->tn_dir.tn_dirhead.

14 years agokernel - TMPFS - Bug fixing pass - fsync, vnode locks
Matthew Dillon [Sat, 13 Feb 2010 06:45:23 +0000 (22:45 -0800)]
kernel - TMPFS - Bug fixing pass - fsync, vnode locks

* tmpfs_fsync() needs to have a couple of special cases to properly deal
  with the backing store.

  (1) When unmounting any vnode or recycling a dead vnode the backing
      store can be destroyed.

  (2) When recycling a live vnode the OS is trying to free the vnode,
      meaning also free up the buffer cache for that vnode.  tmpfs must
      sync the data to swap backing store.

  (3) Otherwise fsync can be ignored.  We don't want to force data into
      swap.

* The DragonFly kernel handles nearly all vnode and namespace locking
  for VFSs.  If tmpfs tries to do its own it will cause deadlocks.

  At the moment we are not running MPSAFE but ultimately we will have
  to do a pass to properly lock tmpfs_nodes during operations.

14 years agokernel - TMPFS - Bug fixing pass - directory hierarchy
Matthew Dillon [Sat, 13 Feb 2010 06:16:35 +0000 (22:16 -0800)]
kernel - TMPFS - Bug fixing pass - directory hierarchy

* Adjust parent linkages for directories.  The root node's parent
  linkage is now set to NULL instead of a self-reference.  The
  root node is given just one extra link count to hold it instead
  of two.

* List operations on tmpfs_mount->tn_entries are now protected
  by TMPFS_LOCK.

* Hold a node locked when calling tmpfs_free_node().  The function
  will eat the lock.

* Do a better job cleaning up dirent and node structures when freeing.
  The ctor function is only called on backing store allocations, not
  on frontend objcache allocations.

  Misinitialized previously freed structures created some amount of
  havoc.

* Remove unnecessary critical sections.

* Refactor the umount code to properly clean up all nodes, and in
  the correct order.  Remove tmpfs_free_node() hacks that tried
  to allow out-of-order removal.

14 years agokernel - fix bug in objcache_destroy()
Matthew Dillon [Sat, 13 Feb 2010 06:06:06 +0000 (22:06 -0800)]
kernel - fix bug in objcache_destroy()

* objcache_destroy() calls mag_purge() which cycles the critical
  section, except objecache_destroy() never entered into a critical
  section so this panics instead.

14 years agokernel - TMPFS - Bug fixing pass
Matthew Dillon [Sat, 13 Feb 2010 03:15:21 +0000 (19:15 -0800)]
kernel - TMPFS - Bug fixing pass

* TMPFS_ASSERT_ELOCKED() is called in numerous places where
  tn_vnode is not necessarily assigned, for example during
  tmpfs_nremove() after the directory entry has been cleaned out.

  Remove the assertion that tn_vnode != NULL.

* Add tmpfs_mount->tm_flags and TMPFS_FLAG_UNMOUNTING, used during
  unmounting to tell tmpfs_fsync() to throw away the contents of
  the file (normally it ignores it).  This fixes a panic on umount
  when the main kernel checks that all dirty buffers have been
  cleaned out.

* Fix two places where the wrong length for a string is
  being kmalloc()'d.  The softlink and the directory entry
  string allocations were wrong and resulted in a string
  terminator being stuffed beyond the end of the malloced
  buffer.

* Do a safety-NULL-out of a few fields after kfree()ing them.

* Refactor tmpfs_dir_lookup() a little.

* Enhance tmpfs_reg_resize() to also resize the SWAP VM object.
  Failing to do so can leave extranious swap assignments for
  deleted areas of the file which become visible again (instead
  of becoming zero-fill) if the file is then later ftruncate()d
  larger.

  Also fix the block size parameters to nvtruncbuf() and nvextendbuf().
  It must match the block size used for the buffer cache.

* Temporarily turn off all the MPSAFE flags.  Run under the BGL.

* The buffer offset (offset) in tmpfs_read() and tmpfs_write()
  can be a size_t.  It does not have to be off_t.

* tmpfs_write() was using getblk().  It actually has to use bread()
  in order to ensure that the buffer contents is valid when potentially
  doing a piecemeal write which does not cover the whole buffer.

* Refactor tmpfs_write() to leave the underlying VM pages dirty,
  except in cases the system page daemon wants to flush pages to
  clear space in ram (IO_SYNC, IO_ASYNC).  Use buwrite() to do this.

* Fix an error path in tmpfs_strategy() which was not biodone()ing
  the bio.

* tmpfs_remove() was making assumptions with regards to v->a_nch.ncp->nc_vp
  which were not correct.  The vp is not referenced and can get ripped
  out from under the caller unless properly handled.

* Fix sequencing in tmpfs_inactive().  If tn_links is 0 and the node
  is not in the middle of being allocated we can destroy it.

* Remove unnecessary vnode locks from tmpfs_reclaim().  There are also other
  vnode locks scattered around that aren't needed (for another time).

* Implement vop_bmap(), it is basically a dummy.

14 years agokernel - TMPFS - Add infrastructure to main kernel to help support TMPFS
Matthew Dillon [Sat, 13 Feb 2010 03:11:36 +0000 (19:11 -0800)]
kernel - TMPFS - Add infrastructure to main kernel to help support TMPFS

* Add buwrite(), similar to bdwrite() except it fakes the write,
  marks the pages as valid and dirty, and returns them to the VM
  system leaving the buffer cache buffer clean.

  This is used by tmpfs in tmpfs_write() and allows the entire VM page
  cache to be used to cache dirty tmpfs data instead of just the
  buffer cache.

  Also add vm_page_ste_validdirty() to suppor buwrite().

* Implement MNTK_SG_MPSAFE for future use by tmpfs.

* Fix a bug in swap_strategy().  When the entire block being
  requested is sparse (has no swap assignments) the function
  was not properly biodone()'ing the original bio after
  zero-filling the space.

14 years agokernel - TMPFS - Initial port of NetBSD's tmpfs
Matthew Dillon [Fri, 12 Feb 2010 21:46:28 +0000 (13:46 -0800)]
kernel - TMPFS - Initial port of NetBSD's tmpfs

* This is the initial pre-stabilization port of NetBSD's tmpfs,
  by Naoya Sugioka.

Submitted-by: Naoya Sugioka <naoya.sugioka@gmail.com>
14 years agoMerge branch 'master' of ssh://crater.dragonflybsd.org/repository/git/dragonfly
Matthew Dillon [Fri, 12 Feb 2010 21:35:18 +0000 (13:35 -0800)]
Merge branch 'master' of ssh://crater.dragonflybsd.org/repository/git/dragonfly

14 years agohammer - Take in account edition preferences.
Antonio Huete Jimenez [Fri, 12 Feb 2010 19:15:04 +0000 (20:15 +0100)]
hammer - Take in account edition preferences.

For viconfig directive, $EDITOR and/or $VISUAL were not
taken in account, forcing the editor to vi.

14 years agoVOP_CLOSE(9) - Remove ucred and proc arguments to VOP_CLOSE().
Joe Talbott [Fri, 12 Feb 2010 18:42:32 +0000 (13:42 -0500)]
VOP_CLOSE(9) - Remove ucred and proc arguments to VOP_CLOSE().

14 years agokernel - SWAP CACHE part 19/many - distinguish bulk data in HAMMER block dev
Matthew Dillon [Fri, 12 Feb 2010 04:54:05 +0000 (20:54 -0800)]
kernel - SWAP CACHE part 19/many - distinguish bulk data in HAMMER block dev

* Add buf->flags/B_NOTMETA, vm_page->flags/PG_NOTMETA.  If set the pages
  underlying the buffer will not be considered meta-data from the
  point of view of the swapcache.

* HAMMER must sometimes access bulk data via the block device instead of
  via a file vnode.  For example, the reblocking and mirroring code.
  We do not want this data to be misinterpreted as meta-data when
  the meta-data-only swapcache is turned on, otherwise it will blow
  out the actual meta-data in the swapcache.

  HAMMER_RECTYPE_DATA and HAMMER_RECTYPE_DB are considered normal data.
  All other record types (e.g. direntry, inode, etc) are meta-data.

14 years agoutilities - Temporary map out libevtr, ktrdump, and evtranalyze from x86_64
Matthew Dillon [Fri, 12 Feb 2010 04:51:49 +0000 (20:51 -0800)]
utilities - Temporary map out libevtr, ktrdump, and evtranalyze from x86_64

* Temporary adjustments to unbreak buildworld

14 years agokernel - SWAP CACHE part 18/many - Minor enablement swapspace check
Matthew Dillon [Thu, 11 Feb 2010 20:45:39 +0000 (12:45 -0800)]
kernel - SWAP CACHE part 18/many - Minor enablement swapspace check

* The swapcache is considered disabled if no swap space has been
  configured, even if the swapcache itself is enabled.

14 years agokernel NFS - Fix another deadlock in the readdirplus code
Matthew Dillon [Thu, 11 Feb 2010 20:44:21 +0000 (12:44 -0800)]
kernel NFS - Fix another deadlock in the readdirplus code

* Add vn_islocked_unlock() and vn_islocked_relock() to help NFS
  temporarily unlock a possibly-locked directory vnode when
  trying to instantiate readdirplus children under that directory.

* Fixes a deadlock in NFS.

14 years agokernel - Fix "cleaned vnode isn't" panic
Matthew Dillon [Thu, 11 Feb 2010 20:40:45 +0000 (12:40 -0800)]
kernel - Fix "cleaned vnode isn't" panic

* Fix the "cleaned vnode isn't" panic.  This panic was occuring due to
  vrecycle() not checking for a vgone*() recursion.

  Adjust vrecycle() to check for the recursion.  The recursion can be
  detected by testing the VRECLAIMED flag.

* Under certain circumstances hammer_vop_inactive() was calling
  vrecycle().  This could cause the underlying vnode to be modified
  after it has been destroyed as the recursion returns.

* Add a KKASSERT() in vgone_vxlocked() to detect the condition
  earlier if it occurs again.

14 years agokernel - sysref - Fix vnode interlock for 1->0 transition
Matthew Dillon [Thu, 11 Feb 2010 20:38:10 +0000 (12:38 -0800)]
kernel - sysref - Fix vnode interlock for 1->0 transition

* When the vnode refcount drops to 0 vnode_terminate() is called.  This
  function previously acquired the vx_lock() after the 1->0 transition.

  Instead integrate the acquisition of the vx_lock() into the 1->0
  transition to close a small MP race.

14 years agoHAMMER Utility - cleanup
Matthew Dillon [Thu, 11 Feb 2010 17:24:12 +0000 (09:24 -0800)]
HAMMER Utility - cleanup

* Cleanup pass

14 years agoHAMMER Utility - Clean up histogram code for mirror-stream, handle SKIPs
Matthew Dillon [Thu, 11 Feb 2010 08:17:33 +0000 (00:17 -0800)]
HAMMER Utility - Clean up histogram code for mirror-stream, handle SKIPs

* Do a cleanup pass, fixing some of the verbose output

* Do not misinterpret SKIP records as REC records when estimating
  the transfer size.

* Refactor the histogram array a bit (don't reverse the array).

14 years agoHAMMER Utility - Refactor the histogram code for mirror-stream.
Matthew Dillon [Thu, 11 Feb 2010 05:13:49 +0000 (21:13 -0800)]
HAMMER Utility - Refactor the histogram code for mirror-stream.

* Refactor the histogram code.  This code is responsible for breaking
  down a large initial mirroring stream into smaller chunks so the
  transaction id can be synced more often.  This way if the stream
  is interrupted it can be restarted at a more recent point instead
  of having to restart further back (or at the beginning).

* Add -S splitsize (default 100MB) to specify the desired breakdown
  for the histogram.

14 years agoHAMMER VFS - Feature add to HAMMER_IOC_MIRROR_READ
Matthew Dillon [Thu, 11 Feb 2010 05:11:37 +0000 (21:11 -0800)]
HAMMER VFS - Feature add to HAMMER_IOC_MIRROR_READ

* Adds the HAMMER_IOC_MIRROR_NODATA flag to HAMMER_IOC_MIRROR_READ.
  This flag requests that HAMMER not return the data associated with
  b-tree records and may be used to quickly scan the b-tree.

14 years agoacpi_thermal(4): temperature support updates
Constantine A. Murenin [Thu, 11 Feb 2010 01:07:42 +0000 (20:07 -0500)]
acpi_thermal(4): temperature support updates

* reverting the last two commits for acpi_thermal.4, since now
  complete acpi temperature support is available in sysctl(8)

14 years agosysctl(8): support setting acpi temperature in K, C and F
Constantine A. Murenin [Thu, 11 Feb 2010 01:06:53 +0000 (20:06 -0500)]
sysctl(8): support setting acpi temperature in K, C and F

Obtained-from: FreeBSD (sysctl.c#rev1.94)

14 years agosysctl(8): acpi temperature support for hw.acpi.thermal
Constantine A. Murenin [Wed, 10 Feb 2010 22:45:41 +0000 (17:45 -0500)]
sysctl(8): acpi temperature support for hw.acpi.thermal

14 years agoNTFS VFS - Fix dangling vnode panic on umount
Matthew Dillon [Wed, 10 Feb 2010 18:35:32 +0000 (10:35 -0800)]
NTFS VFS - Fix dangling vnode panic on umount

* NTFS was using v_type = VNON for special extent vnodes.  The mountlist
  scan used by vflush() ignores VNON vnodes so they were left dangling
  no matter how hard ntfs tried to flush them out.

* Add VINT to the enum and use that instead.

* Fix minor case/default issue in cd9660 related to the addition of VINT.

Reported-by: Rumko, Tim Bisson <tbisson@gmx.com>
14 years agofortune(6): fortunes-o is no longer generated. Remove it from CLEANFILES.
Sascha Wildner [Wed, 10 Feb 2010 14:08:54 +0000 (15:08 +0100)]
fortune(6): fortunes-o is no longer generated. Remove it from CLEANFILES.

14 years agoMerge branch 'master' of ssh://crater.dragonflybsd.org/repository/git/dragonfly
Matthew Dillon [Wed, 10 Feb 2010 08:54:00 +0000 (00:54 -0800)]
Merge branch 'master' of ssh://crater.dragonflybsd.org/repository/git/dragonfly

14 years agokernel - SMP - "Fix AP #%d (PHY# %d) failed" issues
Matthew Dillon [Wed, 10 Feb 2010 08:45:02 +0000 (00:45 -0800)]
kernel - SMP - "Fix AP #%d (PHY# %d) failed" issues

Ok, here's what is going on.  If an SMI interrupt occurs while
an AP is going through the INIT/STARTUP IPI sequence the AP will
brick, and nothing you do will resurrect it.

BIOSes typically set up SMI interrupts when emulating (for example)
a PS/2 keyboard with a USB keyboard, or even if just implementing
BIOS support for a USB keyboard.  Even worse, the BIOS may set up
the interrupt to poll at 1000hz.  And, EVEN WORSE, it can totally
depend on which USB port you've plugged your keyboard in.  And, on top
of all of that, the SMI interrupt is not consistent.

The INIT/STARTUP code contains a 10ms delay (as per Intel spec) between
the INIT IPI and the STARTUP IPI.  Well, you can do the math.

In order to reliably boot a SMP system where the BIOS has set up
SMI interrupts this patch uses a nifty bit of code to detect when
the SMI interrupt has occurred and tries to shift the INIT/STARTUP
sequence into a gap between SMI interrupts.  If it has to it will
reduce the 10ms spec delay all the way down to 150us.  In many
cases we really have no choice for reliable operation.  Even a 300uS
delay is too much in the tests I performed on a Shuttle Phenom and
Phenom II cube.  I don't honestly know if this will break other SMP
configurations, we'll have to see.

On the particular shuttle I tested on, one of the four USB connections
on the backpanel (the upper left when looking at it from the back)
seemed to cause the BIOS to set up SMI interrupts at a high rate and
caused kernel boots to fail.  With this commit those boots now succeed.

14 years agoman4: MLINK acpi_thermal.4 acpi_tz.4
Constantine A. Murenin [Wed, 10 Feb 2010 02:43:37 +0000 (21:43 -0500)]
man4: MLINK acpi_thermal.4 acpi_tz.4

14 years agoacpi_tz(4): zero temperature in acpi refers to -273,2degC -- convert to uK appropriately
Constantine A. Murenin [Wed, 10 Feb 2010 02:37:03 +0000 (21:37 -0500)]
acpi_tz(4): zero temperature in acpi refers to -273,2degC -- convert to uK appropriately

14 years agoktrdump.8: Fix typo in xref.
Sascha Wildner [Tue, 9 Feb 2010 15:40:41 +0000 (16:40 +0100)]
ktrdump.8: Fix typo in xref.

14 years agomake upgrade: Remove obsolete fortunes2* files.
Sascha Wildner [Tue, 9 Feb 2010 15:10:11 +0000 (16:10 +0100)]
make upgrade: Remove obsolete fortunes2* files.

14 years agokernel - NFS - fix additional problems with readdirplus
Matthew Dillon [Tue, 9 Feb 2010 10:17:55 +0000 (02:17 -0800)]
kernel - NFS - fix additional problems with readdirplus

* Ok, give up trying to hack a fix for readdirplus.   Instead, do the
  fix the right by properly reordering namecache lookups and vnodes.

* Do not create a namecache entry for '.' or '..'.  These entries are
  superfluous (ignored by the lookup code).

14 years agoaibs.4: sprinkle a few markup tags
Constantine A. Murenin [Tue, 9 Feb 2010 05:11:36 +0000 (00:11 -0500)]
aibs.4: sprinkle a few markup tags

14 years agokernel - NFS - fix deadlock in NFS client-side readdirplus (part 2)
Matthew Dillon [Tue, 9 Feb 2010 08:59:42 +0000 (00:59 -0800)]
kernel - NFS - fix deadlock in NFS client-side readdirplus (part 2)

* Missed a vnode in the last commit.  Two vnodes have to potentially
  be unlocked.

14 years agokernel - NFS - fix deadlock in NFS client-side readdirplus
Matthew Dillon [Tue, 9 Feb 2010 08:46:26 +0000 (00:46 -0800)]
kernel - NFS - fix deadlock in NFS client-side readdirplus

* readdirplus holds a vnode lock while attempting to do a namecache
  lookup, which is not legal.  Unlock the vnode while doing the
  lookup.

14 years agoHAMMER VFS - Improve initial B-Tree packing
Matthew Dillon [Tue, 9 Feb 2010 08:10:26 +0000 (00:10 -0800)]
HAMMER VFS - Improve initial B-Tree packing

* Detect the case where B-Tree leafs are being laid down sequentially,
  such as when creating a large file.  When linear operation is detected
  split leafs 75:25 instead of 50:50.  This greatly improves fill ratios.

  It should be noted that the HAMMER flush sorts by inode so directory
  entries will also tend to benefit.

* This only effects (improves) the initial B-Tree layout.  The overnight
  hammer cleanup will refactor the B-Tree to a more optimal state
  regardless.

14 years agokernel - struct vm_object - increase paging_in_progress from short to int
Matthew Dillon [Tue, 9 Feb 2010 08:08:32 +0000 (00:08 -0800)]
kernel - struct vm_object - increase paging_in_progress from short to int

* Change the paging_in_progress refcount from an unsigned short to an int.
  It is potentitally possible to overflow it as a short, especially when
  many pages are rolled up into clusters.

  This changes the size of the vm_object structure.

14 years agokernel - Fix bug in cahce_fromdvp() as uesd by NFS's readdirplus
Matthew Dillon [Tue, 9 Feb 2010 08:05:55 +0000 (00:05 -0800)]
kernel - Fix bug in cahce_fromdvp() as uesd by NFS's readdirplus

* cache_fromdvp() is supposed to return a held ncp for the directory
  vnode's namecache entry if one is present and makeit is 0.  It
  was returning NULL instead.

* NFS readdirplus was kprintf()ing debug info unconditionally when
  it was able to successfully construct a vnode.  #if 0 out the
  kprintf().

14 years agokernel - slab allocator - Refactor struct kmemusage
Matthew Dillon [Tue, 9 Feb 2010 08:04:44 +0000 (00:04 -0800)]
kernel - slab allocator - Refactor struct kmemusage

* Refactor struct kmemusage to just contain a 32 bit ku_pagecnt
  instead of a 16 bit ku_pagecnt and other fields (none of which
  were used).

14 years agokernel - nata - Fix bug in SET_MULTI command
Matthew Dillon [Tue, 9 Feb 2010 08:02:19 +0000 (00:02 -0800)]
kernel - nata - Fix bug in SET_MULTI command

* The command was not properly masking atadev->param.sectors_intr,
  resulting in the setting of a value which some hard drives (OCZ SSD)
  would reject.

  This mainly just gets rid of an error message on the console.
  SET_MULTI is typically a NOP on most SATA drives.

Obtained-from: FreeBSD

14 years agoSprinkle in some commas to break out dependent clauses, and spelling fixes.
Justin C. Sherrill [Tue, 9 Feb 2010 04:34:46 +0000 (20:34 -0800)]
Sprinkle in some commas to break out dependent clauses, and spelling fixes.

14 years agodocs - More adjustments to the swapcache manual page.
Matthew Dillon [Tue, 9 Feb 2010 03:47:31 +0000 (19:47 -0800)]
docs - More adjustments to the swapcache manual page.

14 years agokernel - Remove further misuses of %ll* in kprintfs, use intmax_t
Matthew Dillon [Tue, 9 Feb 2010 01:41:10 +0000 (17:41 -0800)]
kernel - Remove further misuses of %ll* in kprintfs, use intmax_t

* In two minor places

14 years agokernel - SWAP CACHE part 17/many - Add missing critical sections
Matthew Dillon [Tue, 9 Feb 2010 01:40:00 +0000 (17:40 -0800)]
kernel - SWAP CACHE part 17/many - Add missing critical sections

* Add missing critical sections in several swap_*() procedures which
  are no longer being called with a critical section held.

14 years agokernel - SWAP CACHE part 16/many - Correct bug in kern_slaballoc.c
Matthew Dillon [Tue, 9 Feb 2010 01:37:36 +0000 (17:37 -0800)]
kernel - SWAP CACHE part 16/many - Correct bug in kern_slaballoc.c

* When kmalloc() tries to free oversized allocations it incorrectly
  dereferences a structure after it has been freed.

Reported-by: Rumko, Stathis Kamperis <beket@crater.dragonflybsd.org>
Thanks-to: Above for getting a nice kernel dump and doing some git bisecting

14 years agodocs - Improve the swapcache.8 manual page (followup)
Matthew Dillon [Mon, 8 Feb 2010 21:21:48 +0000 (13:21 -0800)]
docs - Improve the swapcache.8 manual page (followup)

* Fix endurance statements for SLC.  SLC has approximately 10x the
  endurance.  Documentation on the web is confused on this matter with
  10x and 100x both being thrown around.  We will just assume 10x
  for now.

14 years agodocs - Improve the swapcache.8 manual page
Matthew Dillon [Mon, 8 Feb 2010 21:12:55 +0000 (13:12 -0800)]
docs - Improve the swapcache.8 manual page

* Add a ton of useful information to the manual page including how to
  read the wear indicator from the SMART data.

14 years agoawk(1): Increase input field separator width.
Stathis Kamperis [Mon, 8 Feb 2010 20:49:44 +0000 (22:49 +0200)]
awk(1): Increase input field separator width.

POSIX allows -F to be an extended regular expression.
The current width of 10 chars just isn't enough.

FreeBSD changed it to 100. NetBSD has an initial value of 16,
dynamically resizable via malloc().

14 years agomount_nfs - Make rdirplus the default
Matthew Dillon [Mon, 8 Feb 2010 19:35:24 +0000 (11:35 -0800)]
mount_nfs - Make rdirplus the default

* It is really high-time we made rdirplus the default for NFS mounts.
  It improves client directory traversals by 300%.

* With a SSD meta-data swapcache on the NFS server 'disk' latencies might
  as well be 'fully cached in ram' always.  The bottleneck becomes the
  network regardless of server load.

* Note that linux also defaults to using rdirplus mounts.

14 years agokernel - Improve cluster_read()
Matthew Dillon [Mon, 8 Feb 2010 17:51:05 +0000 (09:51 -0800)]
kernel - Improve cluster_read()

* The cluster_read() code was tripping over itself due to a findblk()
  call which caused it to believe it had found a buffer hole when it
  really found a busy buffer.

  Redo the code to use the FINDBLK_TEST flag to locate the next buffer
  hole.  Also add a shortcut to support efficient coding for larger
  read-ahead values.

* Change the single-read-ahead in cluster_read() to a multiple-read-ahead
  based on the maxra parameter.  Before we just did a single read-ahead
  and even though this was a cluster read it still created a situation
  where the next cluster_read(0 operation would stall on previous read-ahead
  before issuing the next one.  In otherwords, it wasn't pipelining requests
  as well asit could.

  This change tries to keep at least two read-aheads in progress so when
  the next cluster_read() stalls on the first one the second one is still
  in the pipeline after it unstalls, allowing it to issue the third one
  to keep the pipeline hot.

* These changes improve SSD swapcache operation as well as normal HD
  cluster_read() pipelining.  In addition the read-ahead is now sufficient
  to keep the pipeline hot across a 2 x Swap (interleaved) setup.

14 years agoBring in a simple event tracing library and POC utility
Aggelos Economopoulos [Mon, 8 Feb 2010 17:43:33 +0000 (19:43 +0200)]
Bring in a simple event tracing library and POC utility

- Import libevtr, a library for abstracting access to an event stream.
  libevtr uses its own dump format and can synthesize event attributes
  based on known event types.
- Modify ktrdump(8) to be able to dump an event stream to a file
  using libevtr.
- Add evtranalyze(1), a proof of concept utility to display events in
  a line-oriented text format or to generate an svg file displaying
  the events on each processor. This needs quite some work.

14 years agokernel - SWAP CACHE part 15/many - Correct bug in vm.swapcache.maxfilesize
Matthew Dillon [Mon, 8 Feb 2010 07:37:53 +0000 (23:37 -0800)]
kernel - SWAP CACHE part 15/many - Correct bug in vm.swapcache.maxfilesize

* vm.swapcache.maxfilesize was being applied to meta-data as well as
  file data.  It is only supposed to be applied to regular file data.

14 years agokernel - SWAP CACHE part 14/many - Add more features, man page
Matthew Dillon [Mon, 8 Feb 2010 05:28:59 +0000 (21:28 -0800)]
kernel - SWAP CACHE part 14/many - Add more features, man page

* Implement write clustering.  Swapcache attempts to cluster writes
  for optimal matching between swap and the buffer cache.  This
  also reduces the IOPS for writes by a factor 16.  The SSD should
  be able to do write combining and erasing more optimally as well.

* Add vm.swapcache.minburst

  This ensures that curburst is allowed to recover sufficiently that
  a nice good write burst can be done, once curburst hits 0.  Otherwise
  swapcache winds up doing tiny bursts which tend to fragment the cache.

* Add vm.swapcache.maxfilesize

  If set to non-zero prevents swapcache from caching files larger than
  the specified size.  That is, swapcache will only cache smaller files.
  This is experimental because there are issues caching small files
  anyway (the vnodes get recycled too quickly).

* Allow vm.swapcache.curburst to be manually set larger than
  vm.swapcache.maxburst, so the initial load-in can be different
  from the maximum reburst.

* Adjust the code which deals with write errors on swap to ensure
  that the backing store is destroyed (because it isn't a clean copy).

14 years agofortune(6): Merge fortunes2 into regular fortunes
Ulrich Spörlein [Wed, 20 Jan 2010 10:05:47 +0000 (11:05 +0100)]
fortune(6): Merge fortunes2 into regular fortunes

- Stop special ROT13 treatment of fortunes-o. Neither murphy-o,
  fortunes2-o nor limerick were doing the same and contain even
  more possibly offensive stuff.
- Merge the spelling files for fortunes{,-o}, this improves
  maintainability in case fortunes are moved between the files
- make the installation of offensive stuff depend on
  INSTALL_OFFENSIVE_FORTUNES, like NetBSD (defaults to yes).
  Previously you had to edit the Makefile to disable this.
- Drop CVS Ids, which are no longer maintained :(

No fortunes added or removed from the pool.

14 years agofortune(6): Sync improvements with Free/Net/OpenBSD; deduplicate
Ulrich Spörlein [Sat, 9 Jan 2010 15:23:32 +0000 (16:23 +0100)]
fortune(6): Sync improvements with Free/Net/OpenBSD; deduplicate

- Typos, attributions and style improvements.
- Make attributions and style more consistent and conforming to Notes

Some of these are taken from FreeBSD, some from NetBSD and a few from
OpenBSD. Yet quite a few more are by yours truly.

Also:

- Fix typos in fortunes.sp.ok, murphy
- Remove duplicated fortunes (some where present thrice!)
  - fortunes is king and loses no cookie
  - fortunes-o contains no cookies already in fortunes
  - fortunes2-o contains no cookies already in fortunes2, fortunes or
    fortunes-o
  - fortunes2 contains no cookies already in fortunes
  - finally, cookies in fortunes2 were removed, if they were already in
    fortune-o

The reasoning for the last step is, that when fortunes2 gets merged into
fortunes, no possible offensive quotes show up there, that were already
deemed offensive and moved from fortunes to fortunes-o

- Remove some quotes from murphy-o already in other files, sort
- Remove duplicates within limerick (via OpenBSD)
- Sync startrek to NetBSD/OpenBSD; sort
- Typos in zippy

14 years agofortune(6): Fix wording and typos
Ulrich Spörlein [Sat, 9 Jan 2010 10:35:53 +0000 (11:35 +0100)]
fortune(6): Fix wording and typos

- "fortunes" is the name of the default fortune file
- fix a couple of typos

14 years agolarn(6): remove unused (and stale) holidaysfile
Ulrich Spörlein [Sun, 3 Jan 2010 20:47:38 +0000 (21:47 +0100)]
larn(6): remove unused (and stale) holidaysfile

Besides, there's no apparent code that acutally uses this.

14 years agokmapinfo - Adjustments to debug utility
Matthew Dillon [Sat, 6 Feb 2010 19:29:34 +0000 (11:29 -0800)]
kmapinfo - Adjustments to debug utility

* Fix up for recent kernel changes

* Properly report EMPTY gaps at the beginning and ending of the kernel_map.

14 years agokernel - SWAP CACHE part 13/many - More vm_pindex_t work for vm_objects on i386
Matthew Dillon [Sat, 6 Feb 2010 19:26:39 +0000 (11:26 -0800)]
kernel - SWAP CACHE part 13/many - More vm_pindex_t work for vm_objects on i386

* vm_object->size also needs to be a vm_pindex_t, e.g. when mmap()ing regular
  HAMMER files or block devices or HAMMER's own use of block devices,
  in order to support vm_object operations past the 16TB mark.

* Introduce a 64-bit-friendly trunc_page64() and round_page64(), just to
  make sure we don't cut off page alignment operations on 64-bit offsets.

14 years agovmstat - Adjustments for kmalloc size_t changes
Matthew Dillon [Sat, 6 Feb 2010 19:24:37 +0000 (11:24 -0800)]
vmstat - Adjustments for kmalloc size_t changes

* Adjust for changes to struct malloc_type.

* Clean up the column output.  Get rid of 'Size(s)' which is no longer
  used and increase the width of some of the fields.

14 years agokernel - More conversions to size_t in struct malloc_type
Matthew Dillon [Sat, 6 Feb 2010 19:23:21 +0000 (11:23 -0800)]
kernel - More conversions to size_t in struct malloc_type

* Missed ks_inuse.

14 years agokernel - Expand the x86_64 KVA to 8G part 2
Matthew Dillon [Sat, 6 Feb 2010 18:11:21 +0000 (10:11 -0800)]
kernel - Expand the x86_64 KVA to 8G part 2

* Fix a loop variable overflow when dumping the entire KVM space.

14 years agoMerge branch 'master' of ssh://crater.dragonflybsd.org/repository/git/dragonfly
Matthew Dillon [Sat, 6 Feb 2010 17:52:08 +0000 (09:52 -0800)]
Merge branch 'master' of ssh://crater.dragonflybsd.org/repository/git/dragonfly

14 years agokernel - Expand the x86_64 KVA to 8G
Matthew Dillon [Sat, 6 Feb 2010 17:43:06 +0000 (09:43 -0800)]
kernel - Expand the x86_64 KVA to 8G

* Our kmem_init() was mapping out the ~6G of KVA below KERNBASE.  KERNBASE
  is at the -2G mark and unlike i386 it does not mark the beginning of KVA.

  Add two more globals, virtual2_start and virtual2_end, adn adjust
  kmem_init() to use that space.  This fixes kernel_map exhaustion issues
  on x86_64.  Before the change only ~600M of KVA was available after a
  fresh boot.

* Populate the PDPs around both KERNBASE and at virtual2_start for
  bootstrapping purposes.

* Adjust kernel_vm_end to start iteration for growkernel purposes at
  VM_MIN_KERNEL_ADDRESS and no longer use it to figure out the end
  of KVM for the minidump.

  In addition, adjust minidump to dump the entire kernel virtual
  address space.

* Remove numerous extranious variables.

* Fix a bug in vm_map_insert() where vm_map->first_free was being
  incorrect set when the map does not begin with reserved space.

14 years agox86_64 kernel - Increase buffer cache and vnode resources, and more.
Matthew Dillon [Sat, 6 Feb 2010 17:13:11 +0000 (09:13 -0800)]
x86_64 kernel - Increase buffer cache and vnode resources, and more.

* Increase the maximum buffer cache from 200M to 400M.  Note that
  the buffer cache is backed by the VM page cache which is unlimited.

* Use size_t for kmalloc() tracking

* Allow 0 to be specified for kmalloc_raise_limit() which makes a
  kmalloc pool unlimited.

* Adjust the kern.maxvnodes autocalculation for both i386 and x86_64.
  i386 boxes with maximum memory will get a slightly lower vnode
  limit while x86_64 boxes will get a dramatically higher vnode limit.

* Remove kmalloc pool limits for vnodes, for HAMMER inodes, and
  for UFS inodes.  These pools track maxvnodes and do not require
  limits.

  This fixes occassional kmalloc assertions and allows the sysop to
  raise kern.maxvnodes on a running system.

14 years agokernel - Close MP race in vnode allocation code
Matthew Dillon [Sat, 6 Feb 2010 17:09:22 +0000 (09:09 -0800)]
kernel - Close MP race in vnode allocation code

* vx_lock_nonblock() is used by allocfreevnode() to interlock the
  vnode being freed.  However, this function will incorrect succeed
  on a vnode recursively held by a caller of allocfreevnode() which
  is in the middle of being reclaimed if the vnode in question
  allows LK_CANRECURSE locks in the lockinit.  UFS vnodes use this
  mechanic.

  Add a little bit of code to close the hole.

14 years agokernel - SWAP CACHE part 12/many - Add swapcache cleanup state
Matthew Dillon [Sat, 6 Feb 2010 16:57:05 +0000 (08:57 -0800)]
kernel - SWAP CACHE part 12/many - Add swapcache cleanup state

* Add a small state machine and hysteresis to flip between swapcache
  writing and swapcache cleaning.  The swapcache is written to until
  (unless) it hits 75% use.  If this occurs it switches to cleaning
  mode to get rid of swapcache pages until it gets down to 70%.  While
  in cleaning mode burst accumulation still occurs.  Then it flips back.

  Currently the cleaning mode tries to choose swap meta-blocks which
  are wholely swapped (have no VM pages), running linearly through
  the VM object list in order to try to clean contiguous areas of
  the swapcache.  The idea is to reduce fragmentation that would lead
  to excessive disk seeking.  At the same time the limited cleaning
  run (only 5% of the swap cache) should prevent any large-scale
  excessive deletion of the swapcache.

* Add a new VM object type, OBJT_MARKER, which may be used by iterators
  running through the vm_object_list.

14 years agokernel - usb keyboard - Fix polling issue on x86_64 when dropping into DDB
Matthew Dillon [Sat, 6 Feb 2010 08:26:38 +0000 (00:26 -0800)]
kernel - usb keyboard - Fix polling issue on x86_64 when dropping into DDB

* USB keyboards stop responding when x86_64 drops into DDB.  For some reason
  this does not occur on 32-bit.

  Add a missing call to usbd_dopoll() in ukbd_check() to proactively
  solve the problem.

14 years agoMerge branch 'master' of ssh://crater.dragonflybsd.org/repository/git/dragonfly
Michael Neumann [Sat, 6 Feb 2010 01:49:57 +0000 (02:49 +0100)]
Merge branch 'master' of ssh://crater.dragonflybsd.org/repository/git/dragonfly

14 years agoaac: Add PCI identifier for Adaptec RAID 5405
Michael Neumann [Sat, 6 Feb 2010 01:46:21 +0000 (02:46 +0100)]
aac: Add PCI identifier for Adaptec RAID 5405

Obtained-From: FreeBSD (aac_pci.c revision 174368)

14 years agokernel - SWAP CACHE part 11/many - Write improvements, fix backing store free
Matthew Dillon [Sat, 6 Feb 2010 00:21:10 +0000 (16:21 -0800)]
kernel - SWAP CACHE part 11/many - Write improvements, fix backing store free

* Improve write staging by not counting VM pages which already have a
  swap assignment when doing the limited scan of the INACTIVE VM page
  queue.

  As the swapcache starts to perform more and more disk I/O goes to it,
  radically increasing the data rate and also radically increasing the
  rate at which pages are shuffled between VM page queues.  At some
  point enough data is coming from the swapcache that vm.swapcache.maxlaunder
  is unable to keep up even when sufficient burst bandwidth is available.

  This led to an asymptotic caching curve.  After the fix the caching
  curve is linear (for data sets which fit in the swapcache).

* The swapcache associated with meta-data (VCHR vnodes) was not being
  destroyed on umount.  Adjust a conditional such that it is properly
  destroyed.  Otherwise stale data might be retained across e.g. a
  media change.

14 years agokernel - SWAP CACHE part 10/many - Fix swap space usage calculation
Matthew Dillon [Fri, 5 Feb 2010 18:13:51 +0000 (10:13 -0800)]
kernel - SWAP CACHE part 10/many - Fix swap space usage calculation

* The code which limits how much swap space the swap cache uses was
  broken.  It was using the current amount of free swap space instead
  of the total space, causing it to only use 40% of available swap
  instead of 66%

* Fix the calculation and also make it 3/4 (75%) of configured swap.