dragonfly.git
4 years agoUpdate to latest changes.
Rui Paulo [Tue, 2 Mar 2010 18:23:10 +0000 (18:23 +0000)]
Update to latest changes.

4 years agoReplace an instance of ifexists.
Rui Paulo [Tue, 2 Mar 2010 18:14:38 +0000 (18:14 +0000)]
Replace an instance of ifexists.

4 years agoBring the code to support the new rc.conf wlan interface setup.
Rui Paulo [Tue, 2 Mar 2010 14:02:55 +0000 (14:02 +0000)]
Bring the code to support the new rc.conf wlan interface setup.

4 years agoSync with FreeBSD.
Rui Paulo [Mon, 1 Mar 2010 18:20:56 +0000 (18:20 +0000)]
Sync with FreeBSD.

4 years agoFix mbuf flags usage.
Rui Paulo [Mon, 1 Mar 2010 18:11:41 +0000 (18:11 +0000)]
Fix mbuf flags usage.

Submitted by: dillon

4 years agoAdd prototype for ieee80211_handoff().
Rui Paulo [Mon, 1 Mar 2010 18:11:09 +0000 (18:11 +0000)]
Add prototype for ieee80211_handoff().

4 years agoFix remaining M_NOWAIT and use ieee80211_handoff instead of if_transmit.
Rui Paulo [Fri, 26 Feb 2010 19:41:30 +0000 (19:41 +0000)]
Fix remaining M_NOWAIT and use ieee80211_handoff instead of if_transmit.

4 years agoFix M_NOWAIT usage.
Rui Paulo [Fri, 26 Feb 2010 19:30:54 +0000 (19:30 +0000)]
Fix M_NOWAIT usage.

4 years agoFix the OID_802_3_MULTICAST_LIST issue.
Rui Paulo [Fri, 26 Feb 2010 17:22:10 +0000 (17:22 +0000)]
Fix the OID_802_3_MULTICAST_LIST issue.

4 years agoAdd DragonFly keyword.
Rui Paulo [Fri, 26 Feb 2010 17:14:18 +0000 (17:14 +0000)]
Add DragonFly keyword.

4 years agoSync with FreeBSD.
Rui Paulo [Fri, 26 Feb 2010 16:25:11 +0000 (16:25 +0000)]
Sync with FreeBSD.

4 years agoFixes from Matthew Dillon:
Rui Paulo [Fri, 26 Feb 2010 16:01:14 +0000 (16:01 +0000)]
Fixes from Matthew Dillon:
o Call if_purgeq()
o introduce ieee80211_handoff() that does what if_transmit() should do

4 years agoRemove m_colapse().
Rui Paulo [Fri, 26 Feb 2010 15:58:35 +0000 (15:58 +0000)]
Remove m_colapse().

4 years agoMore DragonFlyBSD specific changes (from Matthew Dillon):
Rui Paulo [Fri, 26 Feb 2010 15:50:57 +0000 (15:50 +0000)]
More DragonFlyBSD specific changes (from Matthew Dillon):
o printf -> kprintf
o call ifq_purge()
o use bus_dmamap_load_mbuf_defrag() instead of
  bus_dmamap_load_mbuf_segment() because that makes the m_colapse()
  unecessary

4 years agoDon't return ENETDOWN if the interface is not UP. This is needed because
Rui Paulo [Fri, 26 Feb 2010 15:48:07 +0000 (15:48 +0000)]
Don't return ENETDOWN if the interface is not UP. This is needed because
wpa_supplicant needs access to bpf while the interface is down.
wpa_supplicant will later setup the interface up and running.

4 years agoRemove if_transmit().
Rui Paulo [Fri, 26 Feb 2010 15:47:28 +0000 (15:47 +0000)]
Remove if_transmit().

4 years agoAdd regdomain.xml.
Rui Paulo [Fri, 26 Feb 2010 14:54:12 +0000 (14:54 +0000)]
Add regdomain.xml.

4 years agoAdd OID_802_3_MULTICAST_LIST.
Rui Paulo [Thu, 25 Feb 2010 18:31:31 +0000 (18:31 +0000)]
Add OID_802_3_MULTICAST_LIST.

4 years agoSync with FreeBSD.
Rui Paulo [Thu, 25 Feb 2010 18:31:03 +0000 (18:31 +0000)]
Sync with FreeBSD.

