dragonfly.git
11 years agosleep.9: s/PINTERLOCK/PINTERLOCKED/
Sascha Wildner [Fri, 12 Oct 2012 19:27:22 +0000 (21:27 +0200)]
sleep.9: s/PINTERLOCK/PINTERLOCKED/

11 years agocustomcc/compilers.conf: Some adjustments and simplifications.
Sascha Wildner [Fri, 12 Oct 2012 08:57:12 +0000 (10:57 +0200)]
customcc/compilers.conf: Some adjustments and simplifications.

* pkgsrc's clang no longer needs special handling for C++ compilation.

* Use gcc44's cpp, gcc41 is gone.

* -dumpversion is now understool by both pkgsrc's and SVN trunk's
  clang, so no special handling needed for that either.

Based on an older patch I did with Juan Francisco a year ago.

Reported-by: Juan Francisco Cantero Hurtado <iam@juanfra.info>
               Joris Giovannangeli <joris@giovannangeli.fr>
Tested-by: Joris Giovannangeli <joris@giovannangeli.fr>
Dragonfly-bug: <http://bugs.dragonflybsd.org/issues/2205>

11 years agokernel: Some adjustments for the GCC 4.1 removal in Makefiles.
Sascha Wildner [Fri, 12 Oct 2012 08:16:20 +0000 (10:16 +0200)]
kernel: Some adjustments for the GCC 4.1 removal in Makefiles.

11 years agoUPDATING: Some words about GCC 4.7.
Sascha Wildner [Fri, 12 Oct 2012 08:12:57 +0000 (10:12 +0200)]
UPDATING: Some words about GCC 4.7.

11 years agocompilers.conf.5: We only describe non-base compilers here.
Sascha Wildner [Fri, 12 Oct 2012 07:53:20 +0000 (09:53 +0200)]
compilers.conf.5: We only describe non-base compilers here.

"gcc47" is no longer handled via compilers.conf.

11 years agoMakefile_upgrade.inc: Adjust modules path.
Sascha Wildner [Fri, 12 Oct 2012 05:00:48 +0000 (07:00 +0200)]
Makefile_upgrade.inc: Adjust modules path.

This can be helpful in cases where old modules for some reason
had not been cleaned when the location was still /boot/modules
and have ended up getting objcopy'd to /boot/kernel after the
location was changed.

11 years agokernel - Fix i386 pmap bug
Matthew Dillon [Thu, 11 Oct 2012 21:34:09 +0000 (14:34 -0700)]
kernel - Fix i386 pmap bug

* mpte will be NULL for KVM page table pages, there is no need to track
  the wire count.  Conditionalize-out the unwiring call.

* This is believed to be (this time for sure to the third power!) the
  PG_BUSY crash that vsrinivas was getting on i386 related to paging
  in a swapped kernel pipe buffer.

11 years agokernel - Make pcb_onfault more robust.
Matthew Dillon [Thu, 11 Oct 2012 19:12:25 +0000 (12:12 -0700)]
kernel - Make pcb_onfault more robust.

* Record the expected kernel stack pointer along with the pcb_onfault
  action.  Adjust the trap code to only take the action if the frame's
  stack pointer matches the recorded expected stack pointer.

  Otherwise this might be a recursive trap and we definitely do NOT want
  to execute the on-fault stuff in that situation.

* Prior to these changes recursive traps during uiomove()s could result
  in a kernel stack so corrupt that finding the actual cause of the panic
  becomes impossible.  This is believed to be making life difficult for us
  trying to track down a particular i386 panic.

* On x86-64 we had to increase the size of the pcb structure.  kgdb on
  kernel cores and live kernels will be effected (needs recompile).

11 years agotop - Use RES by default instead of PRES
Matthew Dillon [Thu, 11 Oct 2012 15:36:45 +0000 (08:36 -0700)]
top - Use RES by default instead of PRES

* The kernel support for PRES was removed during the SMP fine-grained
  locking work on the VM system last year so top was reporting 0K for
  everything.  Change top to go back to RES.

11 years agoacpi/pstate: Be lenient about wrong # of processors in the power domain
Sepherosa Ziehau [Thu, 11 Oct 2012 06:54:52 +0000 (14:54 +0800)]
acpi/pstate: Be lenient about wrong # of processors in the power domain

Some stupid BIOSes seem to consider two logic CPUs (hyperthreading) as
one CPU.  Don't bail out; just print some error messages.

Reported-by: dillon@
11 years agokernel - Use atomic op for usched_global_cpumask
Matthew Dillon [Thu, 11 Oct 2012 06:43:03 +0000 (23:43 -0700)]
kernel - Use atomic op for usched_global_cpumask

* Use atomic op for usched_global_cpumask in the cpu init code.  This
  code is serialized anyway, I think, but it is best to be safe.

* Add cpu_ccfence() to ensure that the compiler does not reorder the
  clearing of the mask in the cpusync code.

11 years agokernel - Remove debugging from i386 pmap
Matthew Dillon [Wed, 10 Oct 2012 23:43:57 +0000 (16:43 -0700)]
kernel - Remove debugging from i386 pmap

