dragonfly.git
13 years agoplatform: Setup bootverbose earlier
Sepherosa Ziehau [Mon, 11 Apr 2011 09:05:57 +0000 (17:05 +0800)]
platform: Setup bootverbose earlier

13 years agobufcache(9): Remove obsolete reference to namei.
Venkatesh Srinivas [Mon, 11 Apr 2011 03:54:53 +0000 (20:54 -0700)]
bufcache(9): Remove obsolete reference to namei.

13 years agoiwn(4) - Fix locking in iwn_ioctl().
Joe Talbott [Mon, 11 Apr 2011 03:21:59 +0000 (23:21 -0400)]
iwn(4) - Fix locking in iwn_ioctl().

iwn_ioctl() is already locked so call the non-locking
versions iwn_init_locked() and iwn_stop_locked().

13 years agokernel - Fix degenerate condition for ahci/cam disks without tags
Matthew Dillon [Sun, 10 Apr 2011 16:00:52 +0000 (09:00 -0700)]
kernel - Fix degenerate condition for ahci/cam disks without tags

* Fix a calculation that resolve to a value of at least 1, but
  was resolving to a value of 0 for USB sticks and other disk
  devices which do not negotiate NCQ.

Reported-by: Matthias Rampke <matthias@rampke.de>, swildner, others
13 years agoHAMMER VFS - Implement async I/O for double-buffer strategy case
Matthew Dillon [Sun, 10 Apr 2011 15:46:04 +0000 (08:46 -0700)]
HAMMER VFS - Implement async I/O for double-buffer strategy case

* When vfs.hammer.double_buffer is enabled the HAMMER strategy code
  was running synchronously.  This creates numerous problems including
  extra stalls when read-ahead is issued.

* Use the new breadcb() function to allow nominal double_buffer strategy
  operations to run asynchronously.  Essentially the original buffer and
  CRC is recorded in the device bio and the copyback is made in the
  callback.

* This improves performance vfs.hammer.double_buffer is enabled.

13 years agokernel - Add breadcb() function - async I/O w/completion callback
Matthew Dillon [Sun, 10 Apr 2011 15:43:12 +0000 (08:43 -0700)]
kernel - Add breadcb() function - async I/O w/completion callback

* Add breadcb().  This function performs an asynchronous read for the
  requested buffer and issues the specified callback on completion.
  If the buffer is already B_CACHE the callback is made synchronously
  and BIO_DONE is pre-set on the bio so the callback function can
  determine if I/O occured or not (and whether it must bpdone() the buf).

* This function works differently from and is more flexible than the
  previously removed breada(), and will be used by HAMMER.

13 years agointrcnt: Fix long standing interrupt name/count array mismatch
Sepherosa Ziehau [Sun, 10 Apr 2011 11:18:17 +0000 (19:18 +0800)]
intrcnt: Fix long standing interrupt name/count array mismatch

hw.intrnames always returns all interrupts' name, while hw.intrcnt
only returns count of interrupts that get installed.  This
mismatching cause utilities like vmstat(8) to report wrong interrupt
counts.

Keep the old symantic of hw.intrcnt and add hw.intrcnt_all, which
returns count of all interrupts.  Let vmstat(8) and systat(1) use
hw.intrcnt_all.

13 years agorc.d/sshd: Create /etc/ssh/ssh_host_ecdsa_key if it doesn't exist.
Peter Avalos [Sun, 10 Apr 2011 07:35:21 +0000 (21:35 -1000)]
rc.d/sshd: Create /etc/ssh/ssh_host_ecdsa_key if it doesn't exist.

13 years agokernel - Fix CAM tag reservation for AHCI and SILI driver
Matthew Dillon [Sun, 10 Apr 2011 02:56:24 +0000 (19:56 -0700)]
kernel - Fix CAM tag reservation for AHCI and SILI driver

* These drivers were adjusting the number of available tags upward
  using the wrong CAM call, which resulted in CAM not actually queueing
  multiple tags.  Use the correct call.

* With the issue fix and verified up to a combined 31 read and write
  requests can now be queued in parallel to a SATA drive via the AHCI
  driver.  It does appear to make a difference.

13 years agokernel - Limit tags allocated to reads or writes for CAM/scsi/ahci disks
Matthew Dillon [Sun, 10 Apr 2011 02:52:29 +0000 (19:52 -0700)]
kernel - Limit tags allocated to reads or writes for CAM/scsi/ahci disks

* Limit the number of tags which can be taken up read or write requests.
  If all tags are taken up by one type of request then the other type
  of request can become starved.

* This is particularly important because drives usually cache writes and
  return an immediate completion, so even if the system is reading heavily
  enough to eat a lot of tags we always want a few left in reserve to
  drain those writes in the drive's write cache.

* A similar situation can occur when flushing a lot of write data, which
  is almost guaranteed to fill up not only available tags but also the
  drive's write cache.  When the drive's write cache becomes full then
  write requests begin to stall (no longer return instantly), causing
  reads to become starved.

* When no tags are available give reads priority over writes for
  the moment.  This needs to be fixed.

13 years agokernel - Adjust AHCI to properly report SATA-III support
Matthew Dillon [Sun, 10 Apr 2011 00:42:01 +0000 (17:42 -0700)]
kernel - Adjust AHCI to properly report SATA-III support

* This is primarily so 6gbit/sec links and support is properly reported.
  The links already negotiated 6gbit/sec correctly.

13 years agogcc44, crtstuff: Provide -fPIE support
John Marino [Sat, 9 Apr 2011 13:14:25 +0000 (15:14 +0200)]
gcc44, crtstuff: Provide -fPIE support