4 years agoDisable hostapd for now.
Rui Paulo [Thu, 25 Feb 2010 18:30:47 +0000 (18:30 +0000)]
Disable hostapd for now.

4 years agoFirst try at porting wpa_supplicant.
Rui Paulo [Thu, 25 Feb 2010 18:30:20 +0000 (18:30 +0000)]
First try at porting wpa_supplicant.

4 years agoFix locking.
Rui Paulo [Thu, 25 Feb 2010 18:28:04 +0000 (18:28 +0000)]
Fix locking.

4 years agoFix some of the locking stuff that I have done wrong previously and use
Rui Paulo [Thu, 25 Feb 2010 18:27:32 +0000 (18:27 +0000)]
Fix some of the locking stuff that I have done wrong previously and use
condvars.

4 years agoEnable back the regdomain listing.
Rui Paulo [Thu, 25 Feb 2010 18:08:17 +0000 (18:08 +0000)]
Enable back the regdomain listing.

4 years agocondvar: add implementation
Simon Schubert [Fri, 11 Dec 2009 22:25:09 +0000 (23:25 +0100)]
condvar: add implementation

Add a small implementation of condition variables.  API design adopted
from FreeBSD.

4 years agoCheck a few pointers before dereferencing them. This is needed by the
Rui Paulo [Thu, 25 Feb 2010 16:11:30 +0000 (16:11 +0000)]
Check a few pointers before dereferencing them. This is needed by the
net80211 stack.

4 years agoAdd new net80211 and ath options.
Rui Paulo [Thu, 25 Feb 2010 12:31:11 +0000 (12:31 +0000)]
Add new net80211 and ath options.

4 years agoSync interface cloning operations with FreeBSD.
Rui Paulo [Thu, 25 Feb 2010 12:30:31 +0000 (12:30 +0000)]
Sync interface cloning operations with FreeBSD.

4 years agoUpdate.
Rui Paulo [Thu, 25 Feb 2010 11:44:32 +0000 (11:44 +0000)]
Update.

4 years agoAdd SIOCIFCREATE2.
Rui Paulo [Thu, 25 Feb 2010 11:41:59 +0000 (11:41 +0000)]
Add SIOCIFCREATE2.

4 years agoExtend if_clone by passing in a param arg in the create routine. This
Rui Paulo [Thu, 25 Feb 2010 11:41:03 +0000 (11:41 +0000)]
Extend if_clone by passing in a param arg in the create routine. This
param is only used when the ioctl is SIOCIFCREATE2.

4 years ago__DECONST lockinit arg. XXX ugly
Rui Paulo [Thu, 25 Feb 2010 11:38:28 +0000 (11:38 +0000)]
__DECONST lockinit arg. XXX ugly

4 years agoUpdate conf/files and conf/options to comply with the latest ath and
Rui Paulo [Thu, 25 Feb 2010 11:37:38 +0000 (11:37 +0000)]
Update conf/files and conf/options to comply with the latest ath and
net80211 updates.

4 years agoCouple of changes to make this build without warnings:
Rui Paulo [Thu, 25 Feb 2010 11:32:13 +0000 (11:32 +0000)]
Couple of changes to make this build without warnings:

o __DECONST second arg of lockinit() (XXX this is ugly)
o disable some DDB code while DB_SHOW_ALL_COMMAND isn't implemented.
o fix ether_sprintf again

4 years agoFrom FreeBSD: in in6_setmaxmtu() don't try to find the linkmtu if the
Rui Paulo [Thu, 25 Feb 2010 11:30:24 +0000 (11:30 +0000)]
From FreeBSD: in in6_setmaxmtu() don't try to find the linkmtu if the
ifnet has no AF_INET6 data.

4 years agoBring in m_append() from FreeBSD.
Rui Paulo [Wed, 24 Feb 2010 19:10:14 +0000 (19:10 +0000)]
Bring in m_append() from FreeBSD.

4 years agoMerge branch 'master' into net80211-update
Rui Paulo [Wed, 24 Feb 2010 15:47:06 +0000 (15:47 +0000)]
Merge branch 'master' into net80211-update