* Remove i386 pmap debugging kprintf.

11 years agokernel - Add MODULE_VERSION for if_ale
Matthew Dillon [Wed, 10 Oct 2012 23:36:19 +0000 (16:36 -0700)]
kernel - Add MODULE_VERSION for if_ale

* Seems to solve boot-time lockup when if_ale is built into the kernel
  AND also specified in /boot/loader.conf

* Related issues now being reviewed by swildner

11 years agokernel - Probable fix to vm_fault: PG_BUSY panic on i386
Matthew Dillon [Wed, 10 Oct 2012 21:47:57 +0000 (14:47 -0700)]
kernel - Probable fix to vm_fault: PG_BUSY panic on i386

* The info structure for the pmap_inval*() API is only initialized
  conditionally as an optimization.

* There was a case where the info structure was being used without
  first being initialized which matches reported panics (essentially
  a pipe buffer page in kernel memory is swapped out and the faulted back
  in during a uiomove).

Reported-by: vsrinivas, marino, several others
11 years agokernel - Fix missing LWKT token init in linprocfs
Matthew Dillon [Wed, 10 Oct 2012 20:24:59 +0000 (13:24 -0700)]
kernel - Fix missing LWKT token init in linprocfs

* Fix missing LWKT token init in linprocfs.  linprocfs_init() was not
  being called.

Reported-by: marino
11 years agoMerge branch 'DragonFly_RELEASE_3_2' of ssh://crater.dragonflybsd.org/repository...
Justin C. Sherrill [Wed, 10 Oct 2012 02:44:26 +0000 (22:44 -0400)]
Merge branch 'DragonFly_RELEASE_3_2' of ssh://crater.dragonflybsd.org/repository/git/dragonfly into DragonFly_RELEASE_3_2

11 years agoPoint the pkgsrc make targets at newest quarterly release.
Justin C. Sherrill [Wed, 10 Oct 2012 02:43:14 +0000 (22:43 -0400)]
Point the pkgsrc make targets at newest quarterly release.
I'm building packages to match now too.

11 years ago<sys/param.h>: Fix wrongly merged comments on the release branch.
Sascha Wildner [Tue, 9 Oct 2012 20:47:57 +0000 (22:47 +0200)]
<sys/param.h>: Fix wrongly merged comments on the release branch.

11 years agoBranching 3.2/3.3. v3.2.0
Justin C. Sherrill [Tue, 9 Oct 2012 03:27:30 +0000 (23:27 -0400)]
Branching 3.2/3.3.

11 years agokernel - Fix UP build for usched_dfly.c
Matthew Dillon [Tue, 9 Oct 2012 00:56:09 +0000 (17:56 -0700)]
kernel - Fix UP build for usched_dfly.c

* Fix UP build errors

Reported-by: multiple
11 years agovkernel - Properly initialize pool tokens.
Antonio Huete Jimenez [Mon, 8 Oct 2012 14:28:20 +0000 (16:28 +0200)]
vkernel - Properly initialize pool tokens.

 * There was no call to init_locks() in vkernel's initialization
   code, so provide one.

 * As pool tokens weren't initialized, the attempt to copy its
   t_desc in lwkt_getalltokens() resulted in a panic. This should
   be fixed now.

 * Add a KASSERT() so that uninitialized tokens will panic the system.

Suggested by: swildner

11 years agokmalloc.9: Document M_POWEROF2.
Sascha Wildner [Mon, 8 Oct 2012 12:53:28 +0000 (14:53 +0200)]
kmalloc.9: Document M_POWEROF2.

11 years agokmalloc: Use 'fls' to round up the size to the nearest power of 2
Sepherosa Ziehau [Mon, 8 Oct 2012 12:14:56 +0000 (20:14 +0800)]
kmalloc: Use 'fls' to round up the size to the nearest power of 2

On average tests conducted on Intel i3, i7 and xeon-e3 in x86_64 mode,
fls version is 3 times faster than the simple loop version.

Submitted-by: vsrinivas@
Also M_POWEROF2 flag is used to do the nearest power of 2 size rounding
up, instead of a seperate function (was kmalloc_powerof2)

Suggested-by: sjg@, vsrinivas@
11 years agolibgcc.a47: build with -fpic
John Marino [Sun, 7 Oct 2012 17:34:31 +0000 (19:34 +0200)]
libgcc.a47: build with -fpic

The vendor makefile builds libgcc.a with the PIC flag.  The x86_64
platform needs it for packages that need need to link to libgcc.a

11 years agobuild - Unbreak world
Matthew Dillon [Sun, 7 Oct 2012 23:39:37 +0000 (16:39 -0700)]
build - Unbreak world

* Fix issue w/ last commit

Submitted-by: marino
11 years agoUse GCC's builtin offset_of as the first option
John Marino [Sun, 7 Oct 2012 21:27:36 +0000 (23:27 +0200)]
Use GCC's builtin offset_of as the first option

Other than C++ code, the GCC offsetof builtin was never getting used.
The version that did get expanded could not be used for array
declarations on GCC 4.5 and later because it wasn't considered a
constant expression by those later GCC compilers.