Properly support Position Independent Executables (PIE) generation by
linking PIE binaries with specially-built Scrt1.o instead of crt1.o.
The latter is built without the -fPIC flag.

For the i386 version, gcc-2 code was first purged, and then the new
assembly was placed in a separate file.  All data extracted by the
assembler stub as explicit parameters.  The hidden _start1 symbol is used
as an interface between the assembly and C code.

The CFLAGS -fkeep-inline-functions was removed as it was legacy FreeBSD
code that has been long since removed.  The CFLAGS -elf was removed as
all DragonFly targets are elf.  The LDFLAGS -elf was removed because it
was getting interpreted as "-entry=lf" by ld.  LDFLAGS weren't even used
before this commit so it's always been completely extraneous.

For x86_64, the no-omit-frame-pointer flag was added during the build of
crt1.o.  For the builtin gcc function __builtin_frame_address to work, all
call frames need to save the frame pointer.  In particular, this is
important for the upper frame that should terminate the chain.

13 years agomandoc(1): For now, don't install the mandoc.3 manual page.
Sascha Wildner [Sat, 9 Apr 2011 22:13:43 +0000 (00:13 +0200)]
mandoc(1): For now, don't install the mandoc.3 manual page.

I'll split it into libmandoc and the mandoc utility after the release.

13 years agomandoc(1): Adjust Makefile for 1.11.1.
Sascha Wildner [Sat, 9 Apr 2011 21:56:08 +0000 (23:56 +0200)]
mandoc(1): Adjust Makefile for 1.11.1.

13 years agoMerge branch 'vendor/MDOCML'
Sascha Wildner [Sat, 9 Apr 2011 21:56:26 +0000 (23:56 +0200)]
Merge branch 'vendor/MDOCML'

13 years agoImport mdocml-1.11.1
Sascha Wildner [Sat, 9 Apr 2011 21:38:59 +0000 (23:38 +0200)]
Import mdocml-1.11.1

13 years agosystat - Adjust field widths to prevent numbers from running together
Matthew Dillon [Sat, 9 Apr 2011 19:14:46 +0000 (12:14 -0700)]
systat - Adjust field widths to prevent numbers from running together

* Compress the Trp, Sys, Int, Sof, and Flt fields and reduce the field
  width to prevent numbers from running into each other, which was making
  them unreadable.

  On MP systems these fields can get into the hundreds of K.  In particular
  the Flt number would often hit up against the 'wire' number to its right.

* Reduce the width for the VN PAGER and SWAP PAGER fields for the same
  reason.

  These changes force larger numbers to be displayed with less accuracy,
  i.e. instead of 104555 we would get 104K, but the output is far more
  useful.

13 years agoUpdate files for OpenSSH-5.8p1 import.
Peter Avalos [Sat, 9 Apr 2011 09:34:37 +0000 (02:34 -0700)]
Update files for OpenSSH-5.8p1 import.

13 years agoMerge branch 'vendor/OPENSSH'
Peter Avalos [Sat, 9 Apr 2011 06:57:29 +0000 (23:57 -0700)]
Merge branch 'vendor/OPENSSH'

13 years agoImport OpenSSH-5.8p1.
Peter Avalos [Sat, 9 Apr 2011 05:59:12 +0000 (22:59 -0700)]
Import OpenSSH-5.8p1.

 * Fix vulnerability in legacy certificate signing introduced in
   OpenSSH-5.6.

 * Implement Elliptic Curve Cryptography modes for key exchange (ECDH)
   and host/user keys (ECDSA) as specified by RFC5656. ECDH and ECDSA
   offer better performance than plain DH and DSA at the same equivalent
   symmetric key length, as well as much shorter keys.

 * sftp(1)/sftp-server(8): add a protocol extension to support a hard
   link operation. It is available through the "ln" command in the
   client. The old "ln" behaviour of creating a symlink is available
   using its "-s" option or through the preexisting "symlink" command

 * scp(1): Add a new -3 option to scp: Copies between two remote hosts
   are transferred through the local host.  Without this option the
   data is copied directly between the two remote hosts.

 * ssh(1): automatically order the hostkeys requested by the client
   based on which hostkeys are already recorded in known_hosts. This
   avoids hostkey warnings when connecting to servers with new ECDSA
   keys, since these are now preferred when learning hostkeys for the
   first time.

 * ssh(1)/sshd(8): add a new IPQoS option to specify arbitrary
   TOS/DSCP/QoS values instead of hardcoding lowdelay/throughput.

 * ssh(1): "atomically" create the listening mux socket by binding it on
   a temporary name and then linking it into position after listen() has
   succeeded. This allows the mux clients to determine that the server
   socket is either ready or stale without races. stale server sockets
   are now automatically removed.

 * ssh(1)/sshd(8): add a KexAlgorithms knob to the client and server
   configuration to allow selection of which key exchange methods are
   used by ssh(1) and sshd(8) and their order of preference.

 * sftp(1)/scp(1): factor out bandwidth limiting code from scp(1) into
   a generic bandwidth limiter that can be attached using the atomicio
   callback mechanism and use it to add a bandwidth limit option to
   sftp(1).