4 years agoAdd unifdef(1) to the bootstrap-tools.
Sascha Wildner [Wed, 24 Feb 2010 15:41:53 +0000 (16:41 +0100)]
Add unifdef(1) to the bootstrap-tools.

This is needed for generation of libexpat's bsdxml.h.

Reported-by: rpaulo
4 years agodevice_add_child.9: spelling and grammar
Constantine A. Murenin [Wed, 24 Feb 2010 05:06:49 +0000 (00:06 -0500)]
device_add_child.9: spelling and grammar

4 years agoRemove bogus CFLAGS.
Rui Paulo [Tue, 23 Feb 2010 22:27:24 +0000 (22:27 +0000)]
Remove bogus CFLAGS.

4 years agoAdd more libraries: libbsdxml and libsbuf.
Rui Paulo [Tue, 23 Feb 2010 22:24:24 +0000 (22:24 +0000)]
Add more libraries: libbsdxml and libsbuf.

4 years agolibraries - Add missing LIBBSDXML line.
Matthew Dillon [Tue, 23 Feb 2010 22:23:05 +0000 (14:23 -0800)]
libraries - Add missing LIBBSDXML line.

Suggested-by: rpaulo
4 years agoMerge branch 'master' into net80211-update
Rui Paulo [Tue, 23 Feb 2010 20:55:15 +0000 (20:55 +0000)]
Merge branch 'master' into net80211-update

4 years agoMy kernel config file.
Rui Paulo [Tue, 23 Feb 2010 20:52:57 +0000 (20:52 +0000)]
My kernel config file.

4 years agoAdd arpcom at the beggining of the softc and enable hal debugging.
Rui Paulo [Tue, 23 Feb 2010 20:52:08 +0000 (20:52 +0000)]
Add arpcom at the beggining of the softc and enable hal debugging.

4 years agoSync ath_rate_sample with FreeBSD.
Rui Paulo [Tue, 23 Feb 2010 20:51:45 +0000 (20:51 +0000)]
Sync ath_rate_sample with FreeBSD.

4 years agoSync ifieee80211 ifconfig code with FreeBSD.
Rui Paulo [Tue, 23 Feb 2010 20:50:30 +0000 (20:50 +0000)]
Sync ifieee80211 ifconfig code with FreeBSD.

4 years agoRegister ieee80211 l2com.
Rui Paulo [Tue, 23 Feb 2010 20:49:21 +0000 (20:49 +0000)]
Register ieee80211 l2com.

4 years agoBring if_l2com register/unregister functions from FreeBSD.
Rui Paulo [Tue, 23 Feb 2010 20:48:23 +0000 (20:48 +0000)]
Bring if_l2com register/unregister functions from FreeBSD.

4 years agotop: Fix man page
Jan Lentfer [Tue, 23 Feb 2010 19:15:27 +0000 (20:15 +0100)]
top: Fix man page

Explanation for column "C" on multi-CPU
machines was missing.

4 years agolibexpat - Fix buildworld
Matthew Dillon [Tue, 23 Feb 2010 18:41:20 +0000 (10:41 -0800)]
libexpat - Fix buildworld

* Fix library symbol.  DragonFly's /bin and /sbin are statically linked,
  we don't have or need a /lib.

4 years agolibexpat - Bring in libexpat from contrib, name it libbsdxml
Matthew Dillon [Tue, 23 Feb 2010 17:45:29 +0000 (09:45 -0800)]
libexpat - Bring in libexpat from contrib, name it libbsdxml

* Will be used in rpaulo's wifi port update.

Taken-from: FreeBSD

4 years agoMerge branch 'master' of ssh://crater.dragonflybsd.org/repository/git/dragonfly
Matthew Dillon [Tue, 23 Feb 2010 17:41:46 +0000 (09:41 -0800)]
Merge branch 'master' of ssh://crater.dragonflybsd.org/repository/git/dragonfly

4 years agocontrib/expat - Apply two vendor fixes for CVE-2009-3720.
Matthew Dillon [Tue, 23 Feb 2010 17:39:50 +0000 (09:39 -0800)]
contrib/expat - Apply two vendor fixes for CVE-2009-3720.

Taken-from: FreeBSD

4 years agocontrib/expat - Add README.DRAGONFLY
Matthew Dillon [Tue, 23 Feb 2010 17:38:19 +0000 (09:38 -0800)]
contrib/expat - Add README.DRAGONFLY