The first symptom was seen when building world with GCC 4.6, but the
the offsetof expansion was finally identified as the cause of the
problem while discussion PostgreSQL 9.1 build failures on DragonFly.
Since DragonFly was the only platform exibiting the behavior, the
problem was narrowed down to the offsetof macro or the compiler itself.
Fixing the macro allowed the unpatched pgsql to compile.

Thanks-to: Tom Lane

11 years agoifpoll: Utilize kmalloc_cachealign()
Sepherosa Ziehau [Sun, 7 Oct 2012 06:14:22 +0000 (14:14 +0800)]
ifpoll: Utilize kmalloc_cachealign()

11 years agobusdma: Panic if the kmalloc_powerof2() fails to meet the dma requirement
Sepherosa Ziehau [Sun, 7 Oct 2012 04:53:42 +0000 (12:53 +0800)]
busdma: Panic if the kmalloc_powerof2() fails to meet the dma requirement

11 years agobusdma: Utilize kmalloc_powerof2()
Sepherosa Ziehau [Sun, 7 Oct 2012 04:40:57 +0000 (12:40 +0800)]
busdma: Utilize kmalloc_powerof2()

11 years agoigb: Use kmalloc_cachealign to allocate rx ring, tx ring and msix data
Sepherosa Ziehau [Sun, 7 Oct 2012 04:22:35 +0000 (12:22 +0800)]
igb: Use kmalloc_cachealign to allocate rx ring, tx ring and msix data

11 years agokmalloc: Add kmalloc_powerof2() and kmalloc_cachealign()
Sepherosa Ziehau [Sun, 7 Oct 2012 04:14:52 +0000 (12:14 +0800)]
kmalloc: Add kmalloc_powerof2() and kmalloc_cachealign()

kmalloc_powerof2()
    Ensures that the returned address will be power of 2 aligned.

kmalloc_cachealign()
    Ensures that the returned address will be cacheline size aligned.
    It is useful to allocate structs declared with __cachealign
    attribute.

These two function probably should _not_ be used on the hot code path
due to the computational cost to find the nearest power of 2 size.

11 years agoigb: Cache align msix, rx and tx data
Sepherosa Ziehau [Sat, 6 Oct 2012 15:03:22 +0000 (23:03 +0800)]
igb: Cache align msix, rx and tx data

11 years agoigb: Remove unused code
Sepherosa Ziehau [Sat, 6 Oct 2012 15:02:52 +0000 (23:02 +0800)]
igb: Remove unused code

11 years agoigb: Change polling(4) support to ifpoll support
Sepherosa Ziehau [Sat, 6 Oct 2012 10:59:50 +0000 (18:59 +0800)]
igb: Change polling(4) support to ifpoll support

For 82576, this means that all of the 16 RX rings could be enabled
and fully utilized; even in MSI-X mode, only 8 RX rings could be
used.

11 years agokernel/ixgbe: Remove double definition.
Sascha Wildner [Sat, 6 Oct 2012 13:03:29 +0000 (15:03 +0200)]
kernel/ixgbe: Remove double definition.

11 years agoixgbe: Define missing DEBUGOUT# macros.
François Tigeot [Sat, 6 Oct 2012 09:27:28 +0000 (11:27 +0200)]
ixgbe: Define missing DEBUGOUT# macros.

DEBUGOUT[45] are not yet used but are being defined pre-emptively
to avoid future build breakage

Obtained-from: FreeBSD

11 years agokernel/hammer: Staticize hammer_skip_redo.
Sascha Wildner [Sat, 6 Oct 2012 10:14:45 +0000 (12:14 +0200)]
kernel/hammer: Staticize hammer_skip_redo.

It's just used in hammer_recover.c.

11 years agore: Don't enable MSI by default
Sepherosa Ziehau [Sat, 6 Oct 2012 10:00:45 +0000 (18:00 +0800)]
re: Don't enable MSI by default

11 years agoigb: Initialize if_name so functions used on if_init could use if_printf
Sepherosa Ziehau [Sat, 6 Oct 2012 09:45:08 +0000 (17:45 +0800)]
igb: Initialize if_name so functions used on if_init could use if_printf

11 years agoRemove some more GCC 4.1 specific files via 'make upgrade'.
Sascha Wildner [Fri, 5 Oct 2012 13:56:03 +0000 (15:56 +0200)]
Remove some more GCC 4.1 specific files via 'make upgrade'.

11 years agore(4): Use MSI if device supports it.
Tim Bisson [Mon, 19 Mar 2012 02:39:37 +0000 (19:39 -0700)]
re(4): Use MSI if device supports it.

RT8168E supports MSI.

11 years agokernel - Acquire vm_token in pmap_remove_all() (3)
Matthew Dillon [Fri, 5 Oct 2012 05:15:04 +0000 (22:15 -0700)]
kernel - Acquire vm_token in pmap_remove_all() (3)

* Correct bug in last commit, resident_count adjustment has to be
  moved past the revalidation.