BugFixes:

 * ssh(1)/ssh-agent(1): honour $TMPDIR for client xauth and ssh-agent
   temporary directories.

 * ssh(1): avoid NULL deref on receiving a channel request on an unknown
   or invalid channel;

 * sshd(8): remove a debug() that pollutes stderr on client connecting
   to a server in debug mode

 * scp(1): pass through ssh command-line flags and options when doing
   remote-remote transfers, e.g. to enable agent forwarding which is
   particularly useful in this case;

 * sftp-server(8): umask should be parsed as octal

 * sftp(1): escape '[' in filename tab-completion

 * ssh(1): Typo in confirmation message.

 * sshd(8): prevent free() of string in .rodata when overriding
   AuthorizedKeys in a Match block

 * sshd(8): Use default shell /bin/sh if $SHELL is ""

 * ssh(1): kill proxy command on fatal() (we already killed it on
   clean exit);

 * ssh(1): install a SIGCHLD handler to reap expiried child process;

 * sshd(8): Use correct uid_t/pid_t types instead of int.

13 years agobinutils221: final solution to start/stop label generation
John Marino [Thu, 7 Apr 2011 22:14:07 +0000 (00:14 +0200)]
binutils221: final solution to start/stop label generation

During discussion on binutils mail list about preserving the
__start_* and __stop_* section labels, Dimitry Andric indicated that
FreeBSD had the same exact issue when they recently upgraded to
binutils 2.17.50.  The solution they chose was to declare these section
labels as global symbols, and the stock version of ld will retain them.

This commit implements the FreeBSD solution.  Besides the obvious
benefit of having minimalist shared objects, it also "fixes" binutils
2.20 which, until this commit, failed to generate the start/stop section
labels.

Commit f070647cc5317c4924be4dd60563fc39c18094cf has been reverted to
convert binutils 2.21 to a completely stock ld.  Some whitespace cleanup
of linker_set.h was done while modifying __MAKE_SET macro.

13 years agovkernel64 - Push some non-working (as yet) shims for module loading
Matthew Dillon [Thu, 7 Apr 2011 19:04:40 +0000 (12:04 -0700)]
vkernel64 - Push some non-working (as yet) shims for module loading

* Push some shims for module loading in vkernel64's to control
  the load address.  These currently do not work, probably due
  to other symbol/dlsym issues.

  The default kmem area is way outside the 32-bit rel relocation
  range for the kernel binary proper so modules can't be loaded
  into that area.

* Currently non-working.

13 years agoacpi/pci_link: Missing !acpi_enabled to acpi_disabled conversion
Sepherosa Ziehau [Thu, 7 Apr 2011 16:29:09 +0000 (00:29 +0800)]
acpi/pci_link: Missing !acpi_enabled to acpi_disabled conversion

13 years agoswapcache.8: Fix typo.
Sascha Wildner [Thu, 7 Apr 2011 14:11:51 +0000 (16:11 +0200)]
swapcache.8: Fix typo.

13 years agoacpi: Enable pci, pcib and pci_link by default
Sepherosa Ziehau [Thu, 7 Apr 2011 10:37:01 +0000 (18:37 +0800)]
acpi: Enable pci, pcib and pci_link by default

13 years agoacpi/pci: Inherit methods from pci_driver, instead of setting them manually
Sepherosa Ziehau [Thu, 7 Apr 2011 08:29:03 +0000 (16:29 +0800)]
acpi/pci: Inherit methods from pci_driver, instead of setting them manually

Manually setting all of the necessary methods is error prone, e.g. previously
pci_find_extcap is not set, which causes agp(4) not being attached.

13 years agoacpi/pcib: Rework the _BBN handling for Host-PCI bridges.
Sepherosa Ziehau [Thu, 7 Apr 2011 10:11:16 +0000 (18:11 +0800)]
acpi/pcib: Rework the _BBN handling for Host-PCI bridges.

Obtained-from: FreeBSD (Revision 193829 by jhb@freebsd.org)

  Previously we only trusted a _BBN value of 0 if it was for the first
  bridge encountered since some older systems returned _BBN of 0 for
  all bridges.  However, some newer systems enumerate bridges with
  non-zero _BBN before bus 0 which is perfectly valid.  Handle both
  cases by trusting the first bridge that has a _BBN of 0 and falling
  back to reading from non-standard config registers only for
  subsequent bridges with a _BBN of 0.  We also only perform this
  check for segment (domain) 0.  We assume that _BBN is always correct
  for segments other than 0.

13 years agobus: Allow subclass to have the same name as the parent class.
Sepherosa Ziehau [Thu, 7 Apr 2011 10:06:03 +0000 (18:06 +0800)]
bus: Allow subclass to have the same name as the parent class.

Obtained-from: FreeBSD (Revision 154598 by jhb@freebsd.org)

  When loading a driver that is a subclass of another driver don't set the
  devclass's parent pointer if the two drivers share the same devclass.  This
  can happen if the drivers use the same new-bus name.  For example, we
  currently have 3 drivers that use the name "pci": the generic PCI bus
  driver, the ACPI PCI bus driver, and the OpenFirmware PCI bus driver.  If
  the ACPI PCI bus driver was defined as a subclass of the generic PCI bus
  driver, then without this check the "pci" devclass would point to itself
  as its parent and device_probe_child() would spin forever when it
  encountered the first PCI device that did have a matching driver.

13 years agobinutils221: revisit start/stop label generation
John Marino [Thu, 7 Apr 2011 06:28:22 +0000 (08:28 +0200)]
binutils221: revisit start/stop label generation

In commit b133d3fde203bbf8e2c359d2be9f09c20ce732b5 (3 April), ld's
lang_insert_orphan function was modified to include all symbols, which
matches the behavior of binutils 2.17 and allowed kernel modules
utilizing previously unreferenced __start_* and __stop_* sections to
load properly.

For at least 4 years, the ld developed by binutils has the policy to
discard all unreference symbols, considering them "clutter".  This
commit will revert back ld back to its default behavior unless the
options -shared or -Bshareable are passed in the command line.  In those
cases, the linked file will include all symbols, referenced or not.