4 years agoMerge branch 'vendor/EXPAT'
Matthew Dillon [Tue, 23 Feb 2010 17:36:26 +0000 (09:36 -0800)]
Merge branch 'vendor/EXPAT'

4 years agoImport expat-2.0.1
Matthew Dillon [Tue, 23 Feb 2010 17:36:09 +0000 (09:36 -0800)]
Import expat-2.0.1

4 years agocompilers.conf.5: Add IMPLEMENTATION NOTES for some more details.
Sascha Wildner [Tue, 23 Feb 2010 17:33:45 +0000 (18:33 +0100)]
compilers.conf.5: Add IMPLEMENTATION NOTES for some more details.

4 years agotmpfs.5: Clean up SEE ALSO a bit.
Sascha Wildner [Tue, 23 Feb 2010 16:13:31 +0000 (17:13 +0100)]
tmpfs.5: Clean up SEE ALSO a bit.

4 years agoAdjust the compiler wrapper script to use pkgsrc's clang for CCVER=clang.
Sascha Wildner [Tue, 23 Feb 2010 15:09:06 +0000 (16:09 +0100)]
Adjust the compiler wrapper script to use pkgsrc's clang for CCVER=clang.

* Move the definitions for the SVN version to 'clangsvn'.

* Expand the compilers.conf(5) manual page a bit and give more (better)
  examples.

Thanks to Jim Chapman <cchapman8@cogeco.ca> for help with testing.

4 years agokernel - Fix some rare pmap races in i386 and x86_64 (followup)
Matthew Dillon [Mon, 22 Feb 2010 17:51:08 +0000 (09:51 -0800)]
kernel - Fix some rare pmap races in i386 and x86_64 (followup)

* Fix build issue with vkernels

Reported-by: corecode
4 years agoReplace bus_dmamap_load_mbuf_sg() with bus_dmamap_load_mbuf_segment().
Rui Paulo [Mon, 22 Feb 2010 16:25:57 +0000 (16:25 +0000)]
Replace bus_dmamap_load_mbuf_sg() with bus_dmamap_load_mbuf_segment().

4 years agoBring in m_colapse() from FreeBSD.
Rui Paulo [Mon, 22 Feb 2010 16:25:37 +0000 (16:25 +0000)]
Bring in m_colapse() from FreeBSD.

4 years agoswapcache - documentation update (data caching, read/write concurrency)
Matthew Dillon [Mon, 22 Feb 2010 16:23:04 +0000 (08:23 -0800)]
swapcache - documentation update (data caching, read/write concurrency)

* Update the manual page to expand on issues when caching bulk data,
  including read/write concurrency issues with SSDs.

4 years agoSync if_ath with FreeBSD.
Rui Paulo [Mon, 22 Feb 2010 16:13:12 +0000 (16:13 +0000)]
Sync if_ath with FreeBSD.

4 years agoUpdate ath_hal from FreeBSD.
Rui Paulo [Mon, 22 Feb 2010 12:01:09 +0000 (12:01 +0000)]
Update ath_hal from FreeBSD.

4 years agoMerge branch 'master' of ssh://crater.dragonflybsd.org/repository/git/dragonfly
Samuel J. Greear [Mon, 22 Feb 2010 09:00:47 +0000 (02:00 -0700)]
Merge branch 'master' of ssh://crater.dragonflybsd.org/repository/git/dragonfly

4 years agokernel - Refactor vnode_free_list, vnode reuse algorithm
Matthew Dillon [Mon, 22 Feb 2010 15:40:05 +0000 (07:40 -0800)]
kernel - Refactor vnode_free_list, vnode reuse algorithm

* Rip out most of he VAGEx stuff.  It might come back in another form
  later.

* Split the vnode_free_list into three parts, separated by two markers
  (vnode_free_mid1 and vnode_free_mid2).

* Insert vnodes on the free list based on the following.  New vnodes
  are allocated from the base of the list.

  At the HEAD - If the vnode is VRECLAIMED (i.e. dead)
  end of first section - If the vnode has no cached VM or SWAP data
  end of second section - If the vnode has cached SWAP data and no cached VM
  at the TAIL - If the vnode has cached VM data