11 years agokernel - Acquire vm_token in pmap_remove_all() (2)
Matthew Dillon [Fri, 5 Oct 2012 05:09:30 +0000 (22:09 -0700)]
kernel - Acquire vm_token in pmap_remove_all() (2)

* Remove this, the token is already acquired in all pmap_remove_all()
  paths.

* Instead, try catching the problem in pmap_remove_all(m) by re-validating
  the pv_entry (essentially detecting a removal race).

11 years agokernel - (fix syntax error last commit)
Matthew Dillon [Fri, 5 Oct 2012 04:16:02 +0000 (21:16 -0700)]
kernel - (fix syntax error last commit)

* i386 pmap.c

11 years agokernel - Acquire vm_token in pmap_remove_all()
Matthew Dillon [Fri, 5 Oct 2012 04:14:32 +0000 (21:14 -0700)]
kernel - Acquire vm_token in pmap_remove_all()

* Kitchen sink try to fix the wire_count panic, acquire vm_token
  in pmap_remove_all().

11 years agokernel - Fix edge case with machdep.pmap_mmu_optimize on x86-64
Matthew Dillon [Fri, 5 Oct 2012 03:51:02 +0000 (20:51 -0700)]
kernel - Fix edge case with machdep.pmap_mmu_optimize on x86-64

* Fix two edge cases when enabling or disabling machdep.pmap_mmu_optimize,
  causing a shared page table page to be reverted to a local page table page
  and vise-versa.

* Remove debugging kprintf()s

Reported-by: thesjg
11 years agogcc47: Remove a gcc-aux leftover.
Sascha Wildner [Thu, 4 Oct 2012 16:58:37 +0000 (18:58 +0200)]
gcc47: Remove a gcc-aux leftover.

11 years agobsd.prog.mk: Avoid redefining $PROG target
John Marino [Thu, 4 Oct 2012 16:17:47 +0000 (18:17 +0200)]
bsd.prog.mk: Avoid redefining $PROG target

In rare cases, the PROG target is intentionally redefined before
including bsd.prog.mk, but when that happens a target redefinition
warning is emitting.  This adds a check for a pre-existing $PROG
target before attempting to define it.

It stops warnings from being emitted when loader and loader_tftp
are built.

11 years agogcc47: Restore cross-build capability
John Marino [Thu, 4 Oct 2012 16:03:52 +0000 (18:03 +0200)]
gcc47: Restore cross-build capability

The internal specs of gcc47 featured an hardcoded standard include
directory which prevented cross-target builds.  The same mistake also
caused the "crosstools" compiler in a native build to look at the host
system includes instead of the world_{TARGET}/usr/includes directory.
As a result, the cross-build would break as soon as GCC47 was used to
build its own libraries.

A stage-specific prefix was added to the internal specs directory
definition that restored cross-target building capability.

11 years agoixgbe: Do not use mbuf jumbo clusters
François Tigeot [Wed, 3 Oct 2012 10:04:56 +0000 (12:04 +0200)]
ixgbe: Do not use mbuf jumbo clusters

* They caused crashes when using jumbo frames; the root of the issue should
  probably be investigated further but the driver works perfectly with this
  change.

* Single-stream TCP performance has been measured up to 9.89 Gb/s with
  mtu=16114

11 years agoMakefile.inc1: Unbreak buildworld
John Marino [Wed, 3 Oct 2012 00:42:34 +0000 (02:42 +0200)]
Makefile.inc1: Unbreak buildworld

There was a bootstrap problem with gcc47.
For systems without gcc47 (which is almost all of them), the buildworld
failed on the first gcc47 libraries which require gcc47 to build.  The
gnu/lib/gcc47/csu target was duplicated and the makefile was attempting
to build it before gcc47 was installed.

11 years agokernel: Fix a few more mbuf MB_* vs. kmalloc M_* flag misuses.
Nuno Antunes [Tue, 2 Oct 2012 06:39:26 +0000 (07:39 +0100)]
kernel: Fix a few more mbuf MB_* vs. kmalloc M_* flag misuses.

11 years agolibstdc++47: fix wrong vec.o inclusion
John Marino [Tue, 2 Oct 2012 20:07:43 +0000 (22:07 +0200)]
libstdc++47: fix wrong vec.o inclusion

The vec.cc file never got compiled for libstdc++.  The gcc/vec.c object
file was getting included into the library instead.  This change
effectively renames vec.cc to avoid name clashes.

This also allows gcc47 to completely build world.

11 years agomtree: Use spaces for indentation.
Sascha Wildner [Tue, 2 Oct 2012 11:43:30 +0000 (13:43 +0200)]
mtree: Use spaces for indentation.

11 years agoixgbe: Use MB_DONTWAIT with mbuf operations
François Tigeot [Tue, 2 Oct 2012 05:59:33 +0000 (07:59 +0200)]
ixgbe: Use MB_DONTWAIT with mbuf operations

* M_NOWAIT is only valid with kmalloc(9)

11 years agobsd.sys.mk: Remove -Werror flag from gcc47 builds
John Marino [Mon, 1 Oct 2012 17:39:37 +0000 (19:39 +0200)]
bsd.sys.mk: Remove -Werror flag from gcc47 builds