In the future, we may consider modifying an .em file to define a flag
that will revert to 2.17 on a per-target basis rather than forcing all
shared objects to carry extraneous symbols.  I'd have to identify all
kernel modules requiring this flag before implementing that change.

13 years agoVerified commit access of marino
John Marino [Wed, 6 Apr 2011 22:34:12 +0000 (00:34 +0200)]
Verified commit access of marino

13 years agokernel - Add shutdown method for vm.swapcache
Matthew Dillon [Wed, 6 Apr 2011 04:36:12 +0000 (21:36 -0700)]
kernel - Add shutdown method for vm.swapcache

* Add shutdown methods for the swapcache to stop operations during a
  shutdown.  If not stopped swapcache operations can extend beyond the
  device shutdown and cause a crash.

13 years agoHAMMER VFS - Fix two minor bugs.
Matthew Dillon [Wed, 6 Apr 2011 04:09:09 +0000 (21:09 -0700)]
HAMMER VFS - Fix two minor bugs.

* When downgrading a volume to read-only due to a critical HAMMER error
  also properly downgrade the VOP_OPEN/VOP_CLOSE state so the opencount
  and writecount match up.

  This should fix issues disconnecting the related disk device after
  umounting a HAMMER partition which has had a critical error.

* When adding or removing a volume to an existing HAMMER mount flush
  disk buffers before calling VOP_CLOSE() instead of after.

13 years agokernel - Fix slice open mask tracking
Matthew Dillon [Wed, 6 Apr 2011 04:06:03 +0000 (21:06 -0700)]
kernel - Fix slice open mask tracking

* The slice open mask tracking was broken when more than one partition
  on a raw disk device was opened.  Fix the tracking.

* This should solve problems editing the partition information in the
  disklabel for partitions which have been mounted and then unmounted.

* This should also solve problems with the related disk device and
  designation (e.g. da8, da9) being properly disconnected when pulling
  a USB stick.

13 years agokernel -- Remove unused vfscache structure.
Venkatesh Srinivas [Wed, 6 Apr 2011 02:08:14 +0000 (19:08 -0700)]
kernel -- Remove unused vfscache structure.

13 years agokernel -- Remove unused vfs rangelocks from vnodes.
Venkatesh Srinivas [Wed, 6 Apr 2011 02:02:10 +0000 (19:02 -0700)]
kernel -- Remove unused vfs rangelocks from vnodes.

13 years agokernel - Possible fix to 'Bad link elm' panic in random callout
Matthew Dillon [Tue, 5 Apr 2011 18:08:34 +0000 (11:08 -0700)]
kernel - Possible fix to 'Bad link elm' panic in random callout

* Fix a rare race condition where the acquisition of p_token in the
  tsleep callout code can delay the setting of TDF_TIMEOUT, potentially
  causing it to skip the current tsleep entirely and trigger on a later
  tsleep.

  If this occurs the later callout is not terminated and tsleep() can return
  with it still active.  The callout is declared on the kernel stack, leading
  to the assertion and crash.

* During evaluation I noticed that the corrupted callout structure in
  Rumko's crash dump contained information that indicated it was part of
  a stack frame.  I think only tsleep() declares callout structures on the
  stack.

PR: 1977, 1835, 2037 (tracking using 2037)
Reported-by: Rumko, Francois Tigeot <ftigeot@wolfpond.org>
13 years agovkernel - Fix problem where cpu-bound user process cannot be interrupted
Matthew Dillon [Tue, 5 Apr 2011 00:04:12 +0000 (17:04 -0700)]
vkernel - Fix problem where cpu-bound user process cannot be interrupted

* Fix an issue where a cpu-bound user process running in a vkernel cannot
  be interrupted from within the vkernel.

  The problem occurs because the timer interrupt was not marked MPSAFE,
  causing the interrupt thread to hold the MP token which then prevented
  the thread preemption code from letting the timer interrupt thread
  preempt the currently running user process.

* Fixed by marking the timer interrupt and other vkernel interrupt
  handlers as being MPSAFE.

* This is a problem for the vkernel and not for normal kernel.  Normal
  kernels have a doreti function which 'catches' pending flags on
  any attempt to return to userland.

  The vkernel does not, instead relying on the preemption mechanic to
  catch pending flags.

Reported-by: Antonio Huete Jimenez <ahuete.devel@gmail.com>
13 years agoswapcache - Update manual pages
Matthew Dillon [Mon, 4 Apr 2011 19:37:13 +0000 (12:37 -0700)]
swapcache - Update manual pages

* Add a section describing the new HAMMER double_buffer feature and how to
  use it to radically improve the amount of data the swapcache feature can
  cache on a SSD.

* Add a section describing the difference between 34nm flash and 25nm flash
  with regards to durability.

13 years agorc.subr - Add missing quotes.
Antonio Huete Jimenez [Mon, 4 Apr 2011 19:13:01 +0000 (21:13 +0200)]
rc.subr - Add missing quotes.

13 years agokernel - Add kern.cp_time sysctl.
Antonio Huete Jimenez [Thu, 31 Mar 2011 10:21:30 +0000 (12:21 +0200)]
kernel - Add kern.cp_time sysctl.

This sysctl provides user, nice, sys, intr and idle cpu aggregate
time.

Tested-by: ftigeot
Inspired-in: NetBSD, FreeBSD

13 years agoxlint: Revert part of 2e2a1cf79437aa99c731a36585fe98887a5c0bf0 again.
Sascha Wildner [Mon, 4 Apr 2011 06:50:03 +0000 (08:50 +0200)]
xlint: Revert part of 2e2a1cf79437aa99c731a36585fe98887a5c0bf0 again.

