dragonfly.git
2 years agomsgport.9: Fix a path.
Nuno Antunes [Mon, 3 Sep 2012 04:30:05 +0000 (05:30 +0100)]
msgport.9: Fix a path.

* sys/kern/netisr.c -> sys/net/netisr.c

Pointed-out-by: Romick <yellowrabbit2010@gmail.com>
2 years agoacpi: Remove some unused files.
Sascha Wildner [Mon, 3 Sep 2012 04:04:38 +0000 (06:04 +0200)]
acpi: Remove some unused files.

2 years agoRemove another unused header (<machine/ultrasound.h>).
Sascha Wildner [Mon, 3 Sep 2012 03:04:55 +0000 (05:04 +0200)]
Remove another unused header (<machine/ultrasound.h>).

2 years agoRemove an unused old ral(4) firmware header.
Sascha Wildner [Mon, 3 Sep 2012 02:28:19 +0000 (04:28 +0200)]
Remove an unused old ral(4) firmware header.

2 years agoRemove an unused and empty header (<machine/mtpr.h>).
Sascha Wildner [Mon, 3 Sep 2012 02:18:05 +0000 (04:18 +0200)]
Remove an unused and empty header (<machine/mtpr.h>).

2 years agolibprop: Add two missing MLINKS.
Sascha Wildner [Sun, 2 Sep 2012 16:08:50 +0000 (18:08 +0200)]
libprop: Add two missing MLINKS.

2 years agotbridge: Sync NAME, SYNOPSIS and MLINKS.
Sascha Wildner [Sun, 2 Sep 2012 15:55:30 +0000 (17:55 +0200)]
tbridge: Sync NAME, SYNOPSIS and MLINKS.

2 years agolibm: Add missing MLINK.
Sascha Wildner [Sun, 2 Sep 2012 15:47:26 +0000 (17:47 +0200)]
libm: Add missing MLINK.

2 years agoBring in a VFS_SET(9) manual page (from FreeBSD).
Sascha Wildner [Sun, 2 Sep 2012 11:31:33 +0000 (13:31 +0200)]
Bring in a VFS_SET(9) manual page (from FreeBSD).

2 years agolink.2: Use .Fn and add .Nm linkat
Sascha Wildner [Sat, 1 Sep 2012 22:26:04 +0000 (00:26 +0200)]
link.2: Use .Fn and add .Nm linkat

2 years agoamr(4): Remove some unused code (amr_timeout()).
Sascha Wildner [Fri, 31 Aug 2012 22:06:05 +0000 (00:06 +0200)]
amr(4): Remove some unused code (amr_timeout()).

Taken-from: FreeBSD

2 years agoAdd CARP support to the GENERIC kernels.
Sascha Wildner [Fri, 31 Aug 2012 21:00:35 +0000 (23:00 +0200)]
Add CARP support to the GENERIC kernels.

http://leaf.dragonflybsd.org/mailarchive/users/2012-08/msg00086.html

Suggested-by: Charles Rapenne <charles.rapenne@gmail.com>
Approved-by: sephe
2 years agousched_bsd4 - topology sched: go for safe defaults
Alex Hornung [Thu, 30 Aug 2012 08:17:12 +0000 (08:17 +0000)]
usched_bsd4 - topology sched: go for safe defaults

 * When we don't know how to handle the level of the current CPU, go for
   safe defaults disabling both cache-coherent and SMT scheduling.

 * This seems to be the case on single-core machines where the level is
   the PACKAGE_LEVEL.

Reported-by: Max Herrgard, Ferruccio Zamuner, David Shao
Dragonfly-bug: http://bugs.dragonflybsd.org/issue2408
Dragonfly-bug: http://bugs.dragonflybsd.org/issue2413

2 years agosorecvtcp: Remove unapplied code
Sepherosa Ziehau [Thu, 30 Aug 2012 04:13:08 +0000 (12:13 +0800)]
sorecvtcp: Remove unapplied code

2 years agosocket: Replicate soreceive() to sorecvtcp() for cleanup and optimization
Sepherosa Ziehau [Thu, 30 Aug 2012 03:26:13 +0000 (11:26 +0800)]
socket: Replicate soreceive() to sorecvtcp() for cleanup and optimization

2 years agojme: RX interrupt to ~6000Hz, TX interrupt to ~4000Hz
Sepherosa Ziehau [Wed, 29 Aug 2012 09:51:35 +0000 (17:51 +0800)]
jme: RX interrupt to ~6000Hz, TX interrupt to ~4000Hz