While most of the breakage caused by new GCC47 warnings have been fixed,
swildner would prefer to complete the task and review the previously
and hastily submitted warning fixes at his leisure.

To accommodate this, the -Werror flag is removed when gcc47 is used to
build so the new warnings will pass by harmlessly.  swildner will
restore the -Werror flag when his task is complete.

11 years agogcc47 warnings: A few more fixes
John Marino [Mon, 1 Oct 2012 17:32:45 +0000 (19:32 +0200)]
gcc47 warnings: A few more fixes

usr.bin/make pass -fno-address, NO_WERROR=true
usr.bin/monitor modified source file
usr.bin/netstat modified source file (2)
usr.bin/sdpquery WARNS=2, pass -fno-unused-but-set-variable

Make has several evaluations that gcc47 believes will always
(without exception) evaluate to true or false.  Likely gcc47 is not
detecting some cases correctly, so -Wno-address was passed to it.
However, -Werror overrides it, so NO_WERROR had to be set on this
Makefile.

The remaining GCC warnings will be left for swildner to handle.
The -Werror flag will be suppress for GCC47 until further notice.

11 years agolibstdc++47: Fix c++config.h race
John Marino [Mon, 1 Oct 2012 12:52:03 +0000 (14:52 +0200)]
libstdc++47: Fix c++config.h race

With high job numbers, sometimes c++config.h would get included before
it finished getting generated.  Solve this race by using "depend all"
which should ensure c++config.h gets generated before anything else
in libstdc++ starts to build.

11 years agoSwitch on gcc47 and switch off gcc41
John Marino [Sat, 29 Sep 2012 20:47:42 +0000 (22:47 +0200)]
Switch on gcc47 and switch off gcc41

Replace GCC 4.1 with GCC 4.7.  The primary compiler remains GCC 4.4
and the source and makefiles for GCC 4.1 remain intact so it can be
brought back if necessary.  All references to GCC 4.1 in documentation
where updated to reflect version 4.7.

A full world build is probably required after this point.

11 years agogcc47: Add DragonFly READMEs and world makefiles
John Marino [Sat, 29 Sep 2012 20:14:07 +0000 (22:14 +0200)]
gcc47: Add DragonFly READMEs and world makefiles

11 years agoGCC47: Add local modifications
John Marino [Sat, 29 Sep 2012 19:58:02 +0000 (21:58 +0200)]
GCC47: Add local modifications

The majority of these changes are new files required to build GCC on
DragonFly.  They are identical to the lang/gcc-aux modifications.  Of
interest:

1) The modification to c-format.c is a carry-over from GCC44. It
   maintains support for the DragonFly-specific %b and %D conversions.
2) The modification to tree-inline.c is a carry-over from GCC44. It
   maintains the suppression of "unlikely call" inline warnings.
3) The gcc driver was modified to strip out all the bad paths in its
   search path.  gcc -print-search-dirs is now short and accurate.

11 years agoMerge branch 'vendor/GCC47'
John Marino [Mon, 1 Oct 2012 10:43:18 +0000 (12:43 +0200)]
Merge branch 'vendor/GCC47'

11 years agoImport gcc-4.7.2 to new vendor branch
John Marino [Mon, 1 Oct 2012 10:42:17 +0000 (12:42 +0200)]
Import gcc-4.7.2 to new vendor branch

11 years agogcc47 build fixes: Unused-but-set-variable + more warnings
John Marino [Mon, 1 Oct 2012 01:09:06 +0000 (03:09 +0200)]
gcc47 build fixes: Unused-but-set-variable + more warnings

The following programs fail to build with gcc47 due to the new
unused-but-set-variable warning.  They've been fixed in various ways.
The ones set with WARNS=3 suppress cast-qual warning
There is a single enum-compare error too.

This effort is not complete.

bin/csh pass -Wno-unused-but-set-variable
bin/mined source file modified
bin/sh set WARNS=3
crypto/openssh source file modified (2)
gnu/lib/libdialog source file modified
gnu/usr.bin/gdb/kgdb source file modified
gnu/usr.bin/rcs  source file modified
lib/libalias source file modified
lib/libdevstat source file modified
lib/libdm set WARNS=3
lib/libevtr source file modified
lib/libldns pass -Wno-unused-but-set-variable
lib/libncp source file modified
lib/libpam set WARNS=3
lib/libsmdb pass -Wno-unused-but-set-variable
lib/libstand source file modified (4)
lib/libtcplay source file modified
lib/libthread_xu source file modified (2)
libexec/rshd source file modified
libexec/telnetd source file modified
libexec/ypxfr pass -Wno-enum-compare
sbin/atm/fore_dnld source file modified
sbin/atm/ilmid source file modified
sbin/atm/camcontrol source file modifief (2)
sbin/ccdconfig source file modified
sbin/cryptdisks source file modified
sbin/ffsinfo source file modified
sbin/fsirand source file modified
sbin/growfs source file modified
sbin/hammer source file modified
sbin/ldconfig source file modified (real bug here?)
sbin/mount source file modified
sbin/mount_ufs source file modified
sbin/mount_extfs source file modified
sbin/mountd source file modified
sbin/natd source file modified
sbin/newfs source file modified
sbin/ping6 set WARNS=3, source modified
sbin/rcorder source file modified
sbin/reboot source file modified (real bug here?)
sbin/udevd source file modified
sbin/usched source file modified
sbin/vinum source file modified
sys/boot/common  source file modified
sys/boot/pc32/loader source file modified
usr.bin/brandelf source file modified
usr.bin/bzip2 pass -Wno-unused-but-set-variable
usr.bin/dfregress source file modified
usr.bin/ee source file modified
usr.bin/less pass -Wno-unused-but-set-variable

