dragonfly.git
14 years agols(1): Remove dead initialization.
Sascha Wildner [Sat, 24 Oct 2009 08:12:52 +0000 (10:12 +0200)]
ls(1): Remove dead initialization.

14 years agocpdup(1): Remove dead initialization.
Sascha Wildner [Sat, 24 Oct 2009 08:11:58 +0000 (10:11 +0200)]
cpdup(1): Remove dead initialization.

14 years agocp(1): When continuing, badcp will be automatically set to 0.
Sascha Wildner [Sat, 24 Oct 2009 08:11:16 +0000 (10:11 +0200)]
cp(1): When continuing, badcp will be automatically set to 0.

14 years agochio(1): cesr_flags needs to be initialized before we can |= later.
Sascha Wildner [Sat, 24 Oct 2009 08:10:23 +0000 (10:10 +0200)]
chio(1): cesr_flags needs to be initialized before we can |= later.

14 years agops: print /dev/pts/* as numbers, not as "pts"
Simon Schubert [Fri, 23 Oct 2009 20:47:31 +0000 (22:47 +0200)]
ps: print /dev/pts/* as numbers, not as "pts"

14 years agoapmd(8): Fix a warning and raise WARNS to 2.
Sascha Wildner [Fri, 23 Oct 2009 18:19:20 +0000 (20:19 +0200)]
apmd(8): Fix a warning and raise WARNS to 2.

BATTTIME and BATTPERCENT are in fact int.

14 years agobsd.dep.mk: correctly sequence .depend* and generated sources
Simon Schubert [Thu, 22 Oct 2009 10:02:37 +0000 (12:02 +0200)]
bsd.dep.mk: correctly sequence .depend* and generated sources

If depend files are paritioned, we need to make sure that all .depend*
files have generated files from SRCS in their sources, otherwise a
mkdep might run before all necessary headers have been generated.

Noticed-by: swildner@
14 years agodevfs - Rework write-opening cases for disk devices.
Antonio Huete [Sun, 18 Oct 2009 14:25:04 +0000 (16:25 +0200)]
devfs - Rework write-opening cases for disk devices.

Reported-by: Jan Lentfer <Jan.Lentfer@web.de>
Dragonfly-bug: http://bugs.dragonflybsd.org/issue1570

14 years agohammer: Reverse logic in MOPT_HAMMEROPTS
Antonio Huete [Mon, 19 Oct 2009 07:21:30 +0000 (09:21 +0200)]
hammer: Reverse logic in MOPT_HAMMEROPTS

Reported-by: Jan Lentfer <Jan.Lentfer@web.de>
Dragonfly-bug: http://bugs.dragonflybsd.org/issue1569

14 years ago_timespec.h: Fix a comment
Antonio Huete Jimenez [Mon, 19 Oct 2009 14:43:49 +0000 (07:43 -0700)]
_timespec.h: Fix a comment

14 years agofortunes2: Fix typo
Sascha Wildner [Wed, 21 Oct 2009 17:56:32 +0000 (19:56 +0200)]
fortunes2: Fix typo

14 years agomake.conf.5: Remove BUGS section.
Sascha Wildner [Wed, 21 Oct 2009 17:56:03 +0000 (19:56 +0200)]
make.conf.5: Remove BUGS section.

etc/defaults/make.conf and the make.conf(5) are compared daily and
have not been out of sync for a long time.

14 years agoMerge branch 'gdb7'
Simon Schubert [Wed, 21 Oct 2009 11:38:21 +0000 (13:38 +0200)]
Merge branch 'gdb7'

14 years agorl(4): Read IDR to extract MAC address for unknown 8139 chips
Sepherosa Ziehau [Wed, 21 Oct 2009 10:48:11 +0000 (18:48 +0800)]
rl(4): Read IDR to extract MAC address for unknown 8139 chips

Obtained-from: FreeBSD
Submitted-by: Saifi Khan <saifi.khan@datasynergy.org>
14 years agobusdma: Put alignment/boundary check failure logging under bootverbose
Sepherosa Ziehau [Wed, 21 Oct 2009 10:43:55 +0000 (18:43 +0800)]
busdma: Put alignment/boundary check failure logging under bootverbose

14 years agogdb: update build infrastructure for gdb-7
Simon Schubert [Mon, 19 Oct 2009 10:47:47 +0000 (12:47 +0200)]
gdb: update build infrastructure for gdb-7

14 years agogdb: add our changes
Simon Schubert [Mon, 19 Oct 2009 11:21:34 +0000 (13:21 +0200)]
gdb: add our changes

14 years agogdb: add our READMEs
Simon Schubert [Mon, 19 Oct 2009 11:01:01 +0000 (13:01 +0200)]
gdb: add our READMEs

14 years agoMerge branch 'vendor/GDB' into gdb7
Simon Schubert [Tue, 20 Oct 2009 22:47:05 +0000 (00:47 +0200)]
Merge branch 'vendor/GDB' into gdb7

14 years agogdb: GC old versions
Simon Schubert [Mon, 19 Oct 2009 10:56:56 +0000 (12:56 +0200)]
gdb: GC old versions

14 years agoImport gdb-7.0
Simon Schubert [Mon, 19 Oct 2009 10:55:02 +0000 (12:55 +0200)]
Import gdb-7.0

14 years agoloader(8): Add multi-root selection documentation.
Antonio Huete [Tue, 20 Oct 2009 09:21:04 +0000 (11:21 +0200)]
loader(8): Add multi-root selection documentation.

14 years agoSync zoneinfo database with tzdata2009o from elsie.
Sascha Wildner [Tue, 20 Oct 2009 07:10:27 +0000 (09:10 +0200)]
Sync zoneinfo database with tzdata2009o from elsie.

asia:           8.41 -> 8.42
australasia:    8.13 -> 8.14

* Bangladesh will stay on DST until the cabinet makes a fresh decision.

* Pakistan will end DST on November 1 (instead of October 1).

* Samoa is not starting DST in 2009 (comments only).

14 years agoRoot fallback support.
Alexander Polakov [Mon, 19 Oct 2009 18:48:30 +0000 (22:48 +0400)]
Root fallback support.

vfs.root.mountfrom can now be specified as a list, separated by ';'

14 years agocore dumps: don't claim we are FreeBSD
Simon Schubert [Sat, 17 Oct 2009 12:05:08 +0000 (14:05 +0200)]
core dumps: don't claim we are FreeBSD

Our elf core dump format (slightly) changed before, and we could only
convince gdb to work nicely by changing gdb's FreeBSD support.  Now fix
it the right way by not claiming that we are FreeBSD.

At the same time, change the way tids are stored in the elf notes.  This
is actually like FreeBSD does it.

14 years agolibedit: add readline compat rl_completion_word_break_hook
Simon Schubert [Sat, 17 Oct 2009 12:03:26 +0000 (14:03 +0200)]
libedit: add readline compat rl_completion_word_break_hook

This follows roughly what is described in the readline manual.
rl_completion_word_break_hook is needed by gdb-7.

14 years agobsd.dep.mk: don't build .depend every time
Simon Schubert [Mon, 19 Oct 2009 10:29:35 +0000 (12:29 +0200)]
bsd.dep.mk: don't build .depend every time

My last commits had introduced a dependency issue which made .depend to
be built again every time.  This commit addresses this issue by not
deleting the intermediate .depend_${grp} files.

Also change the .depend generation so that no .depend__ is generated,
but output is directly sent to .depend.

14 years agotools/genreadmedeleted: chmod +x
Simon Schubert [Mon, 19 Oct 2009 10:26:36 +0000 (12:26 +0200)]
tools/genreadmedeleted: chmod +x

14 years agomq_*.2: .Nx -> .Dx
Stathis Kamperis [Mon, 19 Oct 2009 08:48:43 +0000 (11:48 +0300)]
mq_*.2: .Nx -> .Dx

14 years agomqueues: Remove left-over commented out code.
Stathis Kamperis [Sat, 17 Oct 2009 15:39:45 +0000 (18:39 +0300)]
mqueues: Remove left-over commented out code.

14 years agomqueues: Remove left-over commented out code.
Stathis Kamperis [Sat, 17 Oct 2009 15:18:59 +0000 (18:18 +0300)]
mqueues: Remove left-over commented out code.

14 years agomqueues: Remove unused variable.
Stathis Kamperis [Sat, 17 Oct 2009 14:20:06 +0000 (17:20 +0300)]
mqueues: Remove unused variable.

14 years agoHAMMER - Fix bug in 'hammer cleanup' when deleting snapshots
Matthew Dillon [Fri, 16 Oct 2009 20:45:24 +0000 (13:45 -0700)]
HAMMER - Fix bug in 'hammer cleanup' when deleting snapshots

* When deleting more then 16 snapshots the dsnapshot.count field was not
  being properly cleared, resulting in later ioctls failing.

* Adjust error and warning messages to provide the proper context.

* Do not try to delete meta-data snapshots with a transaction id of 0, just
  in case a degenerate softlink is created.  The VFS will not allow it
  and the ioctl will fail.

14 years agoHAMMER - more fixes to snapshot softlink generation
Matthew Dillon [Fri, 16 Oct 2009 20:20:06 +0000 (13:20 -0700)]
HAMMER - more fixes to snapshot softlink generation

* Instead of generating "<directory>/@@0x<transid>" we want
  to generate "<directory>@@0x<transid>" (without the /).

  Otherwise if the directory is rm -rf'd and recreated, the
  snapshot will be pointing to the wrong place.

14 years agoHAMMER - Fix 'snapq' directive - softlink constructed improperly
Matthew Dillon [Fri, 16 Oct 2009 20:14:25 +0000 (13:14 -0700)]
HAMMER - Fix 'snapq' directive - softlink constructed improperly

14 years agoHAMMER - Fix 64-bit compile-time error.
Matthew Dillon [Thu, 15 Oct 2009 17:12:55 +0000 (10:12 -0700)]
HAMMER - Fix 64-bit compile-time error.

Reported-by: "Simon 'corecode' Schubert" <corecode@fs.ei.tum.de>
14 years agosecurelevel - Fix disk accessing with high secure level.
Antonio Huete [Thu, 15 Oct 2009 11:27:18 +0000 (13:27 +0200)]
securelevel - Fix disk accessing with high secure level.

14 years agoHAMMER - Add additional warnings for v2/v3 upgrades, fix bug in snaprm
Matthew Dillon [Thu, 15 Oct 2009 01:19:15 +0000 (18:19 -0700)]
HAMMER - Add additional warnings for v2/v3 upgrades, fix bug in snaprm

* Add warnings related to backup scripts when upgrading from V2 to V3.
  The synctid directive does not generate a snapshot.  You should generate
  a real snapshot to properly track them.

  Also, removing a snapshot softlink does not remove the meta-data and
  thus the pruning code will continue to prune around that snapshot.
  The snaprm directive should be used when removing snapshot softlinks
  to also remove the meta-data.

* Snaprm now uses the current directory when removing a transaction id
  and no target directory was specified.

* Snaprm now makes it clear that a failure to remove meta-data when
  removing a softlink is just a warning, not a fatal error.

14 years agoHAMMER - Add upgrade instructions to the manual page, fix bug in snaprm
Matthew Dillon [Thu, 15 Oct 2009 01:07:01 +0000 (18:07 -0700)]
HAMMER - Add upgrade instructions to the manual page, fix bug in snaprm

* Added upgrade instructions for V1->V2 and V2->V3

* Fixed a bug when running hammer snaprm on a softlink which references
  a snapshot in a PFS other then the one containing the softlink.

14 years agoHAMMER - Enhance cleanup utility for HAMMER v3
Matthew Dillon [Thu, 15 Oct 2009 00:26:55 +0000 (17:26 -0700)]
HAMMER - Enhance cleanup utility for HAMMER v3

* For each PFS if the snapshots directory has not been overridden in
  the PFS config it will be migrated from <fs>/snapshots to
  /var/hammer/<path_from_root>.  The snapshots directory for the
  root directory itself will be called /var/hammer/root.  The old
  <fs>/snapshots directory will then removed.

  If a PFS has a snapshots directory config set no migration will
  occur.  Users can migrate it manually and then clear the snapshots
  directory in the PFS config if they desire.  We can't do it
  automatically because users might use this mechanic to mix snapshots
  with the live backup and needless to say cpdup()ing a live backup
  into /var is probably a bad idea.

* Fix a bug when generating softlinks in a directory that is not
  under the PFS being snapshotted.

* Add an optional third argument to the 'hammer snapshot' directive
  to allow a meta-data note to be specified.  The meta-data entry
  is created whether you specify a note or not.

14 years agoHAMMER - Correct bug in last commit. hammer cleanup snapshot command.
Matthew Dillon [Wed, 14 Oct 2009 20:46:22 +0000 (13:46 -0700)]
HAMMER - Correct bug in last commit.  hammer cleanup snapshot command.

* hammer cleanup was generating a bad directive when trying to run the
  snapshot command.

14 years agoHAMMER - Add version 3 meta-data features
Matthew Dillon [Wed, 14 Oct 2009 18:44:59 +0000 (11:44 -0700)]
HAMMER - Add version 3 meta-data features

* These features are available for filesystem version 3.  Version 2 may be upgraded
  to version 3 in-place.  These features are not usable until you upgrade.

* Definitively store snapshots in filesystem meta-data.  Softlinks still
  work.  The new snapshot directives (snap, snaplo, snapq, etc) also allow
  you to specify up to a 64-character note for each snapshot you create.
  The snapls directive may be used to list all snapshots stored in meta-data.

  'hammer cleanup' will move all softlink-based snapshots residing in the
  <fs>/snapshots directory to meta-data when it next snapshots the filesystem
  (within a day of upgrading, usually).   The snapshot softlinks are left intact.

  Storing snapshot information in meta-data means that accidental wipes of
  your <fs>/snapshots directory will NOT cause later hammer cleanup runs to
  destroy your snapshots!  The meta-data snapshots are also removed if you
  do a prune-everything, or through normal pruning expirations, and thus
  'hammer snapls' will definitively list your valid snapshots.

  This feature also means that you can obtain a definitive list of snapshots
  available on mirroring slaves.

* Definitively store the hammer cleanup configuration file in filesystem meta-data.
  This meta-data is not mirrored.  'hammer cleanup' will move <fs>/snapshots/config
  to the new meta-data config and deletes <fs>/snapshots/config after you've upgraded
  the filesystem.  You can edit the configuration with the 'viconfig' directive.

* The HAMMER utility has new directives:  snap, snaplo, snapq, snaprm, snapls,
  config, and viconfig.

* WARNING!  Filesystems mounted 'nohistory' and files chflagged similarly do not
  have snapshots, but the hammer utility still allows the directives to be run.
  This is a bug that needs to be fixed.

14 years agoACPICA: Unbreak ACPI_DEBUG_CACHE support
Sepherosa Ziehau [Wed, 14 Oct 2009 16:07:52 +0000 (00:07 +0800)]
ACPICA: Unbreak ACPI_DEBUG_CACHE support

14 years agoACPI C-STATE: Function renaming
Sepherosa Ziehau [Sun, 11 Oct 2009 05:04:07 +0000 (13:04 +0800)]
ACPI C-STATE: Function renaming

14 years agomessage queue manpages: Fix section numbers (3 -> 2).
Sascha Wildner [Tue, 13 Oct 2009 23:22:58 +0000 (01:22 +0200)]
message queue manpages: Fix section numbers (3 -> 2).

14 years agoRemove machdep.msgbuf, machdep.msgbuf_clear.
Alexander Polakov [Tue, 13 Oct 2009 18:34:18 +0000 (22:34 +0400)]
Remove machdep.msgbuf, machdep.msgbuf_clear.

There're no consumers in base and nothing machine-dependent in code.

14 years agoboot - tftp - Fix bzero() with wild length field.
Matthew Dillon [Mon, 12 Oct 2009 23:46:32 +0000 (16:46 -0700)]
boot - tftp - Fix bzero() with wild length field.

Reported-by: swildner
14 years agolibcam: Remove dead assignment.
Sascha Wildner [Mon, 12 Oct 2009 22:31:27 +0000 (00:31 +0200)]
libcam: Remove dead assignment.

14 years agolibutil: Miscellaneous cleanup.
Sascha Wildner [Mon, 12 Oct 2009 21:56:15 +0000 (23:56 +0200)]
libutil: Miscellaneous cleanup.

* In setusercontext(), pwd is not guaranteed to be non-NULL if
  LOGIN_SETPRIORITY is in flags. Therefore, don't use it in the
  syslog() call.

* Remove some dead assignments.

14 years agouuidgen.2: Include <sys/types.h> for <sys/uuid.h>.
Sascha Wildner [Mon, 12 Oct 2009 19:07:54 +0000 (21:07 +0200)]
uuidgen.2: Include <sys/types.h> for <sys/uuid.h>.

14 years agousbhid.3: Use standard types.
Sascha Wildner [Mon, 12 Oct 2009 19:07:26 +0000 (21:07 +0200)]
usbhid.3: Use standard types.

14 years agoSOEKRIS: Adjust indent.
Sascha Wildner [Mon, 12 Oct 2009 12:37:04 +0000 (14:37 +0200)]
SOEKRIS: Adjust indent.

14 years agoLINT: Remove PAS_JOYSTICK_ENABLE option which doesn't exist.
Sascha Wildner [Mon, 12 Oct 2009 12:36:30 +0000 (14:36 +0200)]
LINT: Remove PAS_JOYSTICK_ENABLE option which doesn't exist.

14 years agoFreeBSD-supfile: Add 'projects'.
Sascha Wildner [Sun, 11 Oct 2009 23:30:44 +0000 (01:30 +0200)]
FreeBSD-supfile: Add 'projects'.

14 years agolibc: Do not link libgcc when building with clang.
Sascha Wildner [Sun, 11 Oct 2009 23:21:38 +0000 (01:21 +0200)]
libc: Do not link libgcc when building with clang.

14 years agolibexec/customcc: Ensure the -isysroot argument is not empty.
Sascha Wildner [Sun, 11 Oct 2009 23:20:46 +0000 (01:20 +0200)]
libexec/customcc: Ensure the -isysroot argument is not empty.

14 years agolibrt: Use WARNS in Makefile instead of tweaking CFLAGS.
Stathis Kamperis [Sun, 11 Oct 2009 22:27:34 +0000 (01:27 +0300)]
librt: Use WARNS in Makefile instead of tweaking CFLAGS.

Tested with i386 and amd64.

Noticed-by: swildner@
14 years agolibrt: Remove extraneous \ in Makefile target.
Stathis Kamperis [Sun, 11 Oct 2009 21:43:16 +0000 (00:43 +0300)]
librt: Remove extraneous \ in Makefile target.

Noticed-by: swildner@
14 years agomqueues: Hook into the build system.
Stathis Kamperis [Wed, 7 Oct 2009 19:41:11 +0000 (19:41 +0000)]
mqueues: Hook into the build system.

14 years agomqueues: kdump: Ad-hoc translation for mq_open().
Stathis Kamperis [Wed, 7 Oct 2009 19:41:37 +0000 (19:41 +0000)]
mqueues: kdump: Ad-hoc translation for mq_open().

14 years agomqueues: Add librt (realtime library).
Stathis Kamperis [Wed, 7 Oct 2009 19:40:42 +0000 (19:40 +0000)]
mqueues: Add librt (realtime library).

14 years agomqueues: kern_descrip.c: Make badfo*() functions non-static.
Stathis Kamperis [Wed, 7 Oct 2009 19:42:08 +0000 (19:42 +0000)]
mqueues: kern_descrip.c: Make badfo*() functions non-static.

14 years agomqueues: vfs_subr: Add vaccess() method consumed by POSIX mqueues.
Stathis Kamperis [Wed, 7 Oct 2009 19:33:36 +0000 (19:33 +0000)]
mqueues: vfs_subr: Add vaccess() method consumed by POSIX mqueues.

There is already vop_access_helper() but operates on vnodes.

We may eventually move vaccess() to vfs_helper.c.

14 years agomqueues: Add system calls.
Stathis Kamperis [Wed, 7 Oct 2009 19:37:36 +0000 (19:37 +0000)]
mqueues: Add system calls.

14 years agomqueues: Port POSIX message queues from NetBSD.
Stathis Kamperis [Wed, 7 Oct 2009 20:03:34 +0000 (20:03 +0000)]
mqueues: Port POSIX message queues from NetBSD.

14 years agoFix paren usage in <sys/mutex.h>.
Peter Avalos [Sun, 11 Oct 2009 00:21:35 +0000 (00:21 +0000)]
Fix paren usage in <sys/mutex.h>.

14 years agokernel - Improve code documentation for vnode->v_token
Matthew Dillon [Sat, 10 Oct 2009 19:16:35 +0000 (12:16 -0700)]
kernel - Improve code documentation for vnode->v_token

14 years agoNFS - Fix numerous issues with NFS root mounts, primarily for vkernels
Matthew Dillon [Sat, 10 Oct 2009 00:56:34 +0000 (17:56 -0700)]
NFS - Fix numerous issues with NFS root mounts, primarily for vkernels

vkernels do not inherit BOOTP data from PXE and because of this a number
of code paths are run which are not run in non-vkernel NFS mounts.

* Fix a kernel memory check that was failing for vkernels and causing a
  panic.

* Change the default BOOTP socket type from UDP to TCP.

* Adjust the default vfs.nfs.maxasyncbio value based on available mbuf
  clusters.  The value will be adjusted down for systems with small
  memory footprints.

  Otherwise NFS can trivially run the system out of mbufs.

* Fix bugs in the NFS BIO queueing code related to values of
  vfs.nfs.maxasyncbio lower then the maximum.

* Remove the BOOTP_NFSV3 option when probing for the type of NFS mount
  (V2 or V3).  The BOOTP_NFSV3 kernel option is no longer required for
  root mounts to default to NFSv3.

  This also works around a bug related to large write()s with NFSv2 which
  has not yet been found.

Reported-by: Rumko <rumcic@gmail.com>
14 years agoNFS - Change NFS root mount default from udp to tcp
Matthew Dillon [Sat, 10 Oct 2009 00:54:06 +0000 (17:54 -0700)]
NFS - Change NFS root mount default from udp to tcp

We previously changed the default NFS mount type to tcp.  Adjust
the default NFS root mount type to tcp as well.  UDP mounts just
do not perform well when large numbers of RPCs are allowed to run
in parallel.

14 years agoAdd a watchdog(4) manual page (from OpenBSD).
Sascha Wildner [Fri, 9 Oct 2009 19:09:01 +0000 (21:09 +0200)]
Add a watchdog(4) manual page (from OpenBSD).

14 years agorogue(6): Fix broken aliasing for -O2 or higher.
Sascha Wildner [Fri, 9 Oct 2009 18:55:05 +0000 (20:55 +0200)]
rogue(6): Fix broken aliasing for -O2 or higher.

Fix taken from OpenBSD.

Submitted-by: Ulrich Spoerlein <uqs@spoerlein.net>
Dragonfly-bug: <http://bugs.dragonflybsd.org/issue1551>

14 years agoUnbreak building vkernel by not linking against -lthread_xu.
YONETANI Tomokazu [Fri, 9 Oct 2009 15:51:12 +0000 (00:51 +0900)]
Unbreak building vkernel by not linking against -lthread_xu.

14 years agoscsi_sg - cmd is now ap->a_cmd
Alex Hornung [Fri, 9 Oct 2009 15:53:15 +0000 (16:53 +0100)]
scsi_sg - cmd is now ap->a_cmd

* the cmd parameter for an ioctl routine is in the ap ioctl_args
  structure since some time ago, so don't use the inexistant cmd
  variable for the debug kprintf.
* This solves a compilation issue when building with scsi debug.

Reported-By: Jan Lentfer
14 years agokernel - Fix TCP MSS calculation
Matthew Dillon [Thu, 8 Oct 2009 22:30:02 +0000 (15:30 -0700)]
kernel - Fix TCP MSS calculation

* When the default MSS was returned to 512 in commit bf18b4 it revealed
  a bug in the tcp_mss() function which caused DragonFly senders to
  always use a mss of 500 when sending data to non-local targets.

  Fix the negotiation to use the offered MSS for non-local targets.

14 years agokernel - Major performance changes to VM page management.
Matthew Dillon [Thu, 8 Oct 2009 21:20:13 +0000 (14:20 -0700)]
kernel - Major performance changes to VM page management.

    This commit significantly changes the way the kernel caches VM pages.
    Essentially what happens now is that vnodes and VM pages which are
    accessed often wind up in the VM active queue and last on the list
    for recyclement while vnodes and VM pages which are only accessed once
    or twice wind up on the VM inactive queue and are inserted in the middle
    of the list for recyclement.

    Previously vnodes were essentially recycled in a LRU fashion and due
    to algorithmic design issues VM pages associated with files scanned
    via open()/read() were also winding up getting recycled in a LRU
    fashion.  This caused relatively often-used data to get recycled way
    too early in the face of large filesystem scans (tar, rdist, cvs, etc).

    In the new scheme vnodes and VM pages are essentially split into two
    camps:  Those which are used often and those which are only used once
    or twice.  The ones used often wind up in the VM active queue (and
    their vnodes are last on the list of vnodes which can be recycled),
    and the ones used only once or twice wind up in the VM inactive queue.
    The cycling of a large number of files from single-use scans (tar, rdist,
    cvs, etc on large data sets) now only recycles within the inactive set
    and does not touch the active set AT ALL.  So, for example, files
    often-accessed by a shell or other programs tend to remain cached
    permanently.

    Permanance here is a relative term.  Given enough memory pressure
    such files WILL be recycled.  But single-use scans even of huge
    data sets will not create this sort of memory pressure.  Examples
    of how active VM pages and vnodes will get recycled include:

    (1) Too many pages or vnodes wind up being marked as active.
    (2) Memory pressure created by anonymous memory from running processes.

    Technical Description of changes:

    * The buffer cache is limited.  For example, on a 3G system the buffer
      cache only manages around 200MB.  The VM page cache, on the otherhand
      can cover all available memory.

      This means that data can cycle in and out of buffer cache at a much
      higher rate then it would from the VM page cache.

    * VM pages were losing their activity history (m->act_count) when
      wired to back buffer cache pages.  Because the buffer cache only
      manages around 200MB the VM pages were being cycled in and out
      of the buffer cache on a shorter time period verses how long they
      would be able to survive in the VM page queues.

      This caused VM pages to get recycled in more of a LRU fashion instead
      of based on usage, particularly the VM pages for files accessed with
      open()/read().

      VM pages now retain their activity history and it also gets updated
      even while the VM pages are owned by the buffer cache.

    * Files accessed just once, for example in a large 'tar', 'find', or 'ls',
      could cause vnodes for files accessed numerous times to get kicked out
      of the vnode free list.  This could occur due to an edge case when
      many tiny files are iterated (such as in a cvs update), on machines
      with 2G or more of memory.  In these cases the vnode cache would reach
      its maximum number of vnodes without the VM page cache ever coming
      under pressure, forcing the VM system to throw away vnodes.  The VM
      system invariably chose vnodes with small numbers of cached VM pages
      (which is what we desire), but wound up chosing them in strict LRU
      order regardless of whether the vnode was for a file accessed just
      once or for a file accessed many times.

    More technical Description of changes:

    * The buffer cache now inherits the highest m->act_count from the VM
      pages backing it, and updates its tracking b_act_count whenever the
      buffer is getblk()'d (and HAMMER does it manually for buffers
      it attaches to internal structures).

    * VAGE in the vnode->v_flag field has been changed to VAGE0 and
      VAGE1 (a 2 bit counter).  Vnodes start out marked as being fully
      aged (count of 3) and the count is decremented every time the
      vnode is opened.

    * When a vnode is placed in the vnode free list aged vnodes are
      now inserted into the middle of the list while non-aged vnodes
      are inserted at the end.  So aged vnodes get recycled first.

    * VM pages returned from the buffer cache are now placed in the
      inactive queue or the active queue based on m->act_count.  This
      works properly now that we do not lose the activity state when
      wiring and unwiring the VM page for buffer cache backings.

    * The VM system now sets a much larger inactive page target, 1/4
      of available memory.  This combined with the vnode reclamation
      algorithm which reclaims 1/10 of the active vnodes in the system
      is now responsible for regulating the distribution of 'active'
      pages verses 'inactive' pages.

      It is important to note that the inactive page target and the
      vnode reclamation algorithm sets a minimum size for pages and
      vnodes intended to be on the inactive side of the ledger.  Memory
      pressure from having too many active pages or vnodes will cause
      VM pages to move to the inactive side.  But, as already mentioned,
      the simple one-time cycling of files such as in a tar, rdist, or
      other file scan will NOT cause this sort of memory pressure.

    Negative aspects of the patch.

    * Very large data sets which might have previously fit in memory
      but do not fit in e.g. 1/2 of available memory will no longer
      be fully cached.

      This is an either-or type of deal.  We can't prevent active pages
      from getting recycled unless we reduce the amount of data we allow
      to get cached from 'one time' uses before starting to recycle that
      data.

-Matt

14 years agothread libs: also remove the static libraries from /usr/lib
Simon Schubert [Wed, 7 Oct 2009 18:37:07 +0000 (20:37 +0200)]
thread libs: also remove the static libraries from /usr/lib

This is necessary, otherwise some software might want to link to the
static libc_r.a instead of leaving it alone alltogether.

14 years agothread libs: migrate the libpthread.* symlinks on upgrade
Simon Schubert [Wed, 7 Oct 2009 18:26:05 +0000 (20:26 +0200)]
thread libs: migrate the libpthread.* symlinks on upgrade

14 years agogetopt.1: getopt is deprecated, add a reference to getopts
Simon Schubert [Wed, 7 Oct 2009 12:15:15 +0000 (14:15 +0200)]
getopt.1: getopt is deprecated, add a reference to getopts

14 years agothread libs: move libc_r and libthread_xu to /usr/lib/thread
Simon Schubert [Wed, 7 Oct 2009 00:27:42 +0000 (02:27 +0200)]
thread libs: move libc_r and libthread_xu to /usr/lib/thread

This is so that badly written programs don't mistakenly pick up either
libc_r or libthread_xu.  The only correct way to get threading support
is to link to libpthread.

By moving the underlaying thread libs to a directory that is not
searched by the linker, we can enforce this policy.

Requested-by: hasso@
14 years agoMakefile.inc1: make sure that mtree is run for quickworld
Simon Schubert [Wed, 7 Oct 2009 00:26:12 +0000 (02:26 +0200)]
Makefile.inc1: make sure that mtree is run for quickworld

We need to run mtree in case new directories are added to the hierarchy
in case these directories are also used during the build.

14 years agowatchdogd.8: Minor cleanup.
Sascha Wildner [Wed, 7 Oct 2009 12:55:54 +0000 (14:55 +0200)]
watchdogd.8: Minor cleanup.

14 years agomove struct timespec into its own header
Simon Schubert [Tue, 6 Oct 2009 23:05:56 +0000 (01:05 +0200)]
move struct timespec into its own header

sys/stat.h needs to define struct timespec without polluting the
namespace with all <time.h> content, so factor out struct timespec into
its own header and use it at the appropriate places.

14 years agorc.d/{initrandom,random}: Remove unneeded output
Thomas Nikolajsen [Sat, 18 Jul 2009 14:25:31 +0000 (16:25 +0200)]
rc.d/{initrandom,random}: Remove unneeded output

14 years agolibexec/customcc: Set up the include paths a bit better.
Sascha Wildner [Tue, 6 Oct 2009 20:38:40 +0000 (22:38 +0200)]
libexec/customcc: Set up the include paths a bit better.

Only use /usr/include and /usr/libdata/gcc41 prefixed by
${USRDATA_PREFIX}. This requires r83302 of LLVM/clang or
higher for the -nostdclanginc option.

While here, remove an 'else' I put in for debugging purposes
which is now useless.

14 years agoMake padlock(4) compileable into the kernel and add it to LINT.
Sascha Wildner [Tue, 6 Oct 2009 09:28:39 +0000 (11:28 +0200)]
Make padlock(4) compileable into the kernel and add it to LINT.

14 years agoAdd a glxsb(4) manual page.
Sascha Wildner [Tue, 6 Oct 2009 06:58:49 +0000 (08:58 +0200)]
Add a glxsb(4) manual page.

Taken-from: FreeBSD

14 years agoAdd final newline.
Sascha Wildner [Mon, 5 Oct 2009 08:45:34 +0000 (10:45 +0200)]
Add final newline.

14 years agoamd64 - mpt(4) should use {,u}int32_t for S32/U32
YONETANI Tomokazu [Mon, 5 Oct 2009 01:04:20 +0000 (10:04 +0900)]
amd64 - mpt(4) should use {,u}int32_t for S32/U32
or else it uses {,un}signed long type which is of 64bits on 64-bit platforms.

14 years agomd.4: Remove an unnecessary .Pp
Sascha Wildner [Sun, 4 Oct 2009 19:44:27 +0000 (21:44 +0200)]
md.4: Remove an unnecessary .Pp

14 years agosyscalls.master: Fix typo in comment.
Stathis Kamperis [Sun, 4 Oct 2009 19:27:56 +0000 (19:27 +0000)]
syscalls.master: Fix typo in comment.

14 years agobsd-family-tree: Update for DragonFly 2.4.
Sascha Wildner [Sun, 4 Oct 2009 15:07:53 +0000 (17:07 +0200)]
bsd-family-tree: Update for DragonFly 2.4.

Taken-from: FreeBSD

14 years agoinclude/Makefile: Revert part of the previous commit. This doesn't work.
Sascha Wildner [Sun, 4 Oct 2009 14:07:43 +0000 (16:07 +0200)]
include/Makefile: Revert part of the previous commit. This doesn't work.

14 years agoetc: no need to upgrade dma configs
Simon Schubert [Sun, 4 Oct 2009 13:36:23 +0000 (15:36 +0200)]
etc: no need to upgrade dma configs

14 years ago<crypto/rijndael.h> is now taken from sys/crypto/rijndael/.
Sascha Wildner [Sun, 4 Oct 2009 11:34:30 +0000 (13:34 +0200)]
<crypto/rijndael.h> is now taken from sys/crypto/rijndael/.

14 years agoipsec/esp: Move #include to silence 2 warnings.
Sascha Wildner [Sun, 4 Oct 2009 10:57:33 +0000 (12:57 +0200)]
ipsec/esp: Move #include to silence 2 warnings.

14 years agoubsec(4): Silence some 'unused variable' warnings.
Sascha Wildner [Sun, 4 Oct 2009 10:19:55 +0000 (12:19 +0200)]
ubsec(4): Silence some 'unused variable' warnings.

14 years agoconfig - Add new SOEKRIS config, add options to LINT
Alex Hornung [Fri, 2 Oct 2009 21:12:57 +0000 (22:12 +0100)]
config - Add new SOEKRIS config, add options to LINT

* Add a new SOEKRIS config, mostly specific to soekris net5501 but good
  as an example for an embedded system.
* Also add all the new options to LINT config

14 years agowatchdogd - Adapt to our needs
Alex Hornung [Sun, 4 Oct 2009 10:53:15 +0000 (11:53 +0100)]
watchdogd - Adapt to our needs

14 years agowatchdogd - Import from OpenBSD
Alex Hornung [Sun, 4 Oct 2009 10:27:36 +0000 (11:27 +0100)]
watchdogd - Import from OpenBSD

* Because the wdog kernel part was designed to be mostly compatible with
  OpenBSD's API, we can import watchdogd from OpenBSD and just change a
  bunch of things.

Obtained-from: OpenBSD

14 years agopc32 files/options - Update glxsb, geode
Alex Hornung [Fri, 2 Oct 2009 21:09:10 +0000 (22:09 +0100)]
pc32 files/options - Update glxsb, geode

* Add glxsb and cpu_geode options support.