dragonfly.git
13 years agoGENERIC_SMP/X86_64_GENERIC_SMP: Properly sync for the APIC_IO removal.
Sascha Wildner [Mon, 8 Nov 2010 18:18:18 +0000 (19:18 +0100)]
GENERIC_SMP/X86_64_GENERIC_SMP: Properly sync for the APIC_IO removal.

* X86_64_GENERIC_SMP was forgotten, too (hey, we do have grep :).

* Bring back the comments in GENERIC_SMP.

* Remove some CVS IDs and trailing whitespace in other configs.

13 years agotest commit (2)
Matthew Dillon [Mon, 8 Nov 2010 18:04:42 +0000 (10:04 -0800)]
test commit (2)

13 years agotest commit v2.9.1
Matthew Dillon [Mon, 8 Nov 2010 18:03:02 +0000 (10:03 -0800)]
test commit

13 years agoacpi.4 - correct cpu_idle_hlt foo
Alex Hornung [Mon, 8 Nov 2010 07:22:20 +0000 (07:22 +0000)]
acpi.4 - correct cpu_idle_hlt foo

* According to code commnets in the machdep.c files, cpu_idle_hlt=2 is
  using ACPI sleep states. Setting it to 1 just uses the hlt
  instruction.

13 years agoGENERIC_SMP - adapt to lack of APIC_IO
Alex Hornung [Mon, 8 Nov 2010 07:10:49 +0000 (07:10 +0000)]
GENERIC_SMP - adapt to lack of APIC_IO

13 years agoMerge branch 'apic_io'
Michael Neumann [Sun, 7 Nov 2010 21:43:54 +0000 (22:43 +0100)]
Merge branch 'apic_io'

Conflicts:
sys/platform/pc64/conf/options

13 years agoRemove APIC_IO option
Michael Neumann [Sun, 7 Nov 2010 21:08:45 +0000 (22:08 +0100)]
Remove APIC_IO option

13 years agoRemove APIC_IO option
Michael Neumann [Sun, 7 Nov 2010 21:05:39 +0000 (22:05 +0100)]
Remove APIC_IO option

13 years agoRemove APIC_IO from vkernel
Michael Neumann [Sun, 7 Nov 2010 20:59:58 +0000 (21:59 +0100)]
Remove APIC_IO from vkernel

13 years agox86_64 - Get completely rid of APIC_IO
Michael Neumann [Sun, 7 Nov 2010 20:32:27 +0000 (21:32 +0100)]
x86_64 - Get completely rid of APIC_IO

For SMP kernels compile time APIC_IO option has been superseeded
by loader tunable hw.apic_io_enable which defaults to APIC I/O
enabled.

13 years agoMerge branch 'apic_io'
Michael Neumann [Sun, 7 Nov 2010 18:04:25 +0000 (19:04 +0100)]
Merge branch 'apic_io'

13 years agoHAMMER - Add hammer dedup directive and support
Matthew Dillon [Sun, 7 Nov 2010 18:03:03 +0000 (10:03 -0800)]
HAMMER - Add hammer dedup directive and support

* Adjust the utility to exit with an appropriate error if an
  attempt is made to dedup a filesystem which has not been upgraded
  to version 5.

13 years agoi386 - Get completely rid of APIC_IO
Michael Neumann [Wed, 6 Oct 2010 18:00:44 +0000 (20:00 +0200)]
i386 - Get completely rid of APIC_IO

For SMP kernels compile time APIC_IO option has been superseeded
by loader tunable hw.apic_io_enable which defaults to APIC I/O
enabled.

13 years agoHAMMER - Add hammer dedup directive and support
Matthew Dillon [Sun, 7 Nov 2010 17:46:15 +0000 (09:46 -0800)]
HAMMER - Add hammer dedup directive and support

* Minor adjustments to fix compile errors on 64-bit systems
  (printf %lld -> %jd and use intmax_t casts).

13 years agoHAMMER - Add hammer dedup filesystem version dump
Matthew Dillon [Sun, 7 Nov 2010 17:43:08 +0000 (09:43 -0800)]
HAMMER - Add hammer dedup filesystem version dump

* Require a version 5 filesystem for dedup operation.  Upgrading can be done
  in-place.  All this does is make the layer2 bytes_free field a signed
  value instead of unsigned, allowing it to go negative.

  This allows dedup to use the field to account for multiple references to
  the same block of data, causing the field to (likely) go negative.

13 years agoHAMMER - Add hammer dedup directive and support
Matthew Dillon [Sun, 7 Nov 2010 17:29:39 +0000 (09:29 -0800)]
HAMMER - Add hammer dedup directive and support

* Implements all the logic required to dedup a HAMMER filesystem.

* There is one remaining issue and that is the reblocker's propensity to
  undo de-dup's hard work in certain cases.

* Code bounty for hammer_dedup

Submitted-by: Ilya Dryomov <idryomov@gmail.com>
13 years agolibutil - Add humanize_unsigned()
Matthew Dillon [Sun, 7 Nov 2010 17:20:11 +0000 (09:20 -0800)]
libutil - Add humanize_unsigned()

* Add a humanize_unsigned() function as a companion to humanize_number()
  which does a much better job on large unsigned 64-bit quantities.