The reason why we had to lower WARNS to 0 for xlint/lint1 was that
gcc 4.4.2 was unable to fit the value for LDBL_MAX from <float.h>
into a long double on i386 due to some misconfiguration of the
compiler.

Now that this is fixed with gcc 4.4.5, we can remove it again.

13 years agokernel -- Fix off-by-one in udp multicast group check code.
Venkatesh Srinivas [Mon, 4 Apr 2011 01:25:12 +0000 (18:25 -0700)]
kernel -- Fix off-by-one in udp multicast group check code.

Triggered reliably by mt-daapd.

13 years agogcc44: Improve locale support in libstdc++.
Sascha Wildner [Mon, 4 Apr 2011 00:32:52 +0000 (02:32 +0200)]
gcc44: Improve locale support in libstdc++.

Also, some miscellaneous config changes.

Submitted-by: John Marino <draco@marino.st>
13 years agocsu: Adjust some flags etc. to more closely resemble the vendor Makefile.
Sascha Wildner [Mon, 4 Apr 2011 00:30:21 +0000 (02:30 +0200)]
csu: Adjust some flags etc. to more closely resemble the vendor Makefile.

Also, use ${PICFLAG} instead of -fpic.

Submitted-by: John Marino <draco@marino.st>
13 years agompfr: Remove a local modification we no longer need.
Sascha Wildner [Mon, 4 Apr 2011 00:22:08 +0000 (02:22 +0200)]
mpfr: Remove a local modification we no longer need.

13 years agogcc44/gmp/mpfr: Update/add our READMEs.
Sascha Wildner [Mon, 4 Apr 2011 00:20:58 +0000 (02:20 +0200)]
gcc44/gmp/mpfr: Update/add our READMEs.

Submitted-by: John Marino <draco@marino.st>
13 years agoCorrect GCC-4.4.5 configuration to build on i386
John Marino [Mon, 28 Mar 2011 19:39:47 +0000 (21:39 +0200)]
Correct GCC-4.4.5 configuration to build on i386

The previous changes to auto-host.h prevented gcc445 from bootstrapping.

13 years agoUpdate gmp headers in gnu/usr.bin/cc44
John Marino [Sun, 27 Mar 2011 16:19:07 +0000 (18:19 +0200)]
Update gmp headers in gnu/usr.bin/cc44

13 years agoChange gcc version number
John Marino [Sat, 26 Mar 2011 16:17:54 +0000 (17:17 +0100)]
Change gcc version number

I thought this was picked up in contrib, but it's a manual change
I guess.

13 years agoUpdate world Makefile infrastructure for gcc 4.4
John Marino [Sat, 26 Mar 2011 09:34:33 +0000 (10:34 +0100)]
Update world Makefile infrastructure for gcc 4.4

13 years agoAligning world configuration with vendor-build configuration
John Marino [Sat, 26 Mar 2011 06:29:16 +0000 (07:29 +0100)]
Aligning world configuration with vendor-build configuration

13 years agoMerge branch 'vendor/MPFR'
Sascha Wildner [Mon, 4 Apr 2011 00:56:00 +0000 (02:56 +0200)]
Merge branch 'vendor/MPFR'

13 years agoMerge branch 'vendor/GMP'
Sascha Wildner [Mon, 4 Apr 2011 00:55:55 +0000 (02:55 +0200)]
Merge branch 'vendor/GMP'

13 years agoMerge branch 'vendor/GCC44'
Sascha Wildner [Mon, 4 Apr 2011 00:55:42 +0000 (02:55 +0200)]
Merge branch 'vendor/GCC44'

13 years agoUpgrade MPFR from 2.4.1 to 2.4.2-p3 on the vendor branch.
Sascha Wildner [Mon, 4 Apr 2011 00:50:48 +0000 (02:50 +0200)]
Upgrade MPFR from 2.4.1 to 2.4.2-p3 on the vendor branch.

13 years agoUpgrade GCC from 4.4.2 to 4.4.5 on the vendor branch.
Sascha Wildner [Mon, 4 Apr 2011 00:45:07 +0000 (02:45 +0200)]
Upgrade GCC from 4.4.2 to 4.4.5 on the vendor branch.

13 years agoUpgrade GMP from 4.3.1 to 4.3.2 on the vendor branch.
Sascha Wildner [Sun, 3 Apr 2011 21:54:20 +0000 (23:54 +0200)]
Upgrade GMP from 4.3.1 to 4.3.2 on the vendor branch.

13 years agobinutils221: Fix missing section start/end label generation
Matthew Dillon [Sun, 3 Apr 2011 07:23:42 +0000 (00:23 -0700)]
binutils221: Fix missing section start/end label generation

* The code to generate section __start_set and __end_set symbols
  was using exp_provide() instead of exp_assign(), and exp_provide()
  appears to silently discard the symbol due to being assigned to '.'
  (the origin).

  This resulted in the symbols not being generated in the output file.

* Change to using exp_assign() and pray.

13 years agoHAMMER VFS - Cleanup a swapcache hammer_vop_write() case
Matthew Dillon [Sun, 3 Apr 2011 01:55:53 +0000 (18:55 -0700)]
HAMMER VFS - Cleanup a swapcache hammer_vop_write() case

* Mark buffers created via write() B_NOTMETA if hammer's double buffer
  mode is enabled.  When both the hammer double buffer mode and swapcache
  is enabled this will cause the system to re-read the file from disk
  once (via the block device) before attempting to swapcache it.

13 years agoHAMMER VFS - Force reading from the block device when live dedup is enabled
Matthew Dillon [Sun, 3 Apr 2011 00:25:25 +0000 (17:25 -0700)]
HAMMER VFS - Force reading from the block device when live dedup is enabled