11 years agojme: Factor out jme_rx_restart
Sepherosa Ziehau [Sun, 30 Sep 2012 13:45:52 +0000 (21:45 +0800)]
jme: Factor out jme_rx_restart

11 years agojme: Rework MSI-X mapping, so RX MSI-X need not read register
Sepherosa Ziehau [Sun, 30 Sep 2012 13:25:25 +0000 (21:25 +0800)]
jme: Rework MSI-X mapping, so RX MSI-X need not read register

RX empty event rarely happens (I didn't see it even if the card is
sinking full speed tiny packets on one RX ring).  Put the RX empty
events into independent MSI-X, so the hot path RX MSI-X need not
read register at all.

11 years agojme: Remove unused macros
Sepherosa Ziehau [Sun, 30 Sep 2012 12:14:05 +0000 (20:14 +0800)]
jme: Remove unused macros

11 years agojme: Make sure only rx desc empty is cleared in status register
Sepherosa Ziehau [Sun, 30 Sep 2012 12:11:53 +0000 (20:11 +0800)]
jme: Make sure only rx desc empty is cleared in status register

11 years agojme: Move colesce parameters setup out of sysctl tree creation
Sepherosa Ziehau [Tue, 25 Sep 2012 00:01:17 +0000 (08:01 +0800)]
jme: Move colesce parameters setup out of sysctl tree creation

11 years agojme: Change polling(4) support to ifpoll support
Sepherosa Ziehau [Mon, 24 Sep 2012 12:01:17 +0000 (20:01 +0800)]
jme: Change polling(4) support to ifpoll support

While I'm here, fix the disable/enable intr handing.

11 years agoFix buildworld with NO_GCC41.
Sascha Wildner [Sun, 30 Sep 2012 14:35:39 +0000 (16:35 +0200)]
Fix buildworld with NO_GCC41.

The Makefile logic was kinda broken and gmp/mpfr were built only when
gcc41 was being built (i.e., when NO_GCC41 was not specified).

Instead, just build them in any case.

11 years agoixgbe: Purge queue on inactive interfaces
François Tigeot [Sun, 30 Sep 2012 11:27:15 +0000 (13:27 +0200)]
ixgbe: Purge queue on inactive interfaces

* The transmission code needs to process all queued packets in one way or
  another; if this is not done, the kernel will busy loop

* Fix a kernel freeze issue when bringing up network interfaces not having
  an active link (cable not plugged...)

11 years agoRevert "Makefile.usr - Switch to pkgsrc-2012Q2."
Justin C. Sherrill [Sun, 30 Sep 2012 02:23:13 +0000 (22:23 -0400)]
Revert "Makefile.usr - Switch to pkgsrc-2012Q2."

This reverts commit f22a9489615d510c36982f39cd47f93d42a1c0aa.

This does not match the current batch of pkgsrc binaries.
Also, pkgsrc-2012Q3 is due out in the next 24 hours.

11 years agoMakefile.usr - Switch to pkgsrc-2012Q2.
Antonio Huete Jimenez [Sat, 29 Sep 2012 23:40:23 +0000 (01:40 +0200)]
Makefile.usr - Switch to pkgsrc-2012Q2.

11 years agoixgbe: Remove useless locking directives
François Tigeot [Sat, 29 Sep 2012 17:41:04 +0000 (19:41 +0200)]
ixgbe: Remove useless locking directives

11 years agoixgbe: Remove link handler tasklet remnants
François Tigeot [Sat, 29 Sep 2012 12:12:23 +0000 (14:12 +0200)]
ixgbe: Remove link handler tasklet remnants

11 years agogmp/mpfr relocation: Forgot to commit one file
John Marino [Sat, 29 Sep 2012 19:15:06 +0000 (21:15 +0200)]
gmp/mpfr relocation: Forgot to commit one file

11 years agoRelocate libgmp and libmpfr world makefiles
John Marino [Sat, 29 Sep 2012 17:57:07 +0000 (19:57 +0200)]
Relocate libgmp and libmpfr world makefiles

This action prepares for the import of GCC 4.7 into base.
GCC 4.4, unlike GCC 4.1, requires gmp and mpfr, and these libraries
were part of the GCC 4.4 world makefile set.  GCC 4.7 also needs
these libraries, so rather than build them twice, they are moved out
to a common area where both compilers can use them.

11 years agompc: Add DragonFly READMEs and world makefiles
John Marino [Sat, 29 Sep 2012 17:39:13 +0000 (19:39 +0200)]
mpc: Add DragonFly READMEs and world makefiles