2 years agojme: Record number of times that RX ring becomes empty
Sepherosa Ziehau [Wed, 29 Aug 2012 09:35:08 +0000 (17:35 +0800)]
jme: Record number of times that RX ring becomes empty

2 years agojme: Allow MSI-X be evenly spreaded across CPUs
Sepherosa Ziehau [Wed, 29 Aug 2012 09:10:43 +0000 (17:10 +0800)]
jme: Allow MSI-X be evenly spreaded across CPUs

2 years agoigb: Set default RX descriptor count to 512
Sepherosa Ziehau [Wed, 29 Aug 2012 08:40:29 +0000 (16:40 +0800)]
igb: Set default RX descriptor count to 512

2 years agoacpi/sci: Test ACPI MADT interrupt override entry's preferred mode first
Sepherosa Ziehau [Wed, 29 Aug 2012 02:25:47 +0000 (10:25 +0800)]
acpi/sci: Test ACPI MADT interrupt override entry's preferred mode first

2 years agowpa_supplicant(8): Use libpcap functions.
Sascha Wildner [Tue, 28 Aug 2012 22:16:01 +0000 (00:16 +0200)]
wpa_supplicant(8): Use libpcap functions.

2 years agokernel/acpi: Add smart battery support.
Sascha Wildner [Tue, 28 Aug 2012 22:08:24 +0000 (00:08 +0200)]
kernel/acpi: Add smart battery support.

I don't know which laptops have them, as far as I can tell, none of mine
do. But as some seem to have it, it's worth supporting.

https://en.wikipedia.org/wiki/Smart_Battery_System

This is the patch from the tracker with some later updates FreeBSD did.

Taken-from:    FreeBSD
Dragonfly-bug: <https://bugs.dragonflybsd.org/issues/1229>
Submitted-by: Dmitry Komissaroff <aunoor@gmail.com>
2 years agompt(4): We don't have MOD_QUIESCE.
Sascha Wildner [Tue, 28 Aug 2012 16:32:09 +0000 (18:32 +0200)]
mpt(4): We don't have MOD_QUIESCE.

2 years agotcp/ncr: Avoid using magic number
Sepherosa Ziehau [Tue, 28 Aug 2012 07:10:58 +0000 (15:10 +0800)]
tcp/ncr: Avoid using magic number

2 years agotcp: RFC3517bis is now officially RFC6675
Sepherosa Ziehau [Tue, 28 Aug 2012 07:00:28 +0000 (15:00 +0800)]
tcp: RFC3517bis is now officially RFC6675

2 years agoacpi/pcib: Guard against invalid GSI provided by PRT
Sepherosa Ziehau [Tue, 28 Aug 2012 06:30:47 +0000 (14:30 +0800)]
acpi/pcib: Guard against invalid GSI provided by PRT

2 years agoacpi/resource: Use legacy_intr_find to detect invalid IRQ configure
Sepherosa Ziehau [Tue, 28 Aug 2012 06:12:10 +0000 (14:12 +0800)]
acpi/resource: Use legacy_intr_find to detect invalid IRQ configure

2 years agopci: Guard against wrong user supplied IRQ assignment
Sepherosa Ziehau [Tue, 28 Aug 2012 06:02:10 +0000 (14:02 +0800)]
pci: Guard against wrong user supplied IRQ assignment

2 years agoacpi/fadt: Make sure that SCI IRQ is valid
Sepherosa Ziehau [Tue, 28 Aug 2012 05:43:35 +0000 (13:43 +0800)]
acpi/fadt: Make sure that SCI IRQ is valid

2 years agopci/pir: Make sure that the IRQ is allowed to be configured
Sepherosa Ziehau [Tue, 28 Aug 2012 04:46:20 +0000 (12:46 +0800)]
pci/pir: Make sure that the IRQ is allowed to be configured

If the IRQ is already configured into non-level/low mode, we should not
change the trigger and polarity

2 years agoMachIntr: Add two methods to find IRQ
Sepherosa Ziehau [Tue, 28 Aug 2012 04:23:26 +0000 (12:23 +0800)]
MachIntr: Add two methods to find IRQ

- Find IRQ conforming to the specified trigger and polarity, if it was
  configured.
- Find IRQ by GSI, the located IRQ must conform to the specified trigger
  and polarity if it was configured.

2 years agoacpi/intr: Fix comment, source index is GSI _not_ IRQ
Sepherosa Ziehau [Mon, 27 Aug 2012 02:43:48 +0000 (10:43 +0800)]
acpi/intr: Fix comment, source index is GSI _not_ IRQ