* Attempting to access the vnode's buffer cache is currently not MPSAFE
  and can cause crashes so don't try to do that.  Use the block device
  instead.

* It is suggested but not required that vfs.hammer.double_buffer mode also
  be enabled if you use vfs.hammer.live.deup.

13 years agoHAMMER VFS - Implement swapcache for HAMMER data in double_buffer mode
Matthew Dillon [Sun, 3 Apr 2011 00:16:15 +0000 (17:16 -0700)]
HAMMER VFS - Implement swapcache for HAMMER data in double_buffer mode

* Support swapcache data caching when HAMMER's double_buffer mode is enabled.
  Typically the following sysctls:

  vfs.hammer.double_buffer=1
  vm.swapcache.read_enable=1
  vm.swapcache.data_enable=1
  vm.swapcache.meta_enable=1 (optional)
  vm.swapcache.use_chflags=0 (optional - see man swapcache)

* This causes swapcache to attempt to cache file data from HAMMER
  filesystems stored via the block device instead of the individual
  file vnodes.

* This allows swapcache to more efficiently cache file data without
  vnode recycling from a limited kern.maxvnodes value getting in the way.

  If you have a large dataset spread across many smaller files which would
  normally overwhelm maxvnodes, and even on large systems handling very
  large data sets where you wish to cache the file data for some of the
  files (using use_chflags=1 mode), this makes it possible to cache ALL
  the file data AND meta-data on the SSD even though the related vnodes
  cached by the kernel get recycled.

* Whereas it may have been inefficient to turn on vm.swapcache.data_enable
  before, due to filesystem scans and such, it may now be possible to this
  feature on with double buffering also enabled.

  Note that you must still be cognizant of the aggregate amount of file
  data being accessed by your system if you have set use_chflags to 0, you
  simply no longer need to worry about how many files that data belongs to.

* Enabling HAMMER's double_buffer mode will reduce performance somewhat for
  the normal best-case file caching, but it will also greatly improve
  performance once you start blowing out your memory caches.

13 years agokernel - Check B_NOTMETA in buffer release code
Matthew Dillon [Sun, 3 Apr 2011 00:10:28 +0000 (17:10 -0700)]
kernel - Check B_NOTMETA in buffer release code

* When releasing the VM pages backing a buffer cache buffer if B_NOTMETA
  is set on the buffer attempt to move the pages to the VM page cache
  instead of leaving them on the active or inactive queue.

* This partially deals with the double data caching which occurs when
  HAMMER's double_buffer mode is enabled by shortening the life of
  the pages backing the secondary buffer(s).

13 years agobinutils221: Add arlex.l to the list of modified files.
Sascha Wildner [Sat, 2 Apr 2011 23:56:00 +0000 (01:56 +0200)]
binutils221: Add arlex.l to the list of modified files.

While here, sort the lists alphabetically.

13 years agobinutils221: Fix a warning.
Sascha Wildner [Sat, 2 Apr 2011 23:41:16 +0000 (01:41 +0200)]
binutils221: Fix a warning.

13 years agoMerge branch 'master' of ssh://crater.dragonflybsd.org/repository/git/dragonfly
Matthew Dillon [Sat, 2 Apr 2011 23:09:35 +0000 (16:09 -0700)]
Merge branch 'master' of ssh://crater.dragonflybsd.org/repository/git/dragonfly

13 years agoCheck if the host system has the desired binutils for HOST_BINUTILSVER.
Sascha Wildner [Sat, 2 Apr 2011 23:06:12 +0000 (01:06 +0200)]
Check if the host system has the desired binutils for HOST_BINUTILSVER.

If not, fall back to the previous ones. This fixes buildworld for systems
that don't have binutils 2.21 installed at all (everthing that was last
upgraded before we added 2.21).

Reported-by: Ferruccio Zamuner <nonsolosoft@diff.org>
13 years agokernel - allow PG_NOTMETA to be set on regular files too
Matthew Dillon [Sat, 2 Apr 2011 23:05:58 +0000 (16:05 -0700)]
kernel - allow PG_NOTMETA to be set on regular files too

* Allow this flag to be set for VM pages associated with regular files
  too, the flag prevents the related VM page from being swapcache'd.

  The flag is set by HAMMER on normal file buffer cache buffers when
  double buffering is enabled to prevent swapcache from caching the
  data twice.