Submitted-by: Ilya Dryomov <idryomov@gmail.com>
13 years agonrelease - Add target to help w/ debugging
Matthew Dillon [Sun, 7 Nov 2010 17:14:02 +0000 (09:14 -0800)]
nrelease - Add target to help w/ debugging

* Add a nopkgs target which disables the package step, for debugging
  purposes only.

13 years agotalkd(8): Reduce diffs with FreeBSD and raise WARNS to 6.
Sascha Wildner [Sun, 7 Nov 2010 14:20:18 +0000 (15:20 +0100)]
talkd(8): Reduce diffs with FreeBSD and raise WARNS to 6.

13 years agowatchdogd(8): Remove local warning options and fix static linking.
Sascha Wildner [Sun, 7 Nov 2010 09:37:47 +0000 (10:37 +0100)]
watchdogd(8): Remove local warning options and fix static linking.

13 years agodialog(1): Remove local warning options and raise WARNS to 3.
Sascha Wildner [Sun, 7 Nov 2010 09:37:13 +0000 (10:37 +0100)]
dialog(1): Remove local warning options and raise WARNS to 3.

13 years agodialog(3): Remove __linux__ conditionals.
Sascha Wildner [Sun, 7 Nov 2010 08:47:13 +0000 (09:47 +0100)]
dialog(3): Remove __linux__ conditionals.

They are no longer needed, now that the select function that gets passed
to scandir(3) takes a const parameter.

While I'm here, remove local warning options from the Makefile and raise
WARNS to 2.

13 years agokernel - Fix spinlock held on switch
Matthew Dillon [Sat, 6 Nov 2010 17:29:46 +0000 (10:29 -0700)]
kernel - Fix spinlock held on switch

* flushbufqueues() was holding bufqspin through a buffer cache callback,
  causing a kernel panic if the callback winds up blocking.  This only
  effected UFS not HAMMER).

* Release the spinlock a little earlier so it isn't held around the callback.

* Make a minor semantics change to bio_track_wait() to deal with potential
  compiler optimizations messing up the cmpxchg loop.

Reported-by: "goetz@net-amp.com" <goetz@net-amp.com>
13 years agoumount - Remove sync() call from utility
Matthew Dillon [Sat, 6 Nov 2010 15:41:02 +0000 (08:41 -0700)]
umount - Remove sync() call from utility

* Do not call sync() unconditionally when issuing the /sbin/umount command.
  Let the kernel take care of any syncing.

* This may allow umount -f to operate better in situations where a mount
  might be stuck (such as a NFS mount), and also removes delays associated
  with scanning large numbers of vnodes on x86_64.

13 years ago<sys/cdefs.h>: Add some definitions for IEEE 1003.1-2008.
Sascha Wildner [Sat, 6 Nov 2010 05:52:17 +0000 (06:52 +0100)]
<sys/cdefs.h>: Add some definitions for IEEE 1003.1-2008.

Our default remains 200112 for now.

13 years agoinstaller: Add support for creating encrypted partitions.
Sascha Wildner [Sat, 6 Nov 2010 01:37:38 +0000 (02:37 +0100)]
installer: Add support for creating encrypted partitions.

With the exception of /boot for the HAMMER install and / for the UFS
install, allow the configuration of encryption of partitions via
checkboxes in the partition creation stage.

13 years agolibexec: Move the definition of WARNS to libexec/Makefile.inc.
Sascha Wildner [Fri, 5 Nov 2010 08:49:39 +0000 (09:49 +0100)]
libexec: Move the definition of WARNS to libexec/Makefile.inc.

This generally sets WARNS to 6 in libexec/ unless specified otherwise
in the individual Makefiles. Just like we do it in bin/, games/, sbin/,
usr.bin/ and usr.sbin/ already.

Also fix some warnings that crept up and clean up some Makefiles.

13 years ago<sys/param.h>: Bump __DragonFly_version.
Sascha Wildner [Fri, 5 Nov 2010 01:05:31 +0000 (02:05 +0100)]
<sys/param.h>: Bump __DragonFly_version.

This is just so we have something to patch against in case the
alphasort(3)/scandir(3) prototype changes require patches in
pkgsrc.

13 years agoalphasort(3)/scandir(3): Sync prototypes with POSIX.1-2008.
Sascha Wildner [Fri, 5 Nov 2010 00:28:22 +0000 (01:28 +0100)]
alphasort(3)/scandir(3): Sync prototypes with POSIX.1-2008.

These functions have been added to the latest issue (7) of the
OpenGroup specifications. Since our default still is POSIX.1-2001,
make them visible if either _POSIX_C_SOURCE >= 200809 is defined
or if _POSIX_SOURCE is not defined (which was what we had
previously). The latter condition is left in for backwards
compatibility and can be removed once we switch to 200809.
Also fix some consumers of scandir(3) which we have in base.

This fixes the build of devel/libcompizconfig.

I've checked this change with 22 out of 114 packages that use
scandir(), and aside from some warnings, there were no issues.

Reported-by: alexh
Dragonfly-bug: <http://bugs.dragonflybsd.org/issue1896>
Based-on:      FreeBSD