2 years agokernel: Turn the delay before mounting root into a tunable.
Sascha Wildner [Mon, 27 Aug 2012 18:00:46 +0000 (20:00 +0200)]
kernel: Turn the delay before mounting root into a tunable.

Submitted-by: Francis Gudin <fgudin@nerim.net>
Dragonfly-bug: <http://bugs.dragonflybsd.org/issues/2373>

2 years ago/boot/defaults/loader.conf: Adjust a comment.
Sascha Wildner [Mon, 27 Aug 2012 17:57:49 +0000 (19:57 +0200)]
/boot/defaults/loader.conf: Adjust a comment.

2 years agoixgbe: add tso_pullup function
François Tigeot [Sat, 25 Aug 2012 15:25:26 +0000 (17:25 +0200)]
ixgbe: add tso_pullup function

* This routine rearranges mbuf chains to get more continuous bytes,
  potentially increasing tcp send performance

* Single TCP streams are now able to push slightly more than 4Gb/s
  under the right circumstances

Taken-from: Sepherosa Ziehau's work on the igb(4) driver

2 years agoixgbe: enable existing FreeBSD IPv4 TSO code
François Tigeot [Sat, 25 Aug 2012 14:35:41 +0000 (16:35 +0200)]
ixgbe: enable existing FreeBSD IPv4 TSO code

* This is not perfect but increases sending speeds up to about 3.5 Gb/s
  by TCP connection

* Total throughput has been measured up to 9.22 Gb/s in the sending
  direction

2 years agokernel: IFCAP_TSO is really IPv4-specific
François Tigeot [Mon, 20 Aug 2012 19:59:03 +0000 (21:59 +0200)]
kernel: IFCAP_TSO is really IPv4-specific

* Rename IFCAP_TSO to IFCAP_TSO4 to make things crystal clear, keeping
  the old name for compatibility

* Add IFCAP_TSO6 for the future

2 years agokernel - reduce kern.maxvnodes default on 32 bit systems
Matthew Dillon [Sun, 26 Aug 2012 17:09:19 +0000 (10:09 -0700)]
kernel - reduce kern.maxvnodes default on 32 bit systems

* Reduce maximum kern.maxvnodes on standard-configured 32 bit systems
  from ~100K vnodes to ~80K vnodes to reduce kmem usage.

2 years agogrowfs(8)/ffsinfo(8): Use __func__
Sascha Wildner [Sun, 26 Aug 2012 11:15:35 +0000 (13:15 +0200)]
growfs(8)/ffsinfo(8): Use __func__

2 years agogrowfs(8): Fix building with -DFS_DEBUG.
Sascha Wildner [Sun, 26 Aug 2012 11:14:13 +0000 (13:14 +0200)]
growfs(8): Fix building with -DFS_DEBUG.

2 years agomake_dev.9: Fix typo.
Sascha Wildner [Sun, 26 Aug 2012 10:35:14 +0000 (12:35 +0200)]
make_dev.9: Fix typo.

2 years agokernel/ffs: Compare v_rdev directly when updating mounts.
Sascha Wildner [Sun, 26 Aug 2012 09:55:37 +0000 (11:55 +0200)]
kernel/ffs: Compare v_rdev directly when updating mounts.

Nowadays the vnode's v_rdev is always associated, so it can be used
directly to compare the devices.

Pointed-out-by: alexh
2 years agokernel/linprocfs: Implement /proc/devices.
Sascha Wildner [Sat, 25 Aug 2012 20:48:12 +0000 (22:48 +0200)]
kernel/linprocfs: Implement /proc/devices.

As close to Linux' format as I could get, and enough to make LSI's
MegaCli utility (for RAID configuration) work with mfi(4).

2 years agokernel/devfs: Fill out cdev_t's si_major field (and adjust one use case).
Sascha Wildner [Sun, 26 Aug 2012 10:12:46 +0000 (12:12 +0200)]
kernel/devfs: Fill out cdev_t's si_major field (and adjust one use case).

2 years agokernel/devfs: Pass more arguments to the callback for devfs_scan_callback.
Sascha Wildner [Sun, 26 Aug 2012 10:31:13 +0000 (12:31 +0200)]
kernel/devfs: Pass more arguments to the callback for devfs_scan_callback.

is_alias signals whether it is an alias or a real device. If true, name
is the alias name. If false, it is the device name.

Reviewed-by: alexh
2 years agokernel/devfs: Rename devfs_nodetype members (conflicts with {,lin}procfs.h).
Sascha Wildner [Thu, 23 Aug 2012 22:40:22 +0000 (00:40 +0200)]
kernel/devfs: Rename devfs_nodetype members (conflicts with {,lin}procfs.h).