* This also fixes an issue when a large number of files exceeding the
  maxvnode limit are recycled, and double buffering is enabled along
  with vm.swapcache.data_enable.  We do not want swapcache to try to
  cache the pages via the vnode, instead we'd rather it cache them
  via the block device (whos vnode doesn't get recycled).

13 years agoHAMMER VFS - Bump the default hammer rev to 6
Matthew Dillon [Sat, 2 Apr 2011 22:45:35 +0000 (15:45 -0700)]
HAMMER VFS - Bump the default hammer rev to 6

* The default hammer rev is now 6, which is the directory filename hash
  algorithm.

13 years agoMerge branch 'master' of git://git.dragonflybsd.org/dragonfly
Peter Avalos [Sat, 2 Apr 2011 21:37:46 +0000 (11:37 -1000)]
Merge branch 'master' of git://git.dragonflybsd.org/dragonfly

13 years agoMerge branch 'vendor/DIFFUTILS'
Peter Avalos [Sat, 2 Apr 2011 21:33:20 +0000 (11:33 -1000)]
Merge branch 'vendor/DIFFUTILS'

13 years agoRemove the hack for loading x86_64 kernels linked with binutils >=2.20.
Sascha Wildner [Sat, 2 Apr 2011 21:31:17 +0000 (23:31 +0200)]
Remove the hack for loading x86_64 kernels linked with binutils >=2.20.

Now that both our binutils support CONSTANT, MAXPAGESIZE and
COMMONPAGESIZE, use those in the ldscript.

13 years agoRemove the version number from the diffutils dir.
Peter Avalos [Sat, 2 Apr 2011 21:18:21 +0000 (11:18 -1000)]
Remove the version number from the diffutils dir.

13 years agoRemove diffutils 2.8.1 from the vendor branch.
Peter Avalos [Sat, 2 Apr 2011 21:17:33 +0000 (11:17 -1000)]
Remove diffutils 2.8.1 from the vendor branch.

13 years agoSwitch the default binutils from 2.17 to 2.21.
Sascha Wildner [Sat, 2 Apr 2011 18:14:04 +0000 (20:14 +0200)]
Switch the default binutils from 2.17 to 2.21.

The optional binutils is now 2.20 and can be selected using 'binutils220'
for BINUTILSVER and/or WORLD_BINUTILSVER.

Please do a full buildworld/-kernel for upgrading.

13 years agoacpi/Osd: SCI_INT in FADT is the IRQ number on the system with 8259 (icu)
Sepherosa Ziehau [Sat, 2 Apr 2011 14:02:48 +0000 (22:02 +0800)]
acpi/Osd: SCI_INT in FADT is the IRQ number on the system with 8259 (icu)

MADT's interrupt source override entry, which only tells you how SCI is
wired to I/O APIC, does _not_ change SCI's IRQ number.

While I'm here, remove unused function.

13 years agoacpi/pci_link: Avoid sharing interrupt with SCI if possible
Sepherosa Ziehau [Sat, 2 Apr 2011 11:15:04 +0000 (19:15 +0800)]
acpi/pci_link: Avoid sharing interrupt with SCI if possible

Since ACPI SCI handler is time consuming, sharing its interrupt
with others may cause significant performance penalty.  SCI
interrupt is now shared if we can't find other resorts.

13 years agozlib: Eliminate unneeded diffs from vendor sources.
Peter Avalos [Sat, 2 Apr 2011 06:46:12 +0000 (20:46 -1000)]
zlib:  Eliminate unneeded diffs from vendor sources.

13 years agolibz: Use off_t instead of long.
Peter Avalos [Sat, 2 Apr 2011 07:43:16 +0000 (21:43 -1000)]
libz:  Use off_t instead of long.

This problem was triggered by clamav.  As the comment in zconf.h states,
we'd prefer to always define Z_HAVE_UNISTD_H, but libstand has some issues
with this, which is why we originally had the change to the vendor
source to include <unistd.h> in gzguts.h.

While we're here, there's no point in defining HAVE_MEMCPY in
Makefile.stand, since it's already defined elsewhere in zconf.h.

13 years agokernel - Fix fstatfs() and fstatvfs() when called from a null-mounted chroot()
Matthew Dillon [Fri, 1 Apr 2011 23:03:09 +0000 (16:03 -0700)]
kernel - Fix fstatfs() and fstatvfs() when called from a null-mounted chroot()

* These funtions were using the wrong starting mount pointer when calling
  cache_fullpath().  They were using the mount pointer for the open file's
  vnode instead of the overlay (null) mount pointer.

  This caused cache_fullpath() to believe the fd represented a file outside
  the chroot and return an error.

Reported-by: Francois Tigeot<ftigeot@wolfpond.org>:
13 years agoSync zoneinfo database with tzdata2011e from elsie.nci.nih.gov
Sascha Wildner [Fri, 1 Apr 2011 12:20:24 +0000 (14:20 +0200)]
Sync zoneinfo database with tzdata2011e from elsie.nci.nih.gov

africa:         8.28 -> 8.30
southamerica:   8.45 -> 8.47

* africa: Morocco will start DST on April 3 and end it on July 31.

* southamerica: Chile has extended its DST again, this time to
    May 7. Clocks will go forward again on the third Saturday
    in August.

13 years agogetmntinfo.2: Some cleanup for the addition of getmntvinfo() in 2008.
Sascha Wildner [Fri, 1 Apr 2011 00:03:31 +0000 (02:03 +0200)]
getmntinfo.2: Some cleanup for the addition of getmntvinfo() in 2008.

13 years agoerr.3: Mention that verrx() and vwarnx() don't append an error message.
Sascha Wildner [Fri, 1 Apr 2011 00:03:26 +0000 (02:03 +0200)]
err.3: Mention that verrx() and vwarnx() don't append an error message.

13 years agologinx.3: Fix SYNOPSIS
Sascha Wildner [Thu, 31 Mar 2011 00:58:57 +0000 (02:58 +0200)]
loginx.3: Fix SYNOPSIS

13 years agoFix LINT kernel build.
Sascha Wildner [Thu, 31 Mar 2011 00:47:34 +0000 (02:47 +0200)]
Fix LINT kernel build.

13 years agokernel - Major bridging functionality added (bug fixes 6)
Matthew Dillon [Wed, 30 Mar 2011 07:20:40 +0000 (00:20 -0700)]
kernel - Major bridging functionality added (bug fixes 6)

* Flapping on one of the member interfaces can cause the entire bridge
  to go down due to all member interfaces entering a transient state.
  For example, if openvpn is flapping the related tap interfaces will
  go up and down without any actual packet traffic making it across.

  With these changes openvpn flapping no longer makes the bridge
  effectively non-operational.

* When a port is disabled or enabled either manually or due to a TAP
  process going away / attaching, only issue a configuration update
  when transitioning out of an active state.

  Thus disabled<->l1blocking flip-flopping does not cause the other
  member interfaces to change state.

* Also change the initial state setup when LINK1 is flagged.
  Go into the L1BLOCKING state instead of the BLOCKING state.

13 years agodevfs - Change setattr code to use vop_helper fns
Alex Hornung [Tue, 29 Mar 2011 09:06:29 +0000 (10:06 +0100)]
devfs - Change setattr code to use vop_helper fns

* Change the devfs vop_setattr to use the vop_helper functions for chown
  and chmod.

* This gets rid of the previous roll-your-own solution and fixes several
  edge cases.

* It also fixes a warning thrown by xterm when closing it.

Reported-by: luxh
13 years agovfs_helper - Remove stale comment
Alex Hornung [Tue, 29 Mar 2011 09:06:11 +0000 (10:06 +0100)]
vfs_helper - Remove stale comment

13 years agoRemove obsolete reference to cache_mpsafe in sys/namecache.h.
Venkatesh Srinivas [Tue, 29 Mar 2011 04:42:22 +0000 (21:42 -0700)]
Remove obsolete reference to cache_mpsafe in sys/namecache.h.

13 years agokernel - Enhance the FAIRQ ALTQ to use relative weightings
Matthew Dillon [Tue, 29 Mar 2011 02:22:15 +0000 (19:22 -0700)]
kernel - Enhance the FAIRQ ALTQ to use relative weightings

* Previously the FAIRQ altq specification guaranteed a bandwidth minimum
  for each queue but then used a fixed priority model for any excess
  bandwidth.

* Now the FAIRQ uses the minimum bandwidth specifications to also calculate
  relative weightings for any excess bandwidth, and no longer uses a fixed
  priority model.

* This results in a better apportionment of excess bandwidth and allows
  bandwidth specifications to also be used as a pure weighting specification
  if desired.

* Fix bandwidth calculation.  The decay was being executed on every packet
  instead of once a second.

13 years agokernel -- vm_object hold debugging should not panic if the debug array overflows
Venkatesh Srinivas [Tue, 29 Mar 2011 00:02:43 +0000 (17:02 -0700)]
kernel -- vm_object hold debugging should not panic if the debug array overflows

If the debug array overflows, we lose the ability to test for object drops
when we never established a hold. However the system keeps running.

Suggested-by: dillon
13 years agokernel -- vm_object locking: DEBUG_LOCKS check for hold_wait vs hold deadlock
Venkatesh Srinivas [Sun, 27 Mar 2011 14:20:20 +0000 (07:20 -0700)]
kernel -- vm_object locking: DEBUG_LOCKS check for hold_wait vs hold deadlock

If a thread has a hold on a vm_object and enters hold_wait (via either
vm_object_terminate or vm_object_collapse), it will wait forever for the hold
count to hit 0. Record the threads holding an object in a per-object array.

13 years agoacpi: Style and white space changes
Sepherosa Ziehau [Tue, 22 Mar 2011 07:26:41 +0000 (15:26 +0800)]
acpi: Style and white space changes

13 years agoacpi/pcib: Fix interrupt routing code
Sepherosa Ziehau [Tue, 22 Mar 2011 07:04:16 +0000 (15:04 +0800)]
acpi/pcib: Fix interrupt routing code

13 years agoacpi/pcib: Use pcib_alloc_resource as bus alloc_resource method
Sepherosa Ziehau [Tue, 22 Mar 2011 07:03:06 +0000 (15:03 +0800)]
acpi/pcib: Use pcib_alloc_resource as bus alloc_resource method

13 years agoacpi: Remove no longer needed file
Sepherosa Ziehau [Tue, 22 Mar 2011 03:16:33 +0000 (11:16 +0800)]
acpi: Remove no longer needed file

13 years agoacpi: Minor style changes
Sepherosa Ziehau [Tue, 22 Mar 2011 02:48:48 +0000 (10:48 +0800)]
acpi: Minor style changes

13 years agoAcpi userland: adapt to 20110211 upgrade and sync with FreeBSD 8.0
Magliano Andrea [Thu, 3 Mar 2011 05:00:33 +0000 (06:00 +0100)]
Acpi userland: adapt to 20110211 upgrade and sync with FreeBSD 8.0

* acpiconf: show V/A battery units
* acpidump: add SRAT table support (FreebSD sync), untested

13 years agoSome minor changes
Magliano Andrea [Tue, 1 Mar 2011 09:03:14 +0000 (10:03 +0100)]
Some minor changes

* use AcpiUpdateAllGpes() (from FreeBSD 8.0)

* ACPI_THREAD_ID type is no longer configurable

* sync AcpiOsReadPciConfiguration with FreeBSD 8.0
  (and simplify bitmasking)

* because of AcpiOsDerivePciId() API removal, acpi_bus_number() is
  no longer needed

13 years agoDon't leave Value32 uinitialized (as it's not completely filled)
Magliano Andrea [Tue, 1 Mar 2011 07:42:05 +0000 (08:42 +0100)]
Don't leave Value32 uinitialized (as it's not completely filled)

OsdHardware.c:AcpiOsReadPort() casts Value to (u_int8_t *) resp.
(u_int16_t *) when assigning, thus leaving the upper region of Value32
untouched. If Value32 isn't initialized, random data remains trashing
the whole value.

Without this every bus_space_read_[12] is virtually screwed up.

13 years agoFurther acpica 20110211 code cleanup
Magliano Andrea [Tue, 1 Mar 2011 07:29:37 +0000 (08:29 +0100)]
Further acpica 20110211 code cleanup

In some files from the original taball, code was repeated n times
(this one was overseen)