* Implement a rover to slowly scan vnodes in the list when allocating
  and shift them to the appropriate section.  This fixes a degenerate
  condition in the placement of the markers.

* A Vnode is removed and usually immediately reinserted whenever it
  is accesesd by userland but not held open, giving us a LRU-like
  algorithm within each section of the list but non-LRU-like transits
  between sections of the list.

  Transits between sections are determined more by how the VM system
  recycles related VM cache pages.  Cached SWAP data only occurs if
  the swapcache is turned on.

* Future: Might use VAGE to implement a second go-around in the queue
  or a burst re-placement in the queue when the data set is found to
  be too big to fit.

4 years agokernel - swapcache - Fix snocache and cache flags propagation, fix PG_NOTMETA
Matthew Dillon [Mon, 22 Feb 2010 07:44:27 +0000 (23:44 -0800)]
kernel - swapcache - Fix snocache and cache flags propagation, fix PG_NOTMETA

* The namecache was not always propagating the snocache and cache
  chflags flags.  Now it is.  However, the flags no longer propagate
  across mount points.

* The vm_page PG_NOMETA flag was being improperly applied to regular
  files.  It only applies to VCHR vnodes.

* blogbench tests show significant improvement but swapcache is still
  missing some data or meta-data somewhere.

4 years agochflags, swapcache manual page updates - cache flag does not cross mounts
Matthew Dillon [Mon, 22 Feb 2010 07:42:12 +0000 (23:42 -0800)]
chflags, swapcache manual page updates - cache flag does not cross mounts

* The cache and noscache flags do not cross mount points any more.

4 years agokernel - NFS - Add the 'cache' flag to enable swapcache on a NFS mount
Matthew Dillon [Mon, 22 Feb 2010 07:40:43 +0000 (23:40 -0800)]
kernel - NFS - Add the 'cache' flag to enable swapcache on a NFS mount

* The current round of swapcache work doesn't propagate the cache flag
  across mount points so NFS needs a cache mount flag.

4 years agoTest commit
Samuel J. Greear [Mon, 22 Feb 2010 07:23:12 +0000 (00:23 -0700)]
Test commit

4 years agokernel - Remove some debug kprintf()s
Matthew Dillon [Mon, 22 Feb 2010 02:49:01 +0000 (18:49 -0800)]
kernel - Remove some debug kprintf()s

* Remove "warning, locked buf ..., race corrected" debugging kprintf.

4 years agokernel - Fix some rare pmap races in i386 and x86_64 (followup)
Matthew Dillon [Mon, 22 Feb 2010 02:47:34 +0000 (18:47 -0800)]
kernel - Fix some rare pmap races in i386 and x86_64 (followup)

* pmap_interlock_wait() is SMP-only.  Fix UP build.

* pmap_setlwpvm for i386 was missing a call to pmap_interlock_wait()

4 years agokernel - SWAP CACHE part 22/many - Fix counter overflow introduced in part 21
Matthew Dillon [Mon, 22 Feb 2010 02:33:43 +0000 (18:33 -0800)]
kernel - SWAP CACHE part 22/many - Fix counter overflow introduced in part 21

* vm_swapcache_inactive_heuristic can overflow, making it extremely negative
  and causing swapcache writing to cease for a long period of time.

* Two-in-one fix.  Check if it is too negative and reset it.  This also
  automatically adjusts the heuristic if the sysop manually changes
  the hysteresis to a smaller value.

4 years agokernel - Fix some rare pmap races in i386 and x86_64.
Matthew Dillon [Mon, 22 Feb 2010 02:23:13 +0000 (18:23 -0800)]
kernel - Fix some rare pmap races in i386 and x86_64.

* Adjust pmap_inval_init() to enter a critical section and add
  a new pmap_inval_done() function which flushes and exits it.

  It was possible for an interrupt or other preemptive action to
  come along during a pmap operation and issue its own pmap operation,
  potentially leading to races which corrupt the pmap.

  This case was tested an could actually occur, though the damage (if any)
  is unknown.  x86_64 machines have had a long standing and difficult to
  reproduce bug where a program would sometimes seg-fault for no reason.
  It is unknown whether this fixes the bug or not.