13 years agomkinitrd(8): Add two options for overriding the tmpdir and the bootdir.
Sascha Wildner [Wed, 3 Nov 2010 20:31:52 +0000 (21:31 +0100)]
mkinitrd(8): Add two options for overriding the tmpdir and the bootdir.

This can be useful if you're installing to a mounted partition (e.g., from
the installer).

While here, clean up a bit and add a license.

13 years agoencrypted_root.sh: Fix a typo.
Sascha Wildner [Wed, 3 Nov 2010 20:30:03 +0000 (21:30 +0100)]
encrypted_root.sh: Fix a typo.

13 years agonetwork - Add initializer for ifnet.if_groups.
Joe Talbott [Wed, 3 Nov 2010 18:29:47 +0000 (14:29 -0400)]
network - Add initializer for ifnet.if_groups.

Prevents a NULL pointer dereference when pfsync is compiled into the
kernel.

Reported-By: mat on Efnet#dragonflybsd
Tested-By: mat on Efnet#dragonflybsd
13 years agoSort SEE ALSO sections in various manual pages.
Sascha Wildner [Wed, 3 Nov 2010 06:17:45 +0000 (07:17 +0100)]
Sort SEE ALSO sections in various manual pages.

13 years agokernel: Remove a number of unnecessary use_*.h inclusions.
Sascha Wildner [Tue, 2 Nov 2010 21:22:34 +0000 (22:22 +0100)]
kernel: Remove a number of unnecessary use_*.h inclusions.

13 years agolinuxulator - remove leftover debug kprintf
Alex Hornung [Sun, 31 Oct 2010 16:00:19 +0000 (16:00 +0000)]
linuxulator - remove leftover debug kprintf

13 years agolinuxulator - sync & fix futex
Alex Hornung [Sun, 31 Oct 2010 15:59:30 +0000 (15:59 +0000)]
linuxulator - sync & fix futex

* Sync some parts (timeout) with FreeBSD-current (Obtained-from:
  FreeBSD)

* Bring in a commented-out lwkt_yield that should be necessary for
  proper operation.

13 years agolibstand - Fix CD9660 name matching code
Matthew Dillon [Tue, 2 Nov 2010 20:58:15 +0000 (13:58 -0700)]
libstand - Fix CD9660 name matching code

* The code inherited from FBsd did not properly deal with matching
  path elements after a '.'.  For example "kernel.FUBAR_XYZ" would match
  "kernel.FUBAR" on the CD.

* Fixed.

13 years agokernel - Reenable acpi sleep states
Matthew Dillon [Tue, 2 Nov 2010 20:36:46 +0000 (13:36 -0700)]
kernel - Reenable acpi sleep states

* Reenable acpi sleep state handling by default, by setting
  machdep.cpu_idle_hlt to 2 by default.

13 years agokernel - Attempt to fix lost rpc issue with NFS timeout/retry
Matthew Dillon [Tue, 2 Nov 2010 19:55:17 +0000 (12:55 -0700)]
kernel - Attempt to fix lost rpc issue with NFS timeout/retry

* An edge case in the timeout/retry code failed to pick up on
  async RPCs which are replied to while the timeout code has the
  rpc locked for retry.

Reported-by: Thomas Nikolajsen <thomas.nikolajsen@mail.dk>
13 years agonetwork - Fix missing tailq initializer for if_creategroup() API
Matthew Dillon [Tue, 2 Nov 2010 17:12:14 +0000 (10:12 -0700)]
network - Fix missing tailq initializer for if_creategroup() API

* The ifg_head list was missing its initializer, causing calls to
  if_creategroup() (e.g. by pf/pfsync) to panic the box.

13 years agonetwork - Fix netstat output missing entries
Matthew Dillon [Tue, 2 Nov 2010 05:08:35 +0000 (22:08 -0700)]
network - Fix netstat output missing entries

* netstat was missing entries due to the kernel pcb listing sysctl
  code doing a bogus generation count test which did not take into
  account pcb's which move between cpus due to e.g. a bind() operation.

Reported-by: Thomas Nikolajsen <thomas.nikolajsen@mail.dk>
13 years agodevfs - fix some issues with rules
Alex Hornung [Mon, 1 Nov 2010 20:38:14 +0000 (20:38 +0000)]
devfs - fix some issues with rules

* devfs_rule_alloc was still assuming that the rule_type and rule_cmd are not
  bit fields, but they now are.

* return error in a number of places when a null pointer or nil-length string
  is passed in.

Dragonfly-bug: http://bugs.dragonflybsd.org/issue1885
Reported-by: 'fanch'
13 years agoMerge branch 'master' of /repository/git/dragonfly
Venkatesh Srinivas [Mon, 1 Nov 2010 16:59:16 +0000 (09:59 -0700)]
Merge branch 'master' of /repository/git/dragonfly

13 years agoprocfs: Decode mount point path in /proc/<pid>/map.
Venkatesh Srinivas [Mon, 1 Nov 2010 16:57:21 +0000 (09:57 -0700)]
procfs: Decode mount point path in /proc/<pid>/map.

This will make /proc/<pid>/map output more readable on HAMMER mounts.