11 years agoMerge branch 'vendor/MPC'
John Marino [Sat, 29 Sep 2012 19:04:33 +0000 (21:04 +0200)]
Merge branch 'vendor/MPC'

11 years agoImport mpc-1.0.1 to new vendor branch
John Marino [Sat, 29 Sep 2012 19:03:54 +0000 (21:03 +0200)]
Import mpc-1.0.1 to new vendor branch

This multiprecision library is required for gcc 4.6 and later.

11 years agobsd.lib.mk: Prevent "profiling impossible" warning
John Marino [Sat, 29 Sep 2012 16:25:58 +0000 (18:25 +0200)]
bsd.lib.mk: Prevent "profiling impossible" warning

The flag combination of "-pg" and "-ffunction-sections" do not mix.
GCC will emit the warning: "-ffunction-sections disabled; it makes
profiling impossible"

This simple modification to bsd.lib.mk will filter out
-ffunction-sections flag whenever it tries to build profile
objects.  The seemingly hundreds of warning in the world build
log are now gone.

11 years agokernel: Make KTR_USCHED_DFLY a kernel option.
Sascha Wildner [Fri, 28 Sep 2012 15:48:02 +0000 (17:48 +0200)]
kernel: Make KTR_USCHED_DFLY a kernel option.

11 years agoAdd NO_LWKT_SPLIT_USERPRI to the LINTs.
Sascha Wildner [Fri, 28 Sep 2012 15:47:13 +0000 (17:47 +0200)]
Add NO_LWKT_SPLIT_USERPRI to the LINTs.

11 years agotcp: Reduce RTO minimal value from 1 second to 500ms
Sepherosa Ziehau [Thu, 27 Sep 2012 06:43:32 +0000 (14:43 +0800)]
tcp: Reduce RTO minimal value from 1 second to 500ms

The RTO slop is reduced from 200ms to 100ms.  The effect RTO minimal
value is 600ms, which should be suitable even for satellite links.

11 years agokernel - Fix i386 wire_count panics (2)
Matthew Dillon [Wed, 26 Sep 2012 18:03:32 +0000 (11:03 -0700)]
kernel - Fix i386 wire_count panics (2)

* Optimize wakeup case.

11 years agokernel - Fix i386 wire_count panics
Matthew Dillon [Wed, 26 Sep 2012 17:36:13 +0000 (10:36 -0700)]
kernel - Fix i386 wire_count panics