* Interlock the pmap structure when invalidating pages using a bit
  in the pm_active field.

  Check for the interlock in swtch.s when switching into threads
  and print a nice warning if it occurs.

  It was possible for one cpu to initiate a pmap modifying operation
  while another switches into a thread using the pmap the first cpu
  was in the middle of modifying.  The case is extremely rare but can
  occur if the cpu doing the modifying operation receives a SMI
  interrupt, stalling it long enough for the other cpu to switch
  into the thread and resume running in userspace.

* pmap_protect() assumed no races when clearing PG_RW and PG_M due
  to the pmap_inval operations it runs.  This should in fact be
  true with the above fixes.  However, the rest of the pmap code
  uses atomic operations so adjust pmap_protect() to also use atomic
  operations.

4 years agosetkey(8): Add missing token to fix a yacc warning.
Sascha Wildner [Mon, 22 Feb 2010 01:16:55 +0000 (02:16 +0100)]
setkey(8): Add missing token to fix a yacc warning.

4 years agoHAMMER Utility - Fix snapshots migration for non-default directories
YONETANI Tomokazu [Sun, 21 Feb 2010 22:36:59 +0000 (07:36 +0900)]
HAMMER Utility - Fix snapshots migration for non-default directories

Snapshots migration failed if the snapshots directory contained hyphens
or dots.  Also catch the case when it couldn't parse the name of a snapshot
symlink and give the operator a clue.

4 years agoMerge SUBDIRS and SUBDIRS3 and their LSYM* versions.
YONETANI Tomokazu [Sun, 21 Feb 2010 15:01:00 +0000 (00:01 +0900)]
Merge SUBDIRS and SUBDIRS3 and their LSYM* versions.
This also fixes three error messages caused by the wrong symlink
for dev/disk/mpt/mpilib, which doesn't actually belong to SUBDIRS3
because it has four directory components in the path.

4 years agokernel - TMPFS - Stabilization pass, fix assertion in nrmdir (again)
Matthew Dillon [Sun, 21 Feb 2010 19:41:03 +0000 (11:41 -0800)]
kernel - TMPFS - Stabilization pass, fix assertion in nrmdir (again)

* Oops, fix bug in last commit.  vp was garbage where it was being tested.

4 years agokernel - TMPFS - Stabilization pass, fix assertion in nrmdir
Matthew Dillon [Sun, 21 Feb 2010 16:41:15 +0000 (08:41 -0800)]
kernel - TMPFS - Stabilization pass, fix assertion in nrmdir

* Have tmpfs_nrmdir() test whether the vp is a directory and return
  the proper error before asserting that it is a directory.

* Fixes assertion panic if you attempt to rmdir a file in tmpfs.

4 years agoMerge branch 'master' of ssh://crater.dragonflybsd.org/repository/git/dragonfly
Matthew Dillon [Sun, 21 Feb 2010 16:12:15 +0000 (08:12 -0800)]
Merge branch 'master' of ssh://crater.dragonflybsd.org/repository/git/dragonfly

4 years agoaps(4): use more c99
Constantine A. Murenin [Sun, 21 Feb 2010 12:09:32 +0000 (07:09 -0500)]
aps(4): use more c99

4 years agoHAMMER - Fix mirroring between 32 and 64-bit machines
Michael Neumann [Sun, 21 Feb 2010 11:39:26 +0000 (12:39 +0100)]
HAMMER - Fix mirroring between 32 and 64-bit machines

We need to pack struct hammer_pseudofs_data as it had differing sizes
on 32-bit vs. 64-bit machines. As this structure is send over-the-wire
this lead to an early abort in the hammer mirroring code (cmd_mirror.c)
when mirroring a PFS from a 32-bit machine to a 64-bit machine or vice
versa as it sanity checks the packets it gets.

Even so the structure is stored on-media, the change in size is no
issue as the tail is zero-padded with reserved fields.

WARNING:

    After this change, mirroring between 64-bit machines predating
    this commit and updated 64-bit machines will no longer work.
    PLEASE UPDATE them all in one go or leave them unmodified.
    32-bit machines are not affected at all, as this commit does
    not change the size of the structure for 32-bit machines.

Discussed-with: Matthew Dillon

4 years agokernel - Update swapcache manual page, document meta-data/inode ratios
Matthew Dillon [Sun, 21 Feb 2010 02:41:58 +0000 (18:41 -0800)]
kernel - Update swapcache manual page, document meta-data/inode ratios