13 years agodocs - Update swapcache(8) manual page
Matthew Dillon [Mon, 1 Nov 2010 16:54:54 +0000 (09:54 -0700)]
docs - Update swapcache(8) manual page

* Add a section on the use of swapcache with a normal hard drive.

13 years agoSync zoneinfo database with tzdata2010o from elsie.nci.nih.gov
Sascha Wildner [Mon, 1 Nov 2010 16:32:13 +0000 (17:32 +0100)]
Sync zoneinfo database with tzdata2010o from elsie.nci.nih.gov

australasia:    8.19 -> 8.20

* Fiji ends DST in 2011 on March 6 and not on March 27.

13 years agokernel - Fix access chceck in tmpfs that prevented chroot's into it
Matthew Dillon [Mon, 1 Nov 2010 16:29:31 +0000 (09:29 -0700)]
kernel - Fix access chceck in tmpfs that prevented chroot's into it

* Fix broken code which caused access() calls into tmpfs to assume
  write permission was being requested when it was not.

Submitted-by: Rumko <rumcic@gmail.com>
13 years agokernel - Add support for the CPU_AMD64X2_INTR_SPAM option to x86_64
Matthew Dillon [Mon, 1 Nov 2010 02:43:14 +0000 (19:43 -0700)]
kernel - Add support for the CPU_AMD64X2_INTR_SPAM option to x86_64

* Copies the ACPU_AMD64X2_INTR_SPAM option from i386 so it works with
  x86_64 too.

  This options is available but probably not needed as BIOSes tend to
  configure the interrupt routing for multi-cpu cores better than they
  did when they first came out.

13 years agokernel - Do not back out critical section for exchange_scr() call
Matthew Dillon [Mon, 1 Nov 2010 02:38:46 +0000 (19:38 -0700)]
kernel - Do not back out critical section for exchange_scr() call

* The critical section may be protecting a spinlock and cannot be safely
  backed out when calling exchange_scr().

* Fixes a panic.

Reported-by: rob
13 years agokernel - Implement CHECKTIMEOUT() abstraction
Matthew Dillon [Mon, 1 Nov 2010 02:36:11 +0000 (19:36 -0700)]
kernel - Implement CHECKTIMEOUT() abstraction

* Implement a CHECKTIMEOUT() abstraction which allows us to remove retry
  counts from low level device driver loops and replace them with a
  timeout polling routine.

* Use in the keyboard code so we no longer make assumptions on how long
  it takes to inb/outb the keyboard controller.  Some BIOSes do not have
  a keyboard controller at all and emulate the ports via SMI, which is
  much much slower than accessing a real port.