2 years agoixgbe: enable VLAN code
François Tigeot [Sat, 25 Aug 2012 12:38:08 +0000 (14:38 +0200)]
ixgbe: enable VLAN code

2 years agokernel/devfs: Assert that the callback isn't NULL in devfs_scan_callback().
Sascha Wildner [Sat, 25 Aug 2012 06:04:39 +0000 (08:04 +0200)]
kernel/devfs: Assert that the callback isn't NULL in devfs_scan_callback().

2 years agoAdd a device_get_name(9) manual page (from FreeBSD).
Sascha Wildner [Sat, 25 Aug 2012 05:12:50 +0000 (07:12 +0200)]
Add a device_get_name(9) manual page (from FreeBSD).

2 years agokernel - Do not allow destroyed namecache entries to be re-resolved
Matthew Dillon [Sat, 25 Aug 2012 00:09:58 +0000 (17:09 -0700)]
kernel - Do not allow destroyed namecache entries to be re-resolved

* Do not allow a destroyed namecache entry to be re-resolved, as it
  might resolve as a completely different file, or even resolve as
  a file when it was originally a directory and so forth.

* Fixes inconsistencies in the current-dir fields in proc->p_fd.

* Note that most VFS's can't re-resolve a disconnected directory
  anyway but HAMMER1 actually can, so this was causing a problem
  in tests with HAMMER1 (the same tests that originally crashed
  tmpfs were also crashing HAMMER1, but for a different reason).

2 years agotmpfs - Fix numerous races and adjust to use cache_unlink()
Matthew Dillon [Fri, 24 Aug 2012 23:30:20 +0000 (16:30 -0700)]
tmpfs - Fix numerous races and adjust to use cache_unlink()

* Fix numerous issues when chdir'd into a directory that is then
  rmdir'd.

* Rewrite the link count handling code for directories, also removing
  two now unecessary recursions.

* Do not allow new files to be created in a directory which has been
  rmdir'd.

* Use the new cache_unlink facility.

2 years agokernel - Adjust devfs, hammer, and puffs to use the new cache_unlink()
Matthew Dillon [Fri, 24 Aug 2012 23:29:49 +0000 (16:29 -0700)]
kernel - Adjust devfs, hammer, and puffs to use the new cache_unlink()

* Adjust devfs, hammer, and puffs to use the new cache_unlink() mechanic.

2 years agokernel - add cache_unlink(), fix a rename issue.
Matthew Dillon [Fri, 24 Aug 2012 23:26:31 +0000 (16:26 -0700)]
kernel - add cache_unlink(), fix a rename issue.

* Add a rollup function called cache_unlink() to handle namecache
  effects when unlinking a file.

* Change namecache semantics a bit.  When a namecache entry is unlinked
  we allow it to be left in the topology as long as the vnode survives,
  but marked NCF_DESTROYED so it does not conflict with any new entries
  that might be named the same, and does not get returned in lookup results.

* This will solve the issue when renaming a file over an empty directory
  (destroying the directory) when one or more processes are chdir'd into
  that directory.  This would cause the process nchdir stuff to get out
  of sync with the retained directory vnode because the same namecache
  entry would get reused.

2 years agomutex.9: Misc updates and minor improvements.
Nuno Antunes [Fri, 24 Aug 2012 14:45:35 +0000 (15:45 +0100)]
mutex.9: Misc updates and minor improvements.

* mtx_spinlock_ex() and mtx_spinlock_sh() do not exist anymore. mtx_spinlock()
  replaced both.

* Add MLINKS for mtx_lock(), mtx_spinlock_try() and mtx_spinunlock().

* Use .Fn for function name mtx_lock_ex_quick().

* Add some text describing mtx_lock(), mtx_spinlock_try() and mtx_spinunlock().

* Start a sentence with capital letter but avoid starting with a function name.

* Add a missing .Fa.

* Add a cross reference to sleep(9) in the SEE ALSO section.

* Bump date.

Reviewed-by: swildner
2 years agokernel - Add additional clock_gettime() modes
Matthew Dillon [Fri, 24 Aug 2012 07:44:54 +0000 (00:44 -0700)]
kernel - Add additional clock_gettime() modes

* Add the following:
CLOCK_UPTIME (same as MONOTONIC)
CLOCK_UPTIME_PRECISE (same as MONOTONIC)
CLOCK_UPTIME_FAST (faster, less precise)
CLOCK_REALTIME_PRECISE (same as REALTIME)
CLOCK_REALTIME_FAST (faster, less precise)
CLOCK_MONOTONIC_PRECISE (same as MONOTONIC)
CLOCK_MONOTONIC_FAST (faster, less precise)
CLOCK_SECOND (just returns 'time_second')