* Document the meta-data cache vs inode ratio when configuring swapcache
  for meta-data caching.

4 years agokernel - Update swapcache manual page, fix breakage in last commit
Matthew Dillon [Sun, 21 Feb 2010 02:22:12 +0000 (18:22 -0800)]
kernel - Update swapcache manual page, fix breakage in last commit

* Oops, a bunch of stuff was accidently removed in the last
  update, add it back in.

4 years agoacpi_thinkpad(4): the refresh function should be declarared as per prototype
Constantine A. Murenin [Sat, 20 Feb 2010 23:32:48 +0000 (18:32 -0500)]
acpi_thinkpad(4): the refresh function should be declarared as per prototype

* The refresh function should be static void, the inconsistency is again
  linked to 10f97674 (through bringing back the refresh function from 48cf177).

4 years agoacpi_thinkpad(4): bring back relevant changes from 20b3fb for acpi_thinkpad_refresh
Constantine A. Murenin [Sat, 20 Feb 2010 23:15:56 +0000 (18:15 -0500)]
acpi_thinkpad(4): bring back relevant changes from 20b3fb for acpi_thinkpad_refresh

4 years agoacpi_thinkpad(4): revert the half-done rename of acpi_thinkpad to acpi_ibm
Constantine A. Murenin [Sat, 20 Feb 2010 23:01:39 +0000 (18:01 -0500)]
acpi_thinkpad(4): revert the half-done rename of acpi_thinkpad to acpi_ibm

* 10f976 ("Sync ACPI with FreeBSD 7.2") from 2009-11-08 broke a number of
  functionality in acpi_thinkpad, whereas there were no interesting changes
  between acpi_ibm.c#rev1.15 and acpi_ibm.c#rev1.19 on FreeBSD
* `git show 20b3fb 32af04 10f976 acpi_thinkpad.c | patch -R -p5 acpi_thinkpad.c`
  brings us back to da42c7

4 years agokernel - TMPFS - Features, don't sync on umount, enforce snocache on root
Matthew Dillon [Sat, 20 Feb 2010 23:03:41 +0000 (15:03 -0800)]
kernel - TMPFS - Features, don't sync on umount, enforce snocache on root

* The umount code was syncing the contents of tmpfs to swap.  Fix it so it
  doesn't.

* Set the snocache flag on the tmpfs root node and silently enforce it on
  any chflags operation.  This prevents swapcache from trying to pageout
  file data from tmpfs (which is already backed by swap).

4 years agomandoc(1): Update to 1.9.15.
Sascha Wildner [Sat, 20 Feb 2010 22:35:54 +0000 (23:35 +0100)]
mandoc(1): Update to 1.9.15.

For a full list of changes, see <http://mdocml.bsd.lv/ChangeLog.html>.

Thanks-to: Kristaps Dzonsons

4 years agokernel - Update swapcache manual page
Matthew Dillon [Sat, 20 Feb 2010 20:10:27 +0000 (12:10 -0800)]
kernel - Update swapcache manual page

* The manual page is still a work in progress but I'm pushing in everything
  I learn about SSDs into it as I learn them.

  At least insofar as the Intel X25-V 40G SSD goes the vendor-specified
  40TB write endurance limit appears to assume high write magnifications
  and significant inefficiencies in write patterns.  The theoretical
  write endurance limit for this SSD with static wear leveling is 400TB.

  My expectation is a practical endurance somewhere between 150-250TB
  when configuring 32G of swap on the 40G X25-V.  The manual page will be
  updated as I get better numbers from testing.

* Specify that disklabel64 should be used when labeling a SSD, so
  the partitions are properly aligned.  Kernels as of id 4921cba1f6
  (late 2.5.x) will align the partition base for virgin disklabel64
  labels to a 1MB boundary.

  MLC flash uses 128K write blocks, SLC uses 64K.  Swapcache will write
  in 64K clusters but also tends to issue multiple linear writes, leading
  to fairly optimal SSD operation.

4 years agokernel - disklabel64 - Increase partition start alignment to 1 megabyte.
Matthew Dillon [Sat, 20 Feb 2010 18:11:28 +0000 (10:11 -0800)]
kernel - disklabel64 - Increase partition start alignment to 1 megabyte.

