Commits on Oct 25, 2010
  1. dummy commit so a 2.8 commitid is at the top for tagging.

    Matthew Dillon committed Oct 25, 2010
  2. nrelease - installer - Use different emergency interrupt mechanic

    * Use a tuneable instead of a sysctl.
    Matthew Dillon committed Oct 25, 2010
  3. ehci - add missing dependency on usb driver

    YONETANI Tomokazu committed with Matthew Dillon Oct 25, 2010
  4. docs - update tuning(7)

    * Get rid of a ton of old cruft that no longer applies and replace with
      more applicable information.
    Matthew Dillon committed Oct 25, 2010
  5. Fix typo in argv handling.

    tuxillo committed with Matthew Dillon Oct 24, 2010
Commits on Oct 24, 2010
  1. kernel - Temporarily back-out smp_invltlb() changes

    * These changes are deadlocking i386 kernels, and it is too close to
      the release so back them out for the release.  The issue will be
      fixed another way post-release.
    Matthew Dillon committed Oct 24, 2010
  2. kernel - Fix bug in the emergency interrupt polling thread

    * This thread is only active when kern.emergency_intr_enable is non-zero
    * Get the next intr handler before processing the current one, since the
      act of processing the current handler may remove it.
    * In the emergency interrupt polling thread do not stall if we cannot get
      the serializer for the interrupt.  just skip the handler and we'll try
      again next time.
    Matthew Dillon committed Oct 24, 2010
  3. sysctl.conf - Enable emergency interrupt polling at a low rate by def…

    * Set kern.emergency_intr_enable=1 in the ISO/IMG sysctl.conf for
      newly installed kernels.  The idea is so people can get things working
      more quickly and worry about performance afterwords.
    * This commit actually got into the previous commit accidently so I am
      posting a following commit so we get a proper comment associated with it.
    Matthew Dillon committed Oct 24, 2010
  4. hammer utility - Add force support to cleanup

    * Allow hammer -f cleanup to override the normal timestamp checking and
      force the cleanup to run.
    Matthew Dillon committed Oct 24, 2010
  5. nrelease - Add *_GENERIC_SMP for this release

    * We will be stuffing both UP and SMP kernels on our release img/iso
      for 2.8.
    Matthew Dillon committed Oct 24, 2010
  6. nrelease - Release build adjustments

    * Add GITHOST override to Makefile.usr
    * For now checkout 2010Q3 by default in master, this will be changed
      to 'master' in a month or two but for now we want to match the release.
    * Add GITHOST feature to the nrelease Makefile, defaulting to  This allows developers who do release builds
      to specify a more local clone/mirror/copy of the pkgsrcv2.git and
      dragonfly.git repos.
      nrelease pulls from these repos so this can save a bunch of time.
    * nrelease now installs each kernel into its own kernel.XXX directory
      in /boot, with a complete set of modules for each kernel.  This is
      instead of installing all kernels into /boot/kernel/ and naming them
      differently inside /boot/kernel/.
      This is to conform to the recent dloader work and very recent new
      menu features.
    * All kernels+modules are installed with INSTALLSTRIPPEDMODULES so the
      ISO comes in at a reasonable size.
    * The release ISO now contains both a UP and a SMP kernel, selectable
      at boot time.
    * Do not try to include pkgsrc in the release ISO/IMG (at 1G+ it is too
      big).  We continue to include system sources.  There isn't enough room
      for full sources in the ISO/IMG.  Note that GUI builds will include
      a full pkgsrc and full sources, including a .git base for them.
    * nrelease now supports a IMGSIZE override on the make line (in sectors),
      for the usb image.
    * nrelease now autosizes the IMG file (when not overriden by IMGSIZE) to
      the nearest base-10 gigabyte to ensure that it fits on the USB stick
      and provide a bit of extra space for messing around.
    Matthew Dillon committed Oct 24, 2010
  7. mtree - no longer create /boot/modules

    * /boot/modules is no longer used, do not create it in mtree.
    Matthew Dillon committed Oct 24, 2010
  8. boot - Massage a bit more

    * Don't present the 64-bit / 64-bit-smp boot options if the current default
      is already 64-bit.  The generic SMP boot option will still be presented
      if the current default is the 64-bit UP kernel.
    Matthew Dillon committed Oct 24, 2010
  9. boot - Add a ton of features to the boot loader & adjust default menu

    * Add conditionals ifset ifexists else elseifexists and endif
    * Conditionalize to only present menu options for which
      the related kernels are present in /boot.
    * Set the default kernel to one of:
      kernel, kernel.GENERIC, kernel.GENERIC_SMP, kernel.X86_64_GENERIC,
      or kernel.X86_64_GENERIC_SMP.  The first one in the list found becomes
      the default.
    * If ${default_kernel}_SMP is available supply a menu option to change
      the default to that kernel, aka UP->SMP
    * If kernel.X86_64_GENERIC[_SMP] is available and the current default is
      not the same supply menu options to change the default to the 64-bit
      UP or SMP kernel.
      Note however that for this to work the related boot kernel directory
      had better have a loader.conf.local in it that points the root mount
      to a 64-bit root 'cause 64-bit kernels can't run 32 bit binaries yet.
    * Adjust the menu item execution code to copy the items before executing
      them, allowing recursive menu execution.  The recursive menu feature
      is a bit of a hack right now however.
    * NOTE: the optcd for people ESCaping into the boot prompt was moved
      to dloader.rc, when updating you may have to manually reinstall that
      file to get the functionality.
    Matthew Dillon committed Oct 24, 2010
  10. network - Fix issue with recent unix domain socket gc fixes

    * The gc's tracking of the deferral count could get out of sync and wind
      up looping forever due to the (now necessary) tsleep between loops.
    * Fix by recalculating the count on each loop.
    Matthew Dillon committed Oct 23, 2010
  11. kernel - Fix pmap deactivate/reactivation race.

    * The LWKT thread switch code clears the cpu mask bit in
      proc->p_vmspace->vm_pmap.pm_active, and the switch-in code sets the
      mask bit.
      This code has a bug because the switch code ALSO optimizes the loading
      of %cr3 to avoid reloading it if it hasn't changed, for example when
      switching between two user threads associated with the process,
      because the other cpu(s) running similar threads may lose track of
      the fact that our cpu also needs an IPI for page invalidations in the
      pmap for a short period of time.
      Because we don't reload %cr3 in this case, our tlb can become invalid.
      This can also occur with vfork() sequences.
    * Fix by testing that we are switching to the same vmspace and do not
      clear the pm_active bit in that case.  Retain the %cr3 optimization.
    Matthew Dillon committed Oct 23, 2010
  12. kernel - synchronize smp_invltlb()

    * With much of the kernel running MPSAFE, smp_invltlb() cannot run
    Matthew Dillon committed Oct 23, 2010
  13. kernel - x86_64 - Add additional checks to lwp_wait() & friends

    * lwp_wait() must defer reaping of a lwp that is still running on another
      cpu (i.e. in the midst of exiting).
    * It shouldn't be possible for this to happen but just incase the thread
      gets switched out after TDF_EXITING has been set, also make sure
      the threat is no longer on the LWKT run queue.
    * Remove old debugging in the LWKT scheduler path.
    * Protect gd_freetd (per-cpu td cache) with a critical section.  Again
      this case should not occur as new threads are not allocated from
      interrupts, but protect it anyway.  Also assert that the cached free
      td is in no way still scheduled.
      Note that this cache is required to ensure that the td does not
      end up in the MP-accessible objcache before it has been fully
    Matthew Dillon committed Oct 23, 2010
  14. kernel - x86_64 - Remove intrframe->if_gs

    * The if_gs field doesn't exist in the actual trap frame.
    Matthew Dillon committed Oct 23, 2010
  15. fix typo in previous commit

    bwalex committed with Matthew Dillon Oct 23, 2010
  16. Add comment regarding T_DNA passthrough with db

    Requested-by: Aggelos Economopoulos (aggelos@)
    bwalex committed with Matthew Dillon Oct 23, 2010
  17. libdevmapper, liblvm - stop inter-lib linking

    * Don't link libraries to other libraries, this only causes trouble like
      having to do: -lprop -ldevmapper -lprop.
    * Remove the double-linking to prop and crypto in cryptdisks.
    Suggested-by: Sascha Wildner (swildner@)
    bwalex committed with Matthew Dillon Oct 23, 2010
  18. cryptdisks rc.d - remove rcvar

    * Remove the rc variable to enable cryptdisks so that it always runs.
      It'll just check for the crypttab file, and if it isn't present, it
      doesn't do anything.
    bwalex committed with Matthew Dillon Oct 23, 2010
  19. crypttab.5 - Add LUKS-only note, remote empty line

    bwalex committed with Matthew Dillon Oct 23, 2010
  20. Fix UP kernel build.

    Sascha Wildner committed with Matthew Dillon Oct 23, 2010
  21. libkvm - Add ability to access userspace from kgdb on cores

    * Use %cr3 from the dumppcb instead of KPML4phys on x86_64, and similarly
      for i386, to access the full page table as of when the panic occured
      instead of just the kernel page table.
    * minidumps do not dump userspace so userspace will still not be available,
      but this gives us the option of sysctl'ing off minidumps when userspace
      access is desired, and kgdb will then be able to access the current
      userspace context as of the panic, as well.
    Matthew Dillon committed Oct 23, 2010
  22. device mapper - implement dumping

    * Implement dmdump and dump routines for the three main targets (linear,
      stripe and crypt).
    * The top-level dmpdump will call all the required dump() methods in the
      targets just as it does with strategy() calls. The lower level
      target-specific dump routines will then redirect (after processing,
      etc) these requests to the underlying device's dump routines.
    * This should provide quite reliable dumping even through device mapper,
      although it is more error-prone than the equivalent dumping on normal
      disks as there's a lot more going on behind the scenes.
    bwalex committed with Matthew Dillon Oct 21, 2010
  23. dm dumping - peripheral changes

    * Add a variable to allow tsleep to work even during a panic
      (tsleep_crypto_dump). This is currently only used by the crypto dump
    * Allow T_DNA faults to happen during a panic.
    * In userret() check for 'dump_stop_usertds' and if it is set, force
      user process into tstop().
    * Add a dump_reactivate_cpus() function that will force all user threads
      into tstop() and restarts all cpus. This is currently only used by the
      crypto dump code.
    bwalex committed with Matthew Dillon Oct 22, 2010
  24. dev_ddump - fix double get_mplock

    bwalex committed with Matthew Dillon Oct 21, 2010
  25. device-mapper - fix dmsize

    * dmsize was returning the size instead of setting ap->a_result and
      returning 0.
    bwalex committed with Matthew Dillon Oct 20, 2010
  26. cryptdisks - A small tool to parse /etc/crypttab

    bwalex committed with Matthew Dillon Oct 22, 2010
  27. kernel - (mainly x86_64) - Fix a number of rare races

    * Move the MP lock from outside to inside exit1(), also fixing an issue
      where sigexit() was calling exit1() without it.
    * Move calls to dsched_exit_thread() and biosched_done() out of the
      platform code and into the mainline code.  This also fixes an
      issue where the code was improperly blocking way too late in the
      thread termination code, after the point where it had been descheduled
      permanently and tsleep decomissioned for the thread.
    * Cleanup and document related code areas.
    * Fix a missing proc_token release in the SIGKILL exit path.
    * Fix FAKE_MCOUNT()s in the x86-64 code.  These are NOPs anyway
      (since kernel profiling doesn't work), but fix them anyway.
    * Use APIC_PUSH_FRAME() in the Xcpustop assembly code for x86-64
      in order to properly acquire a working %gs.  This may improve the
      handling of panic()s on x86_64.
    * Also fix some cases if #if JG'd (ifdef'd out) code in case the
      code is ever used later on.
    * Protect set_user_TLS() with a critical section to be safe.
    * Add debug code to help track down further x86-64 seg-fault issues,
      and provide better kprintf()s for the debug path in question.
    Matthew Dillon committed Oct 21, 2010
  28. dhclient - Do not remove default route unless setting a default route

    * Do not just unconditionally remove the default route.  The dhclient's
      interface might not have anything to do with the default route.
    Matthew Dillon committed Oct 20, 2010
  29. network - Fix socket & mbuf leak

    * When I retooled soabort*() and removed the wrapper I accidently lost the
      sofree() mechanic in the wrapper.
    * Replace the mechanic with a messaged version.
    Reported-by: Peter Avalos <>
    Matthew Dillon committed Oct 20, 2010
  30. debug - Add mbufinfo

    * This is a little utility which uses libkvm to scan all referenced mbufs
      in the kernel, for kernels compiled with MBUF_DEBUG.
    Matthew Dillon committed Oct 20, 2010