Taken-from: FreeBSD

2 years agosysperf - Add tests for clock_gettime(CLOCK_*_FAST...) modes
Matthew Dillon [Fri, 24 Aug 2012 07:43:58 +0000 (00:43 -0700)]
sysperf - Add tests for clock_gettime(CLOCK_*_FAST...) modes

* Add tests for some of the new clock_gettime() modes.

2 years agousched_bsd4 - use wakeup_mycpu as appropriate
Alex Hornung [Fri, 24 Aug 2012 06:57:43 +0000 (06:57 +0000)]
usched_bsd4 - use wakeup_mycpu as appropriate

 * In the need_user_resched_remote we need to use wakeup_mycpu to avoid
   sending out IPIs triggering a deep IPI recursion panic.

 * In the setrunqueue case use wakeup_mycpu as an optimization, since we
   know that we are on the same CPU as the helper thread we want to wake
   up.

In-discussion-with: Matt Dillon
Reported-by: ftigeot
2 years agousched_bsd4 - fix incorrect use of PINTERLOCKED tsleep
Alex Hornung [Fri, 24 Aug 2012 06:44:43 +0000 (06:44 +0000)]
usched_bsd4 - fix incorrect use of PINTERLOCKED tsleep

 * The first tsleep in sched_thread has not been interlocked, so it is
   not valid to call tsleep(..., PINTERLOCKED, ...).

2 years agofastbulk - Exit w/success on more conditions
Matthew Dillon [Fri, 24 Aug 2012 04:53:28 +0000 (21:53 -0700)]
fastbulk - Exit w/success on more conditions

* If the binary package build succeeds but the pkg_add fails it is likely
  due to an install conflict.  Exit w/success for this case (since our goal
  is to generate the binary package, we succeeded!).

* Do an early check to see if the binary package has already been built
  and exit immediately if it has.

2 years agokernel - Fix pmap_remove() issue.
Matthew Dillon [Fri, 24 Aug 2012 03:44:53 +0000 (20:44 -0700)]
kernel - Fix pmap_remove() issue.

* When the inner loop of pmap_remove() broke out due to pmap_remove_pte()
  blocking it 'jumped' the sindex to pdnxt, thus any remaining pages in
  that page table page would get skipped.

* pmap_remove_pte() and friends used to return non-zero if they 'blocked'.
  Unfortunately they could actually block whether they returned 0 or non-zero,
  causing the problem.  Remove the check entirely.

* Adjust misc functions which we no longer need the return value for.

* I don't know if this had anything to do with the wire_count panic.
  The failure mode should have been caught by numerous other assertions
  in the code but wasn't.  get_ptbase() relies on a test of pmap->pm_cached
  to determine if a page directory page mapping changes so it should not
  have been possible for it to continue the loop and access a stale ptep.

  If it were possible it might account for a wire_count panic later on but
  it doesn't seem like it should be possible.

2 years agokernel - Implement Errata 721 for 32-bit kernels too
Matthew Dillon [Fri, 24 Aug 2012 03:41:26 +0000 (20:41 -0700)]
kernel - Implement Errata 721 for 32-bit kernels too

* The AMD errata 721 definitely happens on cpus running in cpu bit mode
  but I got a weird kernel crash on 32-bit (which I don't have time to
  follow up) so I decided, what the heck, might as well do it on 32-bit
  boxes too.

2 years agokernel - Do not allow the time to be set to { 0, 0 }
Matthew Dillon [Fri, 24 Aug 2012 03:39:05 +0000 (20:39 -0700)]
kernel - Do not allow the time to be set to { 0, 0 }

* The settimeofday() system call now fails with EINVAL if passed
  a { 0, 0 } tv structure.

* No need to allow this case, and it may fix some weird pkgsrc bulkbuild
  issues.  For some reason something in the bulk build calls settimeofday()
  with { 0, 0 } when linux.ko/linprocfs are not loaded.

2 years agofastbulk - Rework and clean up the Makefile
Matthew Dillon [Fri, 24 Aug 2012 03:36:15 +0000 (20:36 -0700)]
fastbulk - Rework and clean up the Makefile

* Rewrite the Makefile.  'make' with no arguments for more information.

* Proactively check and remove a dead /var/db/pkg directory after
  each build.

2 years agolinprocfs - Fix process exit / procfs vnode access race & stepping races
Matthew Dillon [Fri, 24 Aug 2012 00:00:49 +0000 (17:00 -0700)]
linprocfs - Fix process exit / procfs vnode access race & stepping races