* Someone suggested that instead of using a 32K alignment we use a larger
  alignment.  I forgot who suggested it but after thinking about it a bit
  and messing around with swapcache on a SSD I decided it was a good idea.

  SSDs using MLC flash have a physical block size of 128K.  SLC flash has
  a physical block size of 64K.  Most typical cluster operations in
  DragonFly are 64K to 128K but clustered writes are often linear on disk
  leading to larger linear writes from the point of view of the physical
  drive's write cache.

  swapcache and swap operation tends to have even larger write linearities
  and write amplification effects on SSDs can be reduced to better than 1:2
  (verses the 1:10 the vendor typically assumes).

* Virgin disklabel64's layed down by the kernel will now align the
  start of the partition space to 1MB (1024 * 1024).  In for a penny,
  in for a pound.

* Adjust the manual page and note the benefits of using a larger alignment,
  particularly when swapcache is used with SSDs.

4 years agokernel - TMPFS - Stabilization pass, fix VM object leak, msync
Matthew Dillon [Sat, 20 Feb 2010 03:07:43 +0000 (19:07 -0800)]
kernel - TMPFS - Stabilization pass, fix VM object leak, msync

* The swap vm_object backing regular files was not being deallocated
  properly and leaked kernel memory.

* Truncate deleted files a little earlier in the INACTIVE path.

* Set MNTK_NOMSYNC.  This prevents msync(), sync(), and the
  periodic filesystem syncer from flushing pages to swap.

  VM pages related to tmpfs are only flushed based on memory
  pressure.

4 years agokernel - Add MNTK_NOMSYNC and OBJ_NOMSYNC
Matthew Dillon [Sat, 20 Feb 2010 03:05:56 +0000 (19:05 -0800)]
kernel - Add MNTK_NOMSYNC and OBJ_NOMSYNC

* Add MNTK_NOMSYNC and OBJ_NOMSYNC for tmpfs, which is used to
  disable msync operations.

4 years agousr.sbin - Include some missing programs in x86_64.
Antonio Huete Jimenez [Fri, 19 Feb 2010 18:44:34 +0000 (19:44 +0100)]
usr.sbin - Include some missing programs in x86_64.

Following programs were only in i386. Now they've been
included also in x86_64:

 apm
 apmd
 battd
 kgmon
 kgzip
 lptcontrol
 mptable
 rndcontrol
 sgsc (WARNS raised to 6)
 sicontrol
 spkrtest
 stallion (WARNS lowered)

4 years agokernel - Fix (unused) SEGEX_IDX macro
Matthew Dillon [Fri, 19 Feb 2010 20:29:31 +0000 (12:29 -0800)]
kernel - Fix (unused) SEGEX_IDX macro

* Fix missing paren in the macro.  The macro is not used but I'm going
  to keep it around anyway.

Submitted-by: Mohd Farid Kamarudin <mokamaru@gmail.com>
4 years agoHAMMER VFS - Reduce stalls during bulk file operations
Matthew Dillon [Fri, 19 Feb 2010 18:41:22 +0000 (10:41 -0800)]
HAMMER VFS - Reduce stalls during bulk file operations

* Track modifying inode operations on a per-PID basis (loosely) and
  call hammer_inode_wait_reclaims() earlier for those pids.

  The algorithm selects a wait point based on the process's perceived
  contribution to the inode load.  The greater the contribution, the
  more readily we stall the process in order to wait for related reclaims
  to process.

  Processes with lower loads have higher reclaim points and do not stall
  as readily as they did before.

* Remove waitreclaims calls based on B-Tree scans.  I'm not sure why I had
  this in there but it was creating an excessive number of unnecessary
  stalls, so if any problems crop up I'll have to find another way to deal
  with them.

* These changes (particularly the first) should reduce unnecessary stalls
  for the programs not doing heavy inode operations.  Hopefully that means
  rm -rf and tar extractions will not have as quite the detrimental effect
  on other processes as they did before.

4 years agoSeventh pass: fix callout and bpf function calls.
Rui Paulo [Fri, 19 Feb 2010 15:16:19 +0000 (15:16 +0000)]
Seventh pass: fix callout and bpf function calls.

4 years agoAdd m_align().
Rui Paulo [Fri, 19 Feb 2010 15:15:35 +0000 (15:15 +0000)]
Add m_align().