* Tracked down to a situation where a pmap structure is being dtor'd by
  the objcache simultaniously with a vm_page_protect() operation on
  a page table page's vm_page_t.

  (1) vm_page_protect() begins running, finds page table page to remove,
      removes the related pv_entry, but then gets stuck waiting for the
      pmap->pm_pteobj (vm_object token).

  (2) Exit on another thread simultaniously removes all remaining VM
      pages from the pmap.  However, due to #(1), there is still an
      active page table page in pmap->pm_pteobj that the exit code has
      no visibility to.

  (3) The related pmap is then dtor'd due to heavy fork/exec/exit load
      on the system.  The VM page is still present, vm_page_protect()
      is still stuck on the token (or hasn't gotten cpu back).

  (4) Nominal vm_object_terminate() destroys the page table page.

  (5) vm_page_protect() unblocks and tries to destroy the page.

  (6) BOOM.

* This fix places a barrier between the normal process exit code and the
  dtor which will block while a vm_page_protect() is active on the pmap.

* This time for sure, but if not we still know that the problem is related
  to this exit race.

11 years agoMerge branch 'master' of ssh://crater.dragonflybsd.org/repository/git/dragonfly
Samuel J. Greear [Wed, 26 Sep 2012 04:51:10 +0000 (22:51 -0600)]
Merge branch 'master' of ssh://crater.dragonflybsd.org/repository/git/dragonfly

11 years agodloader - Add user_scheduler kenv tuneable sample
Samuel J. Greear [Wed, 26 Sep 2012 04:50:33 +0000 (22:50 -0600)]
dloader - Add user_scheduler kenv tuneable sample

11 years agokernel - usched_dfly revamp (8), add reschedule hints
Matthew Dillon [Wed, 26 Sep 2012 02:13:39 +0000 (19:13 -0700)]
kernel - usched_dfly revamp (8), add reschedule hints

* Add reschedule hints when issuing a read() on a pipe or socket, or
  issuing a blocking kevent() call.

* usched_dfly will force a reschedule after the round-robin count has
  passed the half-way point if it detects a scheduling hint.  This is
  an attempt to avoid rescheduling in the middle of some critical user
  operation (e.g. postgres server holding internal locks).

* Add kern.usched_dfly.fast_resched which allows the scheduler to avoid
  interrupting a less desireable process with a more desireable process
  as long as the priority difference is not too great.

  However, default the value to 0, because setting the value has
  consequences for interactive responsiveness.

* When running pgbench we recommend leaving fast_resched disabled and
  instead running the pgbench at idprio 15 to work around issues where
  the postgres server process(es) get interrupted by the pgbench processes
  which causes the postgres server process(es) to hit internal lock conflicts
  more quickly and enter a semaphore wait more often (when both pgbench and
  the postgres servers are running on the same machine).

  This is really an issue with postgres server scaling.  Because the pgbench's
  use so much less cpu than the postgres server processes they are given a
  more desireable priority and thus can interrupt the postgres server
  processes.  We can't really 'fix' this in the scheduler without really
  messing up normal interactive responsiveness for the system.

  Example:

  idprio pgbench -j 80 -c 80 -T 60 -S bench

11 years agokernel - usched_dfly revamp (7), bring back td_release, sysv_sem, weights
Matthew Dillon [Tue, 25 Sep 2012 18:53:58 +0000 (11:53 -0700)]
kernel - usched_dfly revamp (7), bring back td_release, sysv_sem, weights

* Bring back the td_release kernel priority adjustment.

* sysv_sem now attempts to delay wakeups until after releasing its token.

* Tune default weights.

* Do not depress priority until we've become the uschedcp.

* Fix priority sort for LWKT and usched_dfly to avoid context-switching
  across all runable threads twice.

11 years agomake.conf.5: Add some words about WANT_NETGRAPH7.
Sascha Wildner [Tue, 25 Sep 2012 15:21:52 +0000 (17:21 +0200)]
make.conf.5: Add some words about WANT_NETGRAPH7.

11 years agoarcmsr(4): Sync with FreeBSD (Areca's driver version 1.20.00.25).
Sascha Wildner [Tue, 25 Sep 2012 05:37:07 +0000 (07:37 +0200)]
arcmsr(4): Sync with FreeBSD (Areca's driver version 1.20.00.25).

Some bug fixes and added support for ARC-1213, ARC-1223 and ARC-1882.

Thanks to ftigeot for giving it some testing.

11 years agokernel - usched_dfly revamp (6), reimplement shared spinlocks & misc others
Matthew Dillon [Tue, 25 Sep 2012 01:24:22 +0000 (18:24 -0700)]
kernel - usched_dfly revamp (6), reimplement shared spinlocks & misc others

* Rename gd_spinlocks_wr to just gd_spinlocks.

* Reimplement shared spinlocks and optimize the shared spinlock path.
  Contended exclusive spinlocks are less optimal with this change.

* Use shared spinlocks for all file descriptor accesses.  This includes
  not only most IO calls like read() and write(), but also callbacks
  from kqueue to double-check the validity of a file descriptor.

* Use getnanouptime() instead of nanouptime() in kqueue_sleep() and
  kern_kevent(), removing a hardware I/O serialization (to read the HPET)
  from the critical path.

* These changes significantly reduce kernel spinlock contention when running
  postgres/pgbench benchmarks.

11 years agokernel - Add PC sampling for x86-64
Matthew Dillon [Mon, 24 Sep 2012 21:34:41 +0000 (14:34 -0700)]
kernel - Add PC sampling for x86-64

* Xtimer interrupt (lapic timer) now samples the %rip value and stores
  it in the globaldata structure.  Sampling occurs whether the machine is
  in a critical section or not.

* Used for debugging.

11 years agokernel - usched_dfly revamp (5), correct default in last commit
Matthew Dillon [Mon, 24 Sep 2012 20:43:50 +0000 (13:43 -0700)]
kernel - usched_dfly revamp (5), correct default in last commit

* Doh. weight2 should be 120, not 1200.

11 years agokernel - usched_dfly revamp (4), improve tail
Matthew Dillon [Mon, 24 Sep 2012 20:32:11 +0000 (13:32 -0700)]
kernel - usched_dfly revamp (4), improve tail

* Improve tail performance (many more cpu-bound processes than available
  cpus).

* Experiment with removing the LWKT priority adjustments for kernel vs user.
  Instead give LWKT a hint about the user scheduler when scheduling a thread.
  LWKT's round-robin is left unhinted to hopefully round-robin starved LWKTs
  running in kernel mode.

* Implement a better calculation for the per-thread uload than the priority.
  Instead, use estcpu.

* Adjust default weigntings for new uload calculation scale.

11 years agosystat - Ensure vmmeter output separates fields by at least one space.
Matthew Dillon [Mon, 24 Sep 2012 17:31:47 +0000 (10:31 -0700)]
systat - Ensure vmmeter output separates fields by at least one space.

* Ensure vmmeter output separates fields by at least one space.

* Fix minor formatting issue with token names.

11 years agosystat - Display colliding token
Matthew Dillon [Mon, 24 Sep 2012 17:27:32 +0000 (10:27 -0700)]
systat - Display colliding token

* Display the colliding token when a non-zero token collision count is
  reported.  This is somewhat statistical but should still provide good
  information on MP bottlenecks.

11 years agokernel - Add v_token_name to gd_cnt
Matthew Dillon [Mon, 24 Sep 2012 17:26:28 +0000 (10:26 -0700)]
kernel - Add v_token_name to gd_cnt

* Copy the tok->t_desc field into the gd_cnt.v_token_name buffer
  when a token collides so systat -pv 1 can pick it up.