* Taken from procfs, fix exit / vnode access races

* Fix stepping races.

2 years agolinprocfs - Fix missing PRELE()s.
Matthew Dillon [Thu, 23 Aug 2012 23:49:08 +0000 (16:49 -0700)]
linprocfs - Fix missing PRELE()s.

* The DFly pfind() API changed a while ago and now PHOLD()s the process,
  add missing PRELE()s to linprocfs that were missed during that
  change-over.

Reported-by: marino, alexh
2 years agomake_dev.9: devfs_scan_callback() takes an arg to pass to the callback.
Sascha Wildner [Thu, 23 Aug 2012 22:12:00 +0000 (00:12 +0200)]
make_dev.9: devfs_scan_callback() takes an arg to pass to the callback.

2 years ago<sys/devfs.h>: Fix comment typos.
Sascha Wildner [Thu, 23 Aug 2012 21:24:22 +0000 (23:24 +0200)]
<sys/devfs.h>: Fix comment typos.

2 years agomsgport.9: Sort cross references alphabetically.
Nuno Antunes [Thu, 23 Aug 2012 07:37:23 +0000 (08:37 +0100)]
msgport.9: Sort cross references alphabetically.

We sort SEE ALSOs first by section, then alphabetically.

Pointed-out-by: swildner
2 years agomsgport.9: Add cross reference to sleep(9).
Nuno Antunes [Thu, 23 Aug 2012 07:21:57 +0000 (08:21 +0100)]
msgport.9: Add cross reference to sleep(9).

2 years agosleep.9: Catch up with spin_{,un}lock_wr() -> spin_{,un}lock() rename of 2 years...
Nuno Antunes [Wed, 22 Aug 2012 06:47:11 +0000 (07:47 +0100)]
sleep.9: Catch up with spin_{,un}lock_wr() -> spin_{,un}lock() rename of 2 years ago.

* Accordingly rename function names in the ssleep() implementation example.

* We have only exclusive spinlocks, remove the "(write)" reference which was
  implicitly suggesting that we have another kind.

* While here, uncapitalize first letter of function a name.

2 years agovm: Put vm_page_alloc_contig debug prints under vm_contig_verbose
Sepherosa Ziehau [Thu, 23 Aug 2012 05:49:23 +0000 (13:49 +0800)]
vm: Put vm_page_alloc_contig debug prints under vm_contig_verbose

Tunable vm.contig_verbose could be used to control vm_contig_verbose.
It is disabled by default.

Well, it is too verbose even for bootverbose ...

2 years agojme: Add TSO support
Sepherosa Ziehau [Thu, 23 Aug 2012 05:27:15 +0000 (13:27 +0800)]
jme: Add TSO support

2 years agoroute: Routing table is replicated to all CPUs, not # of CPUs on power of 2
Sepherosa Ziehau [Thu, 23 Aug 2012 03:04:19 +0000 (11:04 +0800)]
route: Routing table is replicated to all CPUs, not # of CPUs on power of 2

DragonFly-bug: http://bugs.dragonflybsd.org/issues/2355

2 years agokernel - Attempt to fix i386 wire_count panic (98)
Matthew Dillon [Wed, 22 Aug 2012 23:54:19 +0000 (16:54 -0700)]
kernel - Attempt to fix i386 wire_count panic (98)

* Previous patch missed a code path.

* Cleanup

2 years agokernel - Fix 32-bit build
Matthew Dillon [Wed, 22 Aug 2012 23:44:55 +0000 (16:44 -0700)]
kernel - Fix 32-bit build

* Fix kprintf format mismatches in usched_bsd4.c for 32-bit builds.

2 years agofastbulk - more work
Matthew Dillon [Wed, 22 Aug 2012 23:17:01 +0000 (16:17 -0700)]
fastbulk - more work

* Output start and end date stamps

* Do a manual checksum test and delete the distfile if it fails (and the
  distfile is over 4 hours old).

* Do a better job deleting conflicting versions of a package.

2 years agofastbulk - More fixes and improvements
Matthew Dillon [Wed, 22 Aug 2012 22:07:15 +0000 (15:07 -0700)]
fastbulk - More fixes and improvements

* Fix improper cleaning of the "${BUILDROOT}/usr/obj/work" directory

* Use lockf to lock the wildcard name for a package, serializing the
  builds of any related packages so they don't interfere with each
  other.

* Clean the work directory on success or failure instead of only on
  success, othrewise a large >10G tmpfs is needed.