13 years agokernel - Add kprintf0() (#ifdef'd out)
Matthew Dillon [Mon, 1 Nov 2010 02:34:27 +0000 (19:34 -0700)]
kernel - Add kprintf0() (#ifdef'd out)

* Add some helper code for low level early boot debugging which defaults
  to being #ifdef'd out.

13 years agokernel - Minor rerrangement to help w/ low level debugging
Matthew Dillon [Mon, 1 Nov 2010 02:32:59 +0000 (19:32 -0700)]
kernel - Minor rerrangement to help w/ low level debugging

* Rearrange one of the conditionals in kvcprintf() so the routine can be
  called in very early boot before globaldata is set up.

13 years agokernel - Fix serious issue w/ smp_invltlb(), plus other issues (3)
Matthew Dillon [Sun, 31 Oct 2010 15:52:00 +0000 (08:52 -0700)]
kernel - Fix serious issue w/ smp_invltlb(), plus other issues (3)

* splz() and doreti on both i386 and x86_64 were leaving interrupts
  disabled through calls to e.g. sched_ithd() and IPI function callbacks.

  As before this can lead to a deadlock if these functions call
  smp_invltlb() or some other cpu calls smp_invltlb() while these
  functions are spinning on a full IPIQ.

* sti in appropriate places to fix the problem.

13 years agopsm(4): Ansify a function definition.
Sascha Wildner [Sun, 31 Oct 2010 10:38:23 +0000 (11:38 +0100)]
psm(4): Ansify a function definition.

13 years agokernel: Remove most definitions of CDEV_MAJOR.
Sascha Wildner [Sun, 31 Oct 2010 10:16:26 +0000 (11:16 +0100)]
kernel: Remove most definitions of CDEV_MAJOR.

These are no longer needed since we have devfs.

A few are left in because they are added to the order in SYSINIT()s.
This needs further investigation.

13 years agoloader(8): adjustment & man update
Thomas Nikolajsen [Sat, 30 Oct 2010 07:09:52 +0000 (09:09 +0200)]
loader(8): adjustment & man update

 * add/enhance info on if*/else*/endif
 * add info on default_kernel variable
 * include more variables in kenv_vars, including autoboot_delay,
   to make setting them in loader.conf work
 * remove a few unused variables

13 years agokernel - Fix longstanding VM long-duration stall issues (2)
Matthew Dillon [Sat, 30 Oct 2010 05:46:29 +0000 (22:46 -0700)]
kernel - Fix longstanding VM long-duration stall issues (2)

* Refactor the pageout daemon's hysteresis, in particular the
  free page queue had no real hysteressis and could cause excessive
  pagedaemon wakeups.

  Use a calculation that maintains a free page queue about half the
  size of the minimum cache queue, giving us pretty good pipelining
  when a system is under constant memory pressure.

* Add a sysctl for monitoring ppwakeups (wakeups of processes waiting
  for memory).

13 years agokernel - Fix longstanding VM long-duration stall issues
Matthew Dillon [Sat, 30 Oct 2010 03:58:00 +0000 (20:58 -0700)]
kernel - Fix longstanding VM long-duration stall issues

* The pageout daemon was using the wrong wakeup metrics and essentially
  would not start cleaning out pages until after processes began to
  enter vmwait/vmrate or otherwise begin to stall due to low free memory.

* Fix the metric and also double-check every 5 seconds when the pagedaemon
  statistics wakeup occurs.

* vm.v_free_min + vm.v_cache_min may now be used to tune when the
  pagedaemon is woken up.

13 years agokernel - Get rid of kprintf0()
Matthew Dillon [Fri, 29 Oct 2010 23:55:20 +0000 (16:55 -0700)]
kernel - Get rid of kprintf0()

* This was old x86-64 debugging stuff that is no longer needed.

* Also remove some i386 leakage of the function.

Reported-by: Antonio Huete Jimenez <tuxillo@crater.dragonflybsd.org>
13 years agokernel - Make the x86-64 double-fault exception operational
Matthew Dillon [Fri, 29 Oct 2010 19:00:35 +0000 (12:00 -0700)]
kernel - Make the x86-64 double-fault exception operational

* Finish implementing the double-fault exception.  Only cpu0 implemented
  the proper interrupt stack configuration before.  Now all cpus implement
  the proper interrupt stack.

* For x86-64 use the idle thread stack for the double-fault exception
  stack for now (probably not the best idea but better than nothing).

* For both i386 and x86-64, when a double fault occurs, report whether
  it is a generic double fault or whether it is due to a kernel stack
  guard.

13 years agokernel - Increase UPAGES, add kernel stack guard page
Matthew Dillon [Fri, 29 Oct 2010 18:58:06 +0000 (11:58 -0700)]
kernel - Increase UPAGES, add kernel stack guard page

* Increase UPAGES from 3 to 4.  This is the kernel thread stack size.

* Add infrastructure to make it possible to allocate a guard page along
  with a kmem allocation and use it when allocating kernel thread stacks.

  The first page of stacks allocated this way will be non-accessible
  (hence the increase in UPAGES).

13 years agonata - properly teardown interrupts on ENXIO
Matthew Dillon [Fri, 29 Oct 2010 06:23:48 +0000 (23:23 -0700)]
nata - properly teardown interrupts on ENXIO

* When a ata controller cannot be attached (e.g. due to AHCI having
  already taken its resources) be sure to teardown and release any
  resources that had been obtained.

* This fixes a panic on certain motherboards (e.g. gigabyte / phenomX6)
  where the ata controller ENXIO'd but left interrupt handlers setup.
  An interrupt would then occur, access stale memory, and blow the machine
  up.

13 years agoboot - Multiple changes to try to make cdboot work with more bioses
Matthew Dillon [Fri, 29 Oct 2010 04:33:15 +0000 (21:33 -0700)]
boot - Multiple changes to try to make cdboot work with more bioses

* Go back to single sector read.  This seems to help gigabyte bioses
  (phenom x 6).  Multi-sector reads tend to cause reads to fail with
  a timeout for reasons unknown.

* Enable interrupts on start.

* (non operator) replace jcxz.  It's a bit unclear whether this is an
  issue or not but some assemblers do not generate the correct prefix
  for jcxz.

* Report read timeouts and delay 1 second before retrying.  At the
  very least this allows timeouts to be reported distinctly.

13 years agomake upgrade: Remove /usr/freebsd_pkg.
Sascha Wildner [Thu, 28 Oct 2010 23:21:51 +0000 (01:21 +0200)]
make upgrade: Remove /usr/freebsd_pkg.

This might still be around from dfports days on systems which were
installed a long time ago.

13 years agomake upgrade: Remove some FICL files via 'make upgrade'.
Sascha Wildner [Sun, 24 Oct 2010 23:19:03 +0000 (01:19 +0200)]
make upgrade: Remove some FICL files via 'make upgrade'.

13 years agonrelease gui - add xterm resources
Matthew Dillon [Thu, 28 Oct 2010 21:31:29 +0000 (14:31 -0700)]
nrelease gui - add xterm resources

* Add some resources for xterms

13 years agoMerge branch 'master' of ssh://crater.dragonflybsd.org/repository/git/dragonfly
Matthew Dillon [Thu, 28 Oct 2010 21:17:13 +0000 (14:17 -0700)]
Merge branch 'master' of ssh://crater.dragonflybsd.org/repository/git/dragonfly

13 years agonrelease: Add two options (dri and inet6) to the default mk.conf we supply.
Sascha Wildner [Thu, 28 Oct 2010 20:19:12 +0000 (22:19 +0200)]
nrelease: Add two options (dri and inet6) to the default mk.conf we supply.

We use them for building the packages that go to the LiveCD.

However, we don't add PKG_OPTIONS.scmgit=-scmgit-gui (used for the LiveCD's
scmgit to save space). So people who want to continue using git without X11
support will need to tweak mk.conf like before.

13 years agonrelease/installer: Rename the UP/SMP kernel directories on the LiveCD.
Sascha Wildner [Thu, 28 Oct 2010 19:43:27 +0000 (21:43 +0200)]
nrelease/installer: Rename the UP/SMP kernel directories on the LiveCD.

Changed from UP -> kernel.UP and from SMP -> kernel.SMP.

Requested-by: dillon
13 years agokernel - Fix serious issue w/ smp_invltlb(), plus other issues (2)
Matthew Dillon [Thu, 28 Oct 2010 19:36:32 +0000 (12:36 -0700)]
kernel - Fix serious issue w/ smp_invltlb(), plus other issues (2)

It looks like there are a number of additional cases where kernel threads
can wind up running with interrupts physically disabled, which can create
serious problems for smp_invltlb().

It is not entirely clear how these deadlocks occur since the IPI code does
a forced "STI" if it would otherwise loop, but there are several other
hard loops that do not:  lwkt_switch looping on a vm_token, spin locks,
and probably a few other places.

We want interrupts to be enabled in all cases where these sorts of loops
occur in order to be able to service Xinvltlb via smp_invltlb() as well
as to prevent the LAPIC interrupt queue from filling up and livelocking
something that it shouldn't.

* lwkt_preempt() must save, zero, and restore gd->gd_intr_nesting_level
  when issuing a preemption.  Otherwise it will improperly panic on
  an assertion if the preempting interrupt thread code tries to switch out.
  It is perfectly acceptable for the preempting thread to block (it just
  switches back to the thread that got preempted).

  Why the assertion was not occuring before I do not know but it is
  probably related to threads getting stuck in 'cli' mode.  The additional
  changes below appear to significantly increase the number of interrupt
  thread preemptions which succeed (lwkt.preempt_{hit,miss} counters).

* STI prior to running ithread_fast_handler() from all IDTVECs related
  to device interrupts.

* STI in Xcpustop, Xipiq, and Xtimer.  These functions can call more
  complex C code and doing so with interrupts disabled may prevent
  Xinvltlb (via smp_invltlb()) from being executed, deadlocking the
  system.

* Reorder a mfence().  Probably not needed but do it anyway.

13 years agotuning.7: Use .Dx and bump the date for the recent update.
Sascha Wildner [Thu, 28 Oct 2010 16:42:08 +0000 (18:42 +0200)]
tuning.7: Use .Dx and bump the date for the recent update.

13 years agovkernel.7: Remove the '-s labels' option from the vnconfig example.
Sascha Wildner [Thu, 28 Oct 2010 16:41:00 +0000 (18:41 +0200)]
vkernel.7: Remove the '-s labels' option from the vnconfig example.

vn(4) uses labels by default since 45e80934a8afa3af2f45a285cb65e23cd1f7e931.
It's just an oversight that it was still on the vkernel manual page.

Reported-by: Tomas Bodzar <tomas.bodzar@gmail.com>
13 years agoupgrade - Remove old mouse.h
Antonio Huete Jimenez [Sun, 17 Oct 2010 18:42:49 +0000 (20:42 +0200)]
upgrade - Remove old mouse.h

13 years agomoused(8) - Add Synaptics touchpads to the model list.
Antonio Huete Jimenez [Thu, 14 Oct 2010 19:55:01 +0000 (21:55 +0200)]
moused(8) - Add Synaptics touchpads to the model list.

Obtained-from: FreeBSD

13 years agopsm - Sync psm(4) with FreeBSD
Antonio Huete Jimenez [Tue, 12 Oct 2010 10:49:28 +0000 (12:49 +0200)]
psm - Sync psm(4) with FreeBSD

Changelog:
- Support for A4 Tech RFSW-35 mouse wheel.
- Ignore strange return values in test_aux_port()  from some laptops
  (Compaq, Toshiba, Acer).
- Support synaptics touchpad w/ many features such as supporting integrated
  wheel, up/down buttons or tapping.
- Synaptic tunables hw.psm.tap_enabled and hw.psm.synaptics_support to control
  activation and/or features like gestures.
- Fix many issues with buggy KVM switches which got the mouse confused on sync
  packets.
- ALPS glide point ID.
- Let some PS/2 mice to get directly to Explorer mode (i.e. A4Tech X-7xx)

Obtained-From: FreeBSD

13 years agomouse.h - Change to be not per-architecture.
Antonio Huete Jimenez [Mon, 11 Oct 2010 23:11:07 +0000 (01:11 +0200)]
mouse.h - Change to be not per-architecture.

As mouse.h was the same file in both architectures, and there
is no reason to have it per-platform, it has been put in sys/

13 years agokernel - Fix serious issue w/ smp_invltlb(), plus other issues.
Matthew Dillon [Thu, 28 Oct 2010 06:55:58 +0000 (23:55 -0700)]
kernel - Fix serious issue w/ smp_invltlb(), plus other issues.

* smp_invltlb() was running asynchronously when it really needs to run
  synchronously.  Generally speaking the asynchronous ipi did in fact work
  pretty well but it still presents a 1uS window of opportunity which
  bypasses normal write ordering safeties.

  Run smp_invltlb() synchronously.

* Fixing the above lea to the discovery of an ACPI issue.  The ACPI
  cpu idle halt code, at least on the gigabyte phenom x 6 I've been
  testing with, can cause IPIs to be lost.  Not just delayed, straight
  out lost.  Gone.  Poof.  It doesn't matter whether the IPI is a
  broadcast IPI or a directed IPI, it can still get lost.

  This was particularly noticeable when I fixed smp_invltlb() and my
  test box started locking up due to a random cpu sometimes not receiving
  the Xinvltlb IPI, and it is quite possible that this issue was also
  responsible for the random seg-faults we would sometimes get on 64-bit
  boxes.

  For now the acpi halt code has been disabled.  It can be enabled with
  sysctl machdep.cpu_idle_hlt=2 if you want to risk it.

* Use doreti_syscall_ret and doreti_iret in several cases that were
  previously popping the interrupt frame and iret'ing manually.  This
  is operationally equivalent.

* Add a missing "sti" in the idle loop.  Usually the cpu_idle_hook()
  deals with this but there are some alternative paths which might not,
  potentially causing interrupts to be delayed unnecessarily.
  At worst the idle thread has an extra sti in it.

* Add v_smpinvltlb to struct vmmeter, plus some reserved slots for
  future expansion.

* Adjust vmstat -s to report smpinvltlb's.

13 years agoinstaller: Install the kernel used to install the system to /boot/kernel.
Sascha Wildner [Wed, 27 Oct 2010 07:08:48 +0000 (09:08 +0200)]
installer: Install the kernel used to install the system to /boot/kernel.

We assume that the kernel the user booted the LiveCD/image with for
installing his system will be the kernel he wants to boot the system
from, too.

13 years agonrelease: Fix an annoying bug that was preventing the ISOs from booting UP.
Sascha Wildner [Wed, 27 Oct 2010 07:07:13 +0000 (09:07 +0200)]
nrelease: Fix an annoying bug that was preventing the ISOs from booting UP.

It seems our CD9660 support in libstand at least has some problems with
directory names containing dots. This prevented the LiveCD to properly
boot the UP kernel. Don't ask me about how it ended up using the SMP
kernel in this case, but that's what it did, making the UP boot
impossible. My guess is it has something to do with the order in which
stuff had been added to the ISO. But that's pure speculation. I'm not
even sure about the dot part. It might as well be directory name length.
In any case, UP boot from the LiveCD was broken.

To fix all this, install the UP kernel to /boot/UP and the SMP kernel to
/boot/SMP on the LiveCD and images. They will be picked up by the
installer from there by a separate commit.

While here, remove some non-functional code from dloader.menu. We can't
easily build i386/x86_64 dual boot ISOs at the moment (for this we would
need cross-building pkgsrc).

Thanks to sjg for bringing me on the right track.

13 years agoinstaller: Add __printflike()s and fix resulting format warnings.
Sascha Wildner [Wed, 27 Oct 2010 04:56:42 +0000 (06:56 +0200)]
installer: Add __printflike()s and fix resulting format warnings.

13 years agonrelease: Add a missing semicolon.
Sascha Wildner [Wed, 27 Oct 2010 01:45:43 +0000 (03:45 +0200)]
nrelease: Add a missing semicolon.

13 years agonrelease: Remove unused variable.
Sascha Wildner [Tue, 26 Oct 2010 18:29:18 +0000 (20:29 +0200)]
nrelease: Remove unused variable.

13 years agodloader: Fix error messages.
Sascha Wildner [Tue, 26 Oct 2010 17:20:39 +0000 (19:20 +0200)]
dloader: Fix error messages.

13 years agozic(8): Sync with tzcode2010n from elsie.nci.nih.gov
Sascha Wildner [Tue, 26 Oct 2010 13:24:31 +0000 (15:24 +0200)]
zic(8): Sync with tzcode2010n from elsie.nci.nih.gov

* Conditionally output extra types with most-recently-used offsets last
  (for use by systems with pre-2011 versions of localtime.c, helping to
  ensure that globals "altzone" and "timezone" get set correctly).

* Fix generation of POSIX strings for zones with rules using
  "weekday<=n" forms of dates (thanks to Lei Liu for finding the
  problem). Also, limit output for non-POSIX-specificable zones defined
  to follow the same rules every year. (Note that no zones of either of
  the above types appear in the distribution; these changes cater to
  add-on zones).

13 years agolibc/stdtime: Sync localtime.c with tzcode2010n from elsie.nci.nih.gov
Sascha Wildner [Tue, 26 Oct 2010 13:20:01 +0000 (15:20 +0200)]
libc/stdtime: Sync localtime.c with tzcode2010n from elsie.nci.nih.gov

* Change to set timezone and altzone based on time types with greatest
  transition times (for the benefit of Asia/Seoul).

* Initialize ttinfo structures filled by tzparse (thanks to Ravindra
  for reporting a valgrind warning).

13 years agoSync zoneinfo database with tzdata2010n from elsie.nci.nih.gov
Sascha Wildner [Tue, 26 Oct 2010 13:14:11 +0000 (15:14 +0200)]
Sync zoneinfo database with tzdata2010n from elsie.nci.nih.gov

Theory:         8.4  -> 8.5
asia:           8.61 -> 8.62
australasia:    8.18 -> 8.19
factory:        8.2  -> n/a
zone.tab:       8.37 -> 8.38

* Remove the 'factory' file and references to it. It is no longer needed.

* asia: No DST in Hong Kong in 1977 (thanks to Jesper Norgaard for
    finding the problem).

* australasia: Change end of DST in Samoa in 2011 from 2011-04-03 0:00 to
    2011-04-03 1:00 (thanks to Raymond Hughes for a reference).

* zone.tab: Remove obsolete association of Vostok Station with South
    Magnetic Pole; add association with Lake Vostok (thanks to
    Petr Machata for finding the problem).

13 years agonrelease - gui - Change window manager, cpdup additional directories
Matthew Dillon [Mon, 25 Oct 2010 23:33:01 +0000 (16:33 -0700)]
nrelease - gui - Change window manager, cpdup additional directories

* Change to fvwm2

* Autostart two xterms and clocks

* Add simple button bar with two buttons 'xterm' and 'firefox'.

* Installer now also installs /usr/src and /usr/pkgsrc from the stick.

13 years agonrelease - Provide default /etc/X11, better rc.conf
Matthew Dillon [Mon, 25 Oct 2010 22:12:06 +0000 (15:12 -0700)]
nrelease - Provide default /etc/X11, better rc.conf

* Don't make users agonize over /etc/X11, provide one even if we aren't
  the gui.  Also provide it in /etc.hdd so it gets installed onto the
  HD.

* This also fixes the problem where the gui install was failing to install
  /etc/X11 onto the HD.

* The normal and gui installs were not installing reasonable rc.conf
  defaults.  Do so.

13 years agonrelease - gui build adjustments
Matthew Dillon [Mon, 25 Oct 2010 20:46:13 +0000 (13:46 -0700)]
nrelease - gui build adjustments

* Remove packages that failed to build.  Unfortunately rxvt was one of them.
  Note that I did some manual build hacks to other packages to build
  which aren't committed to pkgsrc.

* Fix size calculation for usb disk img.

* Adjust fluxbox menu firefox3->firefox and urxvt->xterm.

13 years agobuild - define struct in6_addr in arpa/inet.h
Matthew Dillon [Mon, 25 Oct 2010 18:35:44 +0000 (11:35 -0700)]
build - define struct in6_addr in arpa/inet.h

* Use the same mechanic used for struct in_addr to define in6_addr in
  arpa/inet.h, conditionalizing the define in in6.h.

* This helps w/pkgsrc builds.

13 years agonullfs - Add 'noexec' flag support.
Antonio Huete Jimenez [Mon, 25 Oct 2010 15:04:37 +0000 (17:04 +0200)]
nullfs - Add 'noexec' flag support.

* Make possible to mount a null-mount with 'noexec' option.

* If the underlying filesystem is mounted as 'noexec' and no options
were given at mount-time, the null mount will automatically
have 'noexec'.

Pointed-out-by: @dillon
13 years agoFix some mdoc issues in crypttab.5 and tmpfs.5.
Sascha Wildner [Mon, 25 Oct 2010 05:37:21 +0000 (07:37 +0200)]
Fix some mdoc issues in crypttab.5 and tmpfs.5.

13 years agonrelease - installer - Use different emergency interrupt mechanic
Matthew Dillon [Mon, 25 Oct 2010 02:35:16 +0000 (19:35 -0700)]
nrelease - installer - Use different emergency interrupt mechanic

* Use a tuneable instead of a sysctl.

13 years agoehci - add missing dependency on usb driver
YONETANI Tomokazu [Mon, 25 Oct 2010 01:51:35 +0000 (10:51 +0900)]
ehci - add missing dependency on usb driver

13 years agodocs - update tuning(7)
Matthew Dillon [Mon, 25 Oct 2010 01:23:45 +0000 (18:23 -0700)]
docs - update tuning(7)

* Get rid of a ton of old cruft that no longer applies and replace with
  more applicable information.

13 years agoFix typo in argv handling.
Antonio Huete Jimenez [Sun, 24 Oct 2010 22:59:45 +0000 (00:59 +0200)]
Fix typo in argv handling.

13 years agokernel - Temporarily back-out smp_invltlb() changes
Matthew Dillon [Sun, 24 Oct 2010 22:29:00 +0000 (15:29 -0700)]
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.

13 years agokernel - Fix bug in the emergency interrupt polling thread
Matthew Dillon [Sun, 24 Oct 2010 22:27:14 +0000 (15:27 -0700)]
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.

13 years agosysctl.conf - Enable emergency interrupt polling at a low rate by default
Matthew Dillon [Sun, 24 Oct 2010 18:29:22 +0000 (11:29 -0700)]
sysctl.conf - Enable emergency interrupt polling at a low rate by default

* 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.

13 years agohammer utility - Add force support to cleanup
Matthew Dillon [Sun, 24 Oct 2010 18:01:41 +0000 (11:01 -0700)]
hammer utility - Add force support to cleanup

* Allow hammer -f cleanup to override the normal timestamp checking and
  force the cleanup to run.