2 years agofastbulk - Remove core files & empty dirs from /var/pkg/db
Matthew Dillon [Wed, 22 Aug 2012 19:40:47 +0000 (12:40 -0700)]
fastbulk - Remove core files & empty dirs from /var/pkg/db

* The presence of a core file prevents the pkg code from properly handling
  the directory, causing installs from packages to fail if any dependency
  has a broken /var/pkg/db directory.

* Clean out any core files and empty dirs before starting a build.

2 years agoAdd an MLINK for KTR_COND_LOG.
Sascha Wildner [Wed, 22 Aug 2012 14:30:13 +0000 (16:30 +0200)]
Add an MLINK for KTR_COND_LOG.

While here, sort the msgport.9 MLINKS alphabetically.

2 years agoktr.4 - add note about KTR_USCHED_BSD4
Alex Hornung [Wed, 22 Aug 2012 15:20:07 +0000 (15:20 +0000)]
ktr.4 - add note about KTR_USCHED_BSD4

2 years agousched_bsd4 - Topology-aware scheduling
Mihai Carabas [Wed, 22 Aug 2012 10:03:45 +0000 (10:03 +0000)]
usched_bsd4 - Topology-aware scheduling

 * Part of "Add SMT/HT awareness to DragonFly BSD scheduler" GSoC
   project.

 * Details at: http://leaf.dragonflybsd.org/mailarchive/kernel/2012-08/msg00009.html

Mentored-by: Alex Hornung (alexh@)
Sponsored-by: Google Summer of Code 2012
2 years agovkernel{,64} - CPU topology support
Mihai Carabas [Wed, 22 Aug 2012 10:03:12 +0000 (10:03 +0000)]
vkernel{,64} - CPU topology support

 * Part of "Add SMT/HT awareness to DragonFly BSD scheduler" GSoC
   project.

 * Details at: http://leaf.dragonflybsd.org/mailarchive/kernel/2012-08/msg00009.html

Mentored-by: Alex Hornung (alexh@)
Sponsored-by: Google Summer of Code 2012
2 years agoCPU topology support
Mihai Carabas [Wed, 22 Aug 2012 10:02:58 +0000 (10:02 +0000)]
CPU topology support

 * Part of "Add SMT/HT awareness to DragonFly BSD scheduler" GSoC
   project.

 * Details at: http://leaf.dragonflybsd.org/mailarchive/kernel/2012-08/msg00009.html

Mentored-by: Alex Hornung (alexh@)
Sponsored-by: Google Summer of Code 2012
2 years agoktr - add KTR_COND_LOG
Mihai Carabas [Wed, 22 Aug 2012 13:07:18 +0000 (13:07 +0000)]
ktr - add KTR_COND_LOG

 * KTR_COND_LOG provides conditional logging; the second parameter passed
   in is a condition which determines whether the entry is logged or
   not.

 * It provides a neater way to log conditionally than having to wrap a
   KTR in an if, which may then end up being empty if KTR is disbled.

2 years agomsgport.9: Fix some minor mdoc issues.
Sascha Wildner [Wed, 22 Aug 2012 13:18:31 +0000 (15:18 +0200)]
msgport.9: Fix some minor mdoc issues.

2 years agofastbulk - Adjustments to fix various issues (2)
Matthew Dillon [Wed, 22 Aug 2012 06:46:58 +0000 (23:46 -0700)]
fastbulk - Adjustments to fix various issues (2)

* Use tmpfs for /usr/obj, this speeds up builds by a lot.
  make w/ -DNOTMPFS will use the hard drive if your tmpfs
  isn't big enough.

* Cleanup {chroot}/tmp/logs/run/* when restarting

* When restarting handle the case where the correct package has
  already been installed.

* When restarting handle the case where the binary package already
  exists.

* Use pkg_add -f when adding existing packages.

2 years agofastbulk - Adjustments to fix various issues
Matthew Dillon [Wed, 22 Aug 2012 05:18:40 +0000 (22:18 -0700)]
fastbulk - Adjustments to fix various issues

* We weren't properly installing the binary packages we were creating,
  resulting in parallel build races.  Fixing this fixes most of the
  issues fastbulk was having.

* Change the way pkgsrc is mounted... copy it to /build/fastbulk and add
  code to ensure that it is clean.

* resident the bmake binary to speed things up a bit.

2 years agokernel - Attempt to fix i386 wire_count panic
Matthew Dillon [Wed, 22 Aug 2012 05:15:47 +0000 (22:15 -0700)]
kernel - Attempt to fix i386 wire_count panic

* Finally found what could be the issue.  get_pv_entry() calls zalloc()
  which can fall through to zget() which obtains a zalloc-related LWKT
  token.

  This can temporarily break the vm_token and allow another thread to get
  in and change the pmap pte entry out from under a pmap_enter(), causing
  the pmap_enter() to potentially remove an extra wire_count from the
  page table page.

* Fix by pre-allocating the pv entry, taking it out of the critical path,
  and adjusting a few other bits of code to test the *pte closer to
  the code which replaces it for the purposes of adjusting the wire_count.

2 years agojme: Let the software to check hardware supplied hash
Sepherosa Ziehau [Wed, 22 Aug 2012 01:23:09 +0000 (09:23 +0800)]
jme: Let the software to check hardware supplied hash

As far as I have tested, these chips could generate wrong hash under
certain situation.

2 years agoether: Add instrument to detect wrong hardware supplied hash
Sepherosa Ziehau [Wed, 22 Aug 2012 01:19:25 +0000 (09:19 +0800)]
ether: Add instrument to detect wrong hardware supplied hash

If wrong hardware supplied hash is detected, the packet will be
redispatched to the correct netisr

2 years agokernel/linprocfs: Fix accessing files in /proc (such as /proc/meminfo).
Sascha Wildner [Tue, 21 Aug 2012 18:57:19 +0000 (20:57 +0200)]
kernel/linprocfs: Fix accessing files in /proc (such as /proc/meminfo).

It is the same fix that was applied to procfs with 198c0ff2.

2 years agokernel/linprocfs: Fix a panic when accessing /proc/<pid>/maps.
Sascha Wildner [Tue, 21 Aug 2012 20:44:09 +0000 (22:44 +0200)]
kernel/linprocfs: Fix a panic when accessing /proc/<pid>/maps.

Analogous to procfs.

2 years agoixgbe: Rework ixgbe_xmit()
François Tigeot [Tue, 21 Aug 2012 19:42:33 +0000 (21:42 +0200)]
ixgbe: Rework ixgbe_xmit()

* Use bus_dmamap_load_mbuf_segment()

* Clean up error handling code, following the example of the igb(4)
  driver

2 years agokernel/procfs: Remove some unneeded parentheses.
Sascha Wildner [Tue, 21 Aug 2012 15:39:02 +0000 (17:39 +0200)]
kernel/procfs: Remove some unneeded parentheses.

2 years agokernel/linprocfs: Remove an unreached return.
Sascha Wildner [Tue, 21 Aug 2012 13:04:43 +0000 (15:04 +0200)]
kernel/linprocfs: Remove an unreached return.

2 years agotools: Remove old script for installing 3rd party source drivers.
Sascha Wildner [Tue, 21 Aug 2012 00:02:12 +0000 (02:02 +0200)]
tools: Remove old script for installing 3rd party source drivers.

2 years agomdoc: Add a msgport(9) manual page documenting LWKT message passing interface.
Nuno Antunes [Tue, 14 Aug 2012 17:48:10 +0000 (18:48 +0100)]
mdoc: Add a msgport(9) manual page documenting LWKT message passing interface.

2 years agoip: Put fast dispatch/slow dispatch and hashing done by IP under RSS_DEBUG
Sepherosa Ziehau [Tue, 21 Aug 2012 02:45:01 +0000 (10:45 +0800)]
ip: Put fast dispatch/slow dispatch and hashing done by IP under RSS_DEBUG

While im here, using atomic operation to increment debug counters

2 years agortld: Perform reloc before filtree dependency object init
John Marino [Mon, 20 Aug 2012 19:27:06 +0000 (21:27 +0200)]
rtld: Perform reloc before filtree dependency object init

Ensure that for the object which is a dependency of some filtree,
relocations are performed before the object's initializer is called.
While dlopen()ing an object, relocate the whole DAG rooted in the
object instead of only relocating the object itself and list of newly
loaded dependencies.

Reversed sequence currently can occur if the same object is a
dependency for both filtree and filter since filtrees are loaded typically
during the relocation processing when some filter dependencies might be
already loaded but not yet relocated.

Taken-from: FreeBSD SVN 237659 (27 June 2012)

2 years agortld: Delay DF_1_NODELETE process until object DAG loaded
John Marino [Mon, 20 Aug 2012 18:26:43 +0000 (20:26 +0200)]
rtld: Delay DF_1_NODELETE process until object DAG loaded

The current code can miss searching dependencies that haven't been loaded
yet.  Delay DF_1_NODELETE processing until object DAG is fully loaded.

Taken-from: FreeBSD SVN 239253 (14 Aug 2012)