]> CyberLeo.Net >> Repos - FreeBSD/FreeBSD.git/log
FreeBSD/FreeBSD.git
10 years agoRework NFS Duplicate Request Cache cleanup logic.
mav [Fri, 3 Jan 2014 15:09:59 +0000 (15:09 +0000)]
Rework NFS Duplicate Request Cache cleanup logic.

 - Introduce additional hash to group requests by hash of sockref.  This
allows to process TCP acknowledgements without looping though all the cache,
and as result allows to do it every time.
 - Indroduce additional callbacks to notify application layer about sockets
disconnection.  Without this last few requests processed just before socket
disconnection never processed their ACKs and stuck in cache for many hours.
 - Implement transport-specific method for tracking reply acknowledgements.
New implementation does not cross multiple stack layers to get the data and
does not have race conditions that previously made some requests stuck
in cache.  This could be done more efficiently at sockbuf layer, but that
would broke some KBIs, while I don't know other consumers for it aside NFS.
 - Instead of traversing all DRC twice per request, run cleaning only once
per request, and except in some conditions traverse only single hash slot
at a time.

Together this limits NFS DRC growth only to situations of real connectivity
problems.  If network is working well, and so all replies are acknowledged,
cache remains almost empty even after hours of heavy load.  Without this
change on the same test cache was growing to many thousand requests even
with perfectly working local network.

As another result this reduces CPU time spent on the DRC handling during
SPEC NFS benchmark from about 10% to 0.5%.

Sponsored by: iXsystems, Inc.

10 years agoRemove useless register variable modifiers.
melifaro [Fri, 3 Jan 2014 14:33:25 +0000 (14:33 +0000)]
Remove useless register variable modifiers.
Do some more style(9).

MFC after: 2 weeks

10 years agoFix circular math macro.
glebius [Fri, 3 Jan 2014 12:06:54 +0000 (12:06 +0000)]
Fix circular math macro.

Submitted by: Lutz Donnerhacke via Dmitry Luhtionov
German lesson at: http://lutz.donnerhacke.de/Blog/Der-Fluch-der-Stabilitaet
PR: 146082

10 years agoMake failure of ifpromisc() a non-fatal error. This makes it possible to
glebius [Fri, 3 Jan 2014 11:03:12 +0000 (11:03 +0000)]
Make failure of ifpromisc() a non-fatal error. This makes it possible to
run carp(4) on vtnet(4).

Sponsored by: Nginx, Inc.

10 years agoMFp4 @1189741:
pjd [Fri, 3 Jan 2014 09:10:04 +0000 (09:10 +0000)]
MFp4 @1189741:

- Add missing nvlist_destroy().
- Don't override nvlout.

Submitted by: Mariusz Zaborski <oshogbo@FreeBSD.org>
MFC after: 3 days

10 years agoMFp4 @1189711:
pjd [Fri, 3 Jan 2014 09:07:03 +0000 (09:07 +0000)]
MFp4 @1189711:

Fix resource leaks on nvlist_destroy().

Reported by: Mariusz Zaborski <oshogbo@FreeBSD.org>
MFC after: 3 days

10 years agoRegen.
kevlo [Fri, 3 Jan 2014 06:02:08 +0000 (06:02 +0000)]
Regen.

10 years agoAdd support for the MediaTek/Ralink RT3593 chipset.
kevlo [Fri, 3 Jan 2014 06:01:05 +0000 (06:01 +0000)]
Add support for the MediaTek/Ralink RT3593 chipset.
Committed over the ZyXEL NWD2705 on amd64 with WPA.

10 years agoUse pointer to struct sockaddr_in6 in lla_lookup() call.
ae [Fri, 3 Jan 2014 02:40:56 +0000 (02:40 +0000)]
Use pointer to struct sockaddr_in6 in lla_lookup() call.
This prevents from triggering KASSERT in in6_lltable_lookup.

10 years agoAdd IF_AFDATA_WLOCK_ASSERT() in case lla_lookup() is called with
ae [Fri, 3 Jan 2014 02:32:05 +0000 (02:32 +0000)]
Add IF_AFDATA_WLOCK_ASSERT() in case lla_lookup() is called with
LLE_CREATE flag.

MFC after: 1 week

10 years agoFill in some more info about the (somewhat old) Samsung parts I have
imp [Fri, 3 Jan 2014 00:26:56 +0000 (00:26 +0000)]
Fill in some more info about the (somewhat old) Samsung parts I have
here...

10 years agoThe HOT-E HL201 has 128MB Samsung SLC NAND, ID it properly.
imp [Fri, 3 Jan 2014 00:17:52 +0000 (00:17 +0000)]
The HOT-E HL201 has 128MB Samsung SLC NAND, ID it properly.

10 years agoAdd an option to enable or disable the small RX packet copying that
adrian [Thu, 2 Jan 2014 23:23:33 +0000 (23:23 +0000)]
Add an option to enable or disable the small RX packet copying that
is done to improve performance of small frames.

When doing RX packing, the RX copying isn't necessarily required.

Reviewed by: np

10 years agoConvert #defines to enums so that the values are visible in the debugger.
gnn [Thu, 2 Jan 2014 21:30:59 +0000 (21:30 +0000)]
Convert #defines to enums so that the values are visible in the debugger.

Requested by: gibbs
MFC after: 2 weeks

10 years agoRework the DSDT generation code a bit to generate more accurate info about
jhb [Thu, 2 Jan 2014 21:26:59 +0000 (21:26 +0000)]
Rework the DSDT generation code a bit to generate more accurate info about
LPC devices.  Among other things, the LPC serial ports now appear as
ACPI devices.
- Move the info for the top-level PCI bus into the PCI emulation code and
  add ResourceProducer entries for the memory ranges decoded by the bus
  for memory BARs.
- Add a framework to allow each PCI emulation driver to optionally write
  an entry into the DSDT under the \_SB_.PCI0 namespace.  The LPC driver
  uses this to write a node for the LPC bus (\_SB_.PCI0.ISA).
- Add a linker set to allow any LPC devices to write entries into the
  DSDT below the LPC node.
- Move the existing DSDT block for the RTC to the RTC driver.
- Add DSDT nodes for the AT PIC, the 8254 ISA timer, and the LPC UART
  devices.
- Add a "SuperIO" device under the LPC node to claim "system resources"
  aling with a linker set to allow various drivers to add IO or memory
  ranges that should be claimed as a system resource.
- Add system resource entries for the extended RTC IO range, the registers
  used for ACPI power management, the ELCR, PCI interrupt routing register,
  and post data register.
- Add various helper routines for generating DSDT entries.

Reviewed by: neel (earlier version)

10 years agoUpdate the description for pmap_remove_pages() to match the modern
kib [Thu, 2 Jan 2014 18:50:52 +0000 (18:50 +0000)]
Update the description for pmap_remove_pages() to match the modern
times [1].  Assert that the pmap passed to pmap_remove_pages() is only
active on current CPU.

Submitted by: alc [1]
Reviewed by: alc
Sponsored by: The FreeBSD Foundation
MFC after: 1 week

10 years agoAssert that accounting for the pmap resident pages does not underflow.
kib [Thu, 2 Jan 2014 18:49:05 +0000 (18:49 +0000)]
Assert that accounting for the pmap resident pages does not underflow.

Reviewed by: alc
Sponsored by: The FreeBSD Foundation
MFC after: 1 week

10 years agoRevert r260073; small diff reduction wrt gcc43 and Apple GCC.
pfg [Thu, 2 Jan 2014 13:53:53 +0000 (13:53 +0000)]
Revert r260073; small diff reduction wrt gcc43 and Apple GCC.

Unfortunately this causes ICE on powerpc and sparc64.

Reducing these differences against upstream is not important
anymore so hopefully I have finished breaking the compiler
occasionally.

10 years agoRevert r260165: Proper configuration of unmapped_buf_allowed should be used
zbb [Thu, 2 Jan 2014 11:24:04 +0000 (11:24 +0000)]
Revert r260165: Proper configuration of unmapped_buf_allowed should be used

To avoid failures in bus_dmamap_sync() on ARM unmapped_buf_allowed should
be set to 0. Hence, ARM-specific changes in AHCI should not be applied.

10 years agoFix regression from r249894. Now we pass "gw" as argument to if_output
glebius [Thu, 2 Jan 2014 10:18:39 +0000 (10:18 +0000)]
Fix regression from r249894. Now we pass "gw" as argument to if_output
method, thus for multicast case we need it to point at "dst".

PR: 185395
Submitted by: ae

10 years agolla_lookup() does modification only when LLE_CREATE is specified.
ae [Thu, 2 Jan 2014 08:40:37 +0000 (08:40 +0000)]
lla_lookup() does modification only when LLE_CREATE is specified.
Thus we can use IF_AFDATA_RLOCK() instead of IF_AFDATA_LOCK() when doing
lla_lookup() without LLE_CREATE flag.

Reviewed by: glebius, adrian
MFC after: 1 week
Sponsored by: Yandex LLC

10 years agoFix !INET6 build for various platforms.
delphij [Thu, 2 Jan 2014 08:39:47 +0000 (08:39 +0000)]
Fix !INET6 build for various platforms.

10 years agoMFV r260155:
delphij [Thu, 2 Jan 2014 08:10:35 +0000 (08:10 +0000)]
MFV r260155:

When we encounter an I/O error on a piece of metadata while deleting
a file system or zvol, we don't update the bptree_entry_phys_t's
bookmark.  This would lead to double free of bp's which will lead to
space map corruption.

Instead of tolerating and allowing the corruption, panic immediately.

See Illumos #4390 for more details.

4391 panic system rather than corrupting pool if we hit bug 4390

Illumos/illumos-gate@8b36997aa24d9817807faa4efa301ac9c07a2b78

MFC after: 2 weeks

10 years agoMinor correction for the XHCI reset logic.
hselasky [Thu, 2 Jan 2014 08:02:57 +0000 (08:02 +0000)]
Minor correction for the XHCI reset logic.

MFC after: 1 week
Found by: Horse Ma <HMa@wyse.com>

10 years agoMFV r260154 + 260182:
delphij [Thu, 2 Jan 2014 07:34:36 +0000 (07:34 +0000)]
MFV r260154 + 260182:

4369 implement zfs bookmarks
4368 zfs send filesystems from readonly pools

Illumos/illumos-gate@78f171005391b928aaf1642b3206c534ed644332

MFC after: 2 weeks

10 years agoFix build on platforms where atomic_swap_64 is not available.
delphij [Thu, 2 Jan 2014 03:24:44 +0000 (03:24 +0000)]
Fix build on platforms where atomic_swap_64 is not available.

10 years agoMake the comment match the code. Not sure why we calculate it this
imp [Thu, 2 Jan 2014 02:20:10 +0000 (02:20 +0000)]
Make the comment match the code. Not sure why we calculate it this
weird way, but didn't change that...

10 years agoImplement atomic_swap_<type>.
marcel [Wed, 1 Jan 2014 22:51:19 +0000 (22:51 +0000)]
Implement atomic_swap_<type>.
The operation was documented and implemented partially (both from a
type and architecture perspective) on 2013-08-21 and got used in
ZFS with revision 260150 (zfeature.c) and since ZFS is supported on
ia64, the lack of having atomic_swap became problem.

10 years ago- Use counter(9) for node stats updated at a high rate.
glebius [Wed, 1 Jan 2014 21:48:04 +0000 (21:48 +0000)]
- Use counter(9) for node stats updated at a high rate.
- Use simple ++ for rare events.
- Use uma_zone_get_cur() to get knowledge about space left in cache.
- Convert many fields of struct ng_netflow_info to 64 bit.

Tested by: Viktor Velichkin <avisom yandex.ru>
Sponsored by: Nginx, Inc.

10 years agoRestructure the VMX code to enter and exit the guest. In large part this change
neel [Wed, 1 Jan 2014 21:17:08 +0000 (21:17 +0000)]
Restructure the VMX code to enter and exit the guest. In large part this change
hides the setjmp/longjmp semantics of VM enter/exit. vmx_enter_guest() is used
to enter guest context and vmx_exit_guest() is used to transition back into
host context.

Fix a longstanding race where a vcpu interrupt notification might be ignored
if it happens after vmx_inject_interrupts() but before host interrupts are
disabled in vmx_resume/vmx_launch. We now called vmx_inject_interrupts() with
host interrupts disabled to prevent this.

Suggested by: grehan@

10 years agoFix race condition in DELAY for SP804 timer.
zbb [Wed, 1 Jan 2014 20:35:38 +0000 (20:35 +0000)]
Fix race condition in DELAY for SP804 timer.

Fix race condition in DELAY function: sc->tc was not initialized yet when
time_counter pointer was set, what resulted in NULL pointer dereference.

Export sysfreq to dts.

Submitted by: Wojciech Macek <wma@semihalf.com>
Obtained from: Semihalf

10 years agoUse only mapped BIOs on ARM
zbb [Wed, 1 Jan 2014 20:26:08 +0000 (20:26 +0000)]
Use only mapped BIOs on ARM

Using unmapped BIOs causes failure inside bus_dmamap_sync, since
this function requires valid MVA address, which is not present
if mapping is not set up.

Submitted by: Wojciech Macek <wma@semihalf.com>
Obtained from: Semihalf

10 years agoDo not attach to PCI bridges in AHCI driver
zbb [Wed, 1 Jan 2014 20:18:03 +0000 (20:18 +0000)]
Do not attach to PCI bridges in AHCI driver

Some vendors use the same VID:PID combination in AHCI and PCI bridge cards

Submitted by: Wojciech Macek <wma@semihalf.com>
Obtained from: Semihalf

10 years agoRemove TNF license clauses 3 and 4, matching upstream
emaste [Wed, 1 Jan 2014 20:04:43 +0000 (20:04 +0000)]
Remove TNF license clauses 3 and 4, matching upstream

Approved by raj@ (Semihalf has a copyright statement in the license block
as well).

10 years agoAdd polarity and level support to ARM GIC
zbb [Wed, 1 Jan 2014 20:03:48 +0000 (20:03 +0000)]
Add polarity and level support to ARM GIC

Add suport for setting triggering level and polarity in GIC.
New function pointer was added to nexus which corresponds
to the function which sets level/sense in the hardware (GIC).

Submitted by: Wojciech Macek <wma@semihalf.com>
Obtained from: Semihalf

10 years agoIncrease vt(9) max glyph data to 1MB for CJK fonts with many glyphs
emaste [Wed, 1 Jan 2014 19:38:15 +0000 (19:38 +0000)]
Increase vt(9) max glyph data to 1MB for CJK fonts with many glyphs

Sponsored by: The FreeBSD Foundation

10 years agoMFV r260153:
delphij [Wed, 1 Jan 2014 01:26:39 +0000 (01:26 +0000)]
MFV r260153:

4121 vdev_label_init should treat request as succeeded when pool
     is read only

Illumos/illumos-gate@973c78e94bf9634782164382c9e291bf81161fa5

MFC after: 2 weeks

10 years agoMFV r260152:
delphij [Wed, 1 Jan 2014 01:23:40 +0000 (01:23 +0000)]
MFV r260152:

4208 Typo in zfs_main.c: "posxiuser"

illumos/illumos-gate@f38cb554a534c6df738be3f4d23327e69888e634

Note: this is a stripped down version of Illumos change.

MFC after: 2 weeks

10 years ago4369 implement zfs bookmarks
delphij [Wed, 1 Jan 2014 01:15:53 +0000 (01:15 +0000)]
4369 implement zfs bookmarks
4368 zfs send filesystems from readonly pools

llumos/illumos-gate@78f171005391b928aaf1642b3206c534ed644332

10 years ago4121 vdev_label_init should treat request as succeeded when pool
delphij [Wed, 1 Jan 2014 01:05:38 +0000 (01:05 +0000)]
4121 vdev_label_init should treat request as succeeded when pool
     is read only

llumos/illumos-gate@973c78e94bf9634782164382c9e291bf81161fa5

10 years agoUse an RLOCK here instead of an RWLOCK - matching all the other calls
adrian [Wed, 1 Jan 2014 00:56:26 +0000 (00:56 +0000)]
Use an RLOCK here instead of an RWLOCK - matching all the other calls
to lla_lookup().

This drastically reduces the very high lock contention when doing parallel
TCP throughput tests (> 1024 sockets) with IPv6.

Tested:

* parallel IPv6 TCP bulk data exchange, 8192 sockets

MFC after: 1 week
Sponsored by: Netflix, Inc.

10 years agoMFV r259170:
delphij [Wed, 1 Jan 2014 00:45:28 +0000 (00:45 +0000)]
MFV r259170:

4370 avoid transmitting holes during zfs send

4371 DMU code clean up

illumos/illumos-gate@43466aae47bfcd2ad9bf501faec8e75c08095e4f

NOTE: Make sure the boot code is updated if a zpool upgrade is
done on boot zpool.

MFC after: 2 weeks

10 years ago* msun/man/cosh.3:
kargl [Tue, 31 Dec 2013 23:59:33 +0000 (23:59 +0000)]
* msun/man/cosh.3:
* msun/man/sinh.3:
* msun/man/tanh.3:
  . Fix grammar.

* msun/src/e_coshl.c:
* msun/src/e_sinhl.c:
  . Fix comment.

* msun/src/s_tanhl.c:
  . Remove unused variables.
  . Fix location/indentation of comments.
  . Use comparison involving ints instead of long double.
  . Re-order polynomial evaluation on ld128 for |x| < 0.25.
    For now, retain the older order in an "#if 0 ... #else" block.
  . Use int comparison to short-circuit the |x| < 1.5 condition.

Requested by: bde

10 years agoMFV r258972:
delphij [Tue, 31 Dec 2013 21:37:24 +0000 (21:37 +0000)]
MFV r258972:

4373 add block contents print to zstreamdump

illumos/illumos-gate@994fb6b8a9d07a8021d77d79f46e30637bca3ad3

MFC after: 2 weeks

10 years agoMFV r258385:
delphij [Tue, 31 Dec 2013 21:24:00 +0000 (21:24 +0000)]
MFV r258385:

(Note: this change is not applicable to FreeBSD and the file
is not included in build.  It's integrated for completeness).

4128 disks in zpools never go away when pulled

illumos/illumos-gate@39cddb10a31c1c2e66aed69e6871d09caa4c8147

MFC after: 2 weeks

10 years agoMFV r242733:
delphij [Tue, 31 Dec 2013 19:39:15 +0000 (19:39 +0000)]
MFV r242733:

3306 zdb should be able to issue reads in parallel
3321 'zpool reopen' command should be documented in the man page
and help message

illumos/illumos-gate@31d7e8fa33fae995f558673adb22641b5aa8b6e1

FreeBSD porting notes: the kernel part of this changeset depends
on Solaris buf(9S) interfaces and are not really applicable for
our use.  vdev_disk.c is patched as-is to reduce diverge from
upstream, but vdev_file.c is left intact.

MFC after: 2 weeks

10 years agoSince the introduction of the popmap to reservations in r259999, there is
alc [Tue, 31 Dec 2013 18:25:15 +0000 (18:25 +0000)]
Since the introduction of the popmap to reservations in r259999, there is
no longer any need for the page's PG_CACHED and PG_FREE flags to be set and
cleared while the free page queues lock is held.  Thus, vm_page_alloc(),
vm_page_alloc_contig(), and vm_page_alloc_freelist() can wait until after
the free page queues lock is released to clear the page's flags.  Moreover,
the PG_FREE flag can be retired.  Now that the reservation system no longer
uses it, its only uses are in a few assertions.  Eliminating these
assertions is no real loss.  Other assertions catch the same types of
misbehavior, like doubly freeing a page (see r260032) or dirtying a free
page (free pages are invalid and only valid pages can be dirtied).

Eliminate an unneeded variable from vm_page_alloc_contig().

Sponsored by: EMC / Isilon Storage Division

10 years agoSome DTrace tests (mostly in the pid provider directory) make use of
markj [Tue, 31 Dec 2013 15:45:12 +0000 (15:45 +0000)]
Some DTrace tests (mostly in the pid provider directory) make use of
executable ksh scripts. These are currently not copied into the test
directory the way that compiled executables are, so the tests which make use
of them cannot work. This changes the test Makefile to copy the scripts into
the test directory.

10 years agoAllocate the probe ID unrhdr before the DTrace kld_* event handlers are
markj [Tue, 31 Dec 2013 15:41:16 +0000 (15:41 +0000)]
Allocate the probe ID unrhdr before the DTrace kld_* event handlers are
registered. Otherwise there is a small window during which probe IDs may be
allocated before the unrhdr is allocated.

MFC after: 2 weeks

10 years agoRevert r260091. The vmem calls seem to be slower than the *_unr() calls that
markj [Tue, 31 Dec 2013 15:37:51 +0000 (15:37 +0000)]
Revert r260091. The vmem calls seem to be slower than the *_unr() calls that
they replaced, which is important considering that probe IDs are allocated
during process startup for USDT probes.

10 years agoBump copyright year.
gjb [Tue, 31 Dec 2013 12:18:10 +0000 (12:18 +0000)]
Bump copyright year.

Happy New Year 2014!

Sponsored by: The FreeBSD Foundation

10 years agoExplicitly free rt_tables to please Coverity.
melifaro [Tue, 31 Dec 2013 12:11:48 +0000 (12:11 +0000)]
Explicitly free rt_tables to please Coverity.

Reported by: Coverity
Coverity CID: 1147174
MFC after: 2 weeks

10 years agoAdd support for Samsung K9F2G08U0A (256MiB SLC) NAND found on some old
imp [Tue, 31 Dec 2013 07:36:39 +0000 (07:36 +0000)]
Add support for Samsung K9F2G08U0A (256MiB SLC) NAND found on some old
Atmel boards I have.

# All Samsung, Toshiba and SanDisk parts will need to be in this table
# since they don't conform to the ONFI specification (they are all Toggle
# parts). There's some standards for the additional bytes so there's some hope
# to decode them automatically on a per-vendor basis, but even that has
# problems (and is what motivated the ONFI parameter page).

10 years agoDelete echoed doesn't rub out the previous character, so always
imp [Tue, 31 Dec 2013 04:40:25 +0000 (04:40 +0000)]
Delete echoed doesn't rub out the previous character, so always
use <backspace> <space> <backspace> instead. This fixes hitting
DELETE instead of BACKSPACE at mountroot> prompt.

10 years agoFor TSO, when the first mbuf contains both the packet header and data, the
edavis [Mon, 30 Dec 2013 23:02:26 +0000 (23:02 +0000)]
For TSO, when the first mbuf contains both the packet header and data, the
header is split out into its own BD for processing by the firmware. When
this split occurred the data length in the BD was not being set correctly
resulting in packet corruption.

Approved by: davidcd (mentor)

10 years agoIn sys/dev/sound/pci/maestro.c, #if 0 two unused static functions.
dim [Mon, 30 Dec 2013 22:17:33 +0000 (22:17 +0000)]
In sys/dev/sound/pci/maestro.c, #if 0 two unused static functions.

MFC after: 3 days

10 years agoFor sys/ofed/drivers/infiniband/hw/mlx4/mcg.c, disable warning about
dim [Mon, 30 Dec 2013 22:14:31 +0000 (22:14 +0000)]
For sys/ofed/drivers/infiniband/hw/mlx4/mcg.c, disable warning about
unused variables for now.

MFC after: 3 days

10 years agoEliminate unused drbr_stats_update implementation in oce(4) driver.
delphij [Mon, 30 Dec 2013 21:30:49 +0000 (21:30 +0000)]
Eliminate unused drbr_stats_update implementation in oce(4) driver.

Noticed by: dim
MFC after: 2 weeks

10 years agoThe devd part never got implemented; remove for now, until someone actually
trasz [Mon, 30 Dec 2013 21:06:08 +0000 (21:06 +0000)]
The devd part never got implemented; remove for now, until someone actually
needs this feature and can talk to me about how it should look like.

MFC after: 3 days
Sponsored by: The FreeBSD Foundation

10 years agoFix typo.
trasz [Mon, 30 Dec 2013 21:04:24 +0000 (21:04 +0000)]
Fix typo.

MFC after: 3 days
Sponsored by: The FreeBSD Foundation

10 years agoFor sys/ofed/drivers/infiniband/core/cm.c, disable warning about unused
dim [Mon, 30 Dec 2013 20:58:06 +0000 (20:58 +0000)]
For sys/ofed/drivers/infiniband/core/cm.c, disable warning about unused
functions for now.

MFC after: 3 days

10 years agoIn sys/amd64/amd64/pmap.c, remove static function pmap_is_current(),
dim [Mon, 30 Dec 2013 20:37:47 +0000 (20:37 +0000)]
In sys/amd64/amd64/pmap.c, remove static function pmap_is_current(),
which has been unused since r189415.

Reviewed by: alc
MFC after: 3 days

10 years agoSimilar to r260020, only use -fms-extensions with gcc, for all other
dim [Mon, 30 Dec 2013 20:34:53 +0000 (20:34 +0000)]
Similar to r260020, only use -fms-extensions with gcc, for all other
modules which require this flag to compile.  Use a GCC_MS_EXTENSIONS
variable, defined in kern.pre.mk, which can be used to easily supply the
flag (or not), depending on the compiler type.

MFC after: 3 days

10 years agogcc: Fix issue with "unavailable" attribute.
pfg [Mon, 30 Dec 2013 20:24:05 +0000 (20:24 +0000)]
gcc: Fix issue with "unavailable" attribute.

While here, point where we dropped the support for objc from r260014.

MFC after: 3 weeks

10 years agoMove most of NFS file handle affinity code out of the heavily congested
mav [Mon, 30 Dec 2013 20:23:15 +0000 (20:23 +0000)]
Move most of NFS file handle affinity code out of the heavily congested
global RPC thread pool lock and protect it with own set of locks.

On synthetic benchmarks this improves peak NFS request rate by 40%.

10 years agoFor sys/boot/i386 and sys/boot/pc98, separate flags to be passed
dim [Mon, 30 Dec 2013 19:05:50 +0000 (19:05 +0000)]
For sys/boot/i386 and sys/boot/pc98, separate flags to be passed
directly to the linker (LD_FLAGS) from flags passed indirectly, via the
compiler driver (LDFLAGS).

This is because several Makefiles under sys/boot/i386 and sys/boot/pc98
use ${LD} directly to link, and the normal LDFLAGS value should not be
used in these cases.

MFC after: 3 days

10 years agoSet the SoC name for the atmelbus name.
imp [Mon, 30 Dec 2013 18:10:04 +0000 (18:10 +0000)]
Set the SoC name for the atmelbus name.

10 years agoAllow AT91_MCI_ALLOW_OVERCLOCK to be an option in kernel config files.
imp [Mon, 30 Dec 2013 18:07:50 +0000 (18:07 +0000)]
Allow AT91_MCI_ALLOW_OVERCLOCK to be an option in kernel config files.

10 years agoNow that vmem(9) is available, use vmem arenas to allocate probe and
markj [Mon, 30 Dec 2013 17:37:32 +0000 (17:37 +0000)]
Now that vmem(9) is available, use vmem arenas to allocate probe and
aggregation IDs, as is done in the upstream illumos code. This still
requires some FreeBSD-specific code, as our vmem API is not identical to the
one in illumos.

Submitted by: Mike Ma <mikemandarine@gmail.com>

10 years agoFix a mismerge of my local doc changes to msun/man/sinh.3.
kargl [Mon, 30 Dec 2013 17:11:36 +0000 (17:11 +0000)]
Fix a mismerge of my local doc changes to msun/man/sinh.3.

10 years agoFine tune filesystem block allocations under low free-space
mckusick [Mon, 30 Dec 2013 17:04:24 +0000 (17:04 +0000)]
Fine tune filesystem block allocations under low free-space
conditions (-r254995) based on further operational experience.

Submitted by:  Dmitry Sivachenko
Fix Tested by: Dmitry Sivachenko
MFC after: 2 weeks

10 years agogetopt returns an int, not a char, so use the correct data type for
scottl [Mon, 30 Dec 2013 16:49:31 +0000 (16:49 +0000)]
getopt returns an int, not a char, so use the correct data type for
the return value. Fixes powerpc tinderbox.

MFC after: 2 days

10 years ago- Probe with BUS_PROBE_DEFAULT instead of 0.
marius [Mon, 30 Dec 2013 16:46:50 +0000 (16:46 +0000)]
- Probe with BUS_PROBE_DEFAULT instead of 0.
- Remove clearing PCIM_CMD_INTxDIS; pci(4) will do that as appropriate since
  r189367.

MFC after: 1 week

10 years agoFix extremely slow operation with data digests enabled. This was caused
trasz [Mon, 30 Dec 2013 12:18:06 +0000 (12:18 +0000)]
Fix extremely slow operation with data digests enabled.  This was caused
by receive code waiting for data digest even when the data segment was
empty.  It didn't actually read it, but it waited until those four bytes
become available in the socket buffer, i.e. until any other PDU (such as NOP)
came in.

PR: kern/185240
MFC after: 2 weeks
Sponsored by: The FreeBSD Foundation

10 years agoAdd netpfil to CSCOPEDIRS.
rpaulo [Mon, 30 Dec 2013 08:36:17 +0000 (08:36 +0000)]
Add netpfil to CSCOPEDIRS.

10 years agoProperly handle unsigned comparison.
mckusick [Mon, 30 Dec 2013 06:19:42 +0000 (06:19 +0000)]
Properly handle unsigned comparison.

MFC after: 2 weeks

10 years agoAdd globs.c, missed in r260068,260069
scottl [Mon, 30 Dec 2013 05:02:57 +0000 (05:02 +0000)]
Add globs.c, missed in r260068,260069

Submitted by: peter
Obtained from: Netflix
MFC after: 3 Days

10 years agogcc: small diff reduction wrt gcc43 and Apple GCC.
pfg [Mon, 30 Dec 2013 02:52:43 +0000 (02:52 +0000)]
gcc: small diff reduction wrt gcc43 and Apple GCC.

Obtained from: gcc 4.3 (rev. 121464, 122528, 124106; GPLv2)
MFC after: 3 weeks

10 years agoMulti-queue NIC drivers and multi-port lagg tend to use the same lower
scottl [Mon, 30 Dec 2013 01:32:17 +0000 (01:32 +0000)]
Multi-queue NIC drivers and multi-port lagg tend to use the same lower
bits of the flowid as each other, resulting in a poor distribution of
packets among queues in certain cases.  Work around this by adding a
set of sysctls for controlling a bit-shift on the flowid when doing
multi-port aggrigation in lagg and lacp.  By default, lagg/lacp will
now use bits 16 and higher instead of 0 and higher.

Reviewed by: max
Obtained from: Netflix
MFC after: 3 days

10 years agoAdd globs.c to the build now that it's a separate file.
scottl [Mon, 30 Dec 2013 01:17:05 +0000 (01:17 +0000)]
Add globs.c to the build now that it's a separate file.

Reviewed by: max
Obtained from: Netflix
MFC after: 3 days

10 years agoAdd the -R option to allow fsck_ffs to restart itself when too many critical
scottl [Mon, 30 Dec 2013 01:16:08 +0000 (01:16 +0000)]
Add the -R option to allow fsck_ffs to restart itself when too many critical
errors have been detected in a particular run.

Clean up the global state variables so that a restart can happen correctly.

Separate the global variables in fsck_ffs and fsdb to their own file.  This
fixes header sharing with fscd.

Correctly initialize, static-ize, and remove global variables as needed in
dir.c.  This fixes a problem with lost+found directories that was causing
a segfault.

Correctly initialize, static-ize, and remove global variables as needed in
suj.c.

Initialize the suj globals before allocating the disk object, not after.
Also ensure that 'preen' mode doesn't conflict with 'restart' mode

Submitted by: scottl, max
Reviewed by: max, mckusick (earlier version)
Obtained from: Netflix
MFC after: 3 days

10 years ago* Makefile:
kargl [Mon, 30 Dec 2013 01:06:21 +0000 (01:06 +0000)]
* Makefile:
  . Hook coshl, sinhl, and tanhl into libm.
  . Create symbolic links for corresponding manpages.
  . While here remove a nearby extraneous space.

* Symbol.map:
* src/math.h:
  . Move coshl, sinhl, and tanhl to their proper locations.

* man/cosh.3:
* man/sinh.3:
* man/tanh.3:
  . Update the manpages.

* src/e_cosh.c:
* src/e_sinh.c:
* src/s_tanh.c:
  . Add weak reference for LBDL_MANT_DIG==53 targets.

* src/imprecise.c:
  . Remove the coshl, sinhl, and tanhl kludge.

* src/e_coshl.c:
  . ld80 and ld128 implementation of coshl().

* src/e_sinhl.c:
  . ld80 and ld128 implementation of sinhl().

* src/s_tanhl.c:
  . ld80 and ld128 implementation of tanhl().

Obtained from: bde (mostly), das and kargl

10 years ago* ld80/k_expl.h:
kargl [Mon, 30 Dec 2013 00:51:25 +0000 (00:51 +0000)]
* ld80/k_expl.h:
* ld128/k_expl.h:
  . Split out a computational kernel,__k_expl(x, &hi, &lo, &k) from expl(x).
    x must be finite and not tiny or huge.  The kernel returns hi and lo
    values for extra precision and an exponent k for a 2**k scale factor.
  . Define additional kernels k_hexpl() and hexpl() that include a 1/2
    scaling and are used by the hyperbolic functions.

* ld80/s_expl.c:
* ld128/s_expl.c:
  . Use the __k_expl() kernel.

Obtained from: bde

10 years ago- Probe with BUS_PROBE_DEFAULT instead of 0.
marius [Sun, 29 Dec 2013 23:46:59 +0000 (23:46 +0000)]
- Probe with BUS_PROBE_DEFAULT instead of 0.
- Nuke code setting PCI_POWERSTATE_D0; pci(4) already does that for type 0
  devices.
- There's no need to keep track of resource IDs.
- Quiesce the interrupt before actually detaching.
- Use DEVMETHOD_END.
- Use NULL instead of 0 for pointers.

MFC after: 1 week

10 years ago- Probe with BUS_PROBE_DEFAULT instead of 0.
marius [Sun, 29 Dec 2013 23:05:01 +0000 (23:05 +0000)]
- Probe with BUS_PROBE_DEFAULT instead of 0.
- Nuke code setting PCI_POWERSTATE_D0; pci(4) already does that for type 0
  devices.
- Use PCIR_BAR instead of a homegrown macro.
- There's no need to keep track of resource IDs.
- Quiesce the interrupt before actually detaching.
- Use DEVMETHOD_END.
- Use NULL instead of 0 for pointers.

MFC after: 1 week

10 years ago- Probe with BUS_PROBE_DEFAULT instead of 0.
marius [Sun, 29 Dec 2013 22:56:05 +0000 (22:56 +0000)]
- Probe with BUS_PROBE_DEFAULT instead of 0.
- Nuke code setting PCI_POWERSTATE_D0; pci(4) already does that for type 0
  devices.
- Use PCIR_BAR instead of a homegrown macro.
- There's no need to keep track of resource IDs.
- Quiesce the interrupt before actually detaching.
- Use DEVMETHOD_END.
- Use NULL instead of 0 for pointers.
- Nuke dupe $FreeBSD$.

MFC after: 1 week

10 years ago- Add support for using MSI instead of INTx, controllable via the tunable
marius [Sun, 29 Dec 2013 22:43:14 +0000 (22:43 +0000)]
- Add support for using MSI instead of INTx, controllable via the tunable
  hw.ral.msi_disable (defaulting to using MSI).
- Probe with BUS_PROBE_DEFAULT instead of 0.
- Nuke code setting PCI_POWERSTATE_D0; pci(4) already does that for type 0
  devices.
- Use PCIR_BAR instead of a homegrown macro.
- There's no need to keep track of resource IDs.
- Release resources again in case attaching fails.
- Quiesce the interrupt before detaching.
- Sprinkle const.
- Use DEVMETHOD_END.
- Use NULL instead of 0 for pointers.
- Trim headers.
- Nuke dupe $FreeBSD$.

MFC after: 1 week

10 years agoFix couple of bugs from r257692 related to scan of address list on
glebius [Sun, 29 Dec 2013 22:20:06 +0000 (22:20 +0000)]
Fix couple of bugs from r257692 related to scan of address list on
an interface:
- in in_control() skip over not AF_INET addresses.
- in in_aifaddr_ioctl() and in_difaddr_ioctl() do correct check
  of address family, w/o accessing memory beyond struct ifaddr.

Sponsored by: Nginx, Inc.

10 years agoAdd the '-b' flag to 'camcontrol devlist'. This prints only the existing
scottl [Sun, 29 Dec 2013 20:48:47 +0000 (20:48 +0000)]
Add the '-b' flag to 'camcontrol devlist'.  This prints only the existing
buses and their parent sims, useful for creating a sim->bus->device map.

Obtained from: Netflix
MFC after: 3 days

10 years ago- Remove a redundant variable in mpt_pci_attach().
marius [Sun, 29 Dec 2013 20:41:32 +0000 (20:41 +0000)]
- Remove a redundant variable in mpt_pci_attach().
- #if 0 the currently unused paired port linking and unlinking of dual
  adapters.
- Simplify MSI/MSI-X allocation and release. For a single one, we don't need
  to fiddle with the MSI/MSI-X count and pci_release_msi(9) is smart enough
  to just do nothing in case of INTx.
- Canonicalize actions taken on attach failure and detach.
- Remove the remainder of incomplete support for older FreeBSD versions.

MFC after: 1 week

10 years agoIn sys/dev/scc, remove unused static function scc_setmreg(). While
dim [Sun, 29 Dec 2013 20:23:08 +0000 (20:23 +0000)]
In sys/dev/scc, remove unused static function scc_setmreg().  While
here, invoke scc_getmreg() in two more places where it can be used.

Reviewed by: marcel
MFC after: 3 days

10 years agoIn sys/dev/vxge/vxgehal/vxgehal-ring.c, #if 0 an unused static function.
dim [Sun, 29 Dec 2013 20:16:12 +0000 (20:16 +0000)]
In sys/dev/vxge/vxgehal/vxgehal-ring.c, #if 0 an unused static function.

MFC after: 3 days

10 years agoIn sys/dev/usb/wlan/if_urtw.c, #if 0 a static const variable, which has
dim [Sun, 29 Dec 2013 20:05:48 +0000 (20:05 +0000)]
In sys/dev/usb/wlan/if_urtw.c, #if 0 a static const variable, which has
been unused since r198194.

MFC after: 3 days

10 years agoIn sys/dev/tpm/tpm.c, #if 0 an unused static function.
dim [Sun, 29 Dec 2013 19:55:06 +0000 (19:55 +0000)]
In sys/dev/tpm/tpm.c, #if 0 an unused static function.

MFC after: 3 days

10 years ago- There's no need to keep track of resource IDs.
marius [Sun, 29 Dec 2013 19:32:27 +0000 (19:32 +0000)]
- There's no need to keep track of resource IDs.
- Simplify MSI allocation and release. For a single one, we don't need to
  fiddle with the MSI count and pci_release_msi(9) is smart enough to just
  do nothing in case of INTx.
- Don't allocate MSI as RF_SHAREABLE.
- Use DEVMETHOD_END.
- Use NULL instead of 0 for pointers.

MFC after: 1 week

10 years agoClaim copyright since I've almost rewritten this file in r256512.
glebius [Sun, 29 Dec 2013 19:31:49 +0000 (19:31 +0000)]
Claim copyright since I've almost rewritten this file in r256512.

10 years agoWhen clearing relocations to __dtrace* symbols, handle both SHT_REL and
markj [Sun, 29 Dec 2013 19:27:32 +0000 (19:27 +0000)]
When clearing relocations to __dtrace* symbols, handle both SHT_REL and
SHT_RELA sections properly instead of assuming that the relocation section
is of type SHT_REL.

Submitted by: Prashanth Kumar <pra_udupi@yahoo.co.in> (original version)
MFC after: 1 month

10 years ago- Switch to using the common MII bitbang'ing code instead of duplicating it.
marius [Sun, 29 Dec 2013 19:21:59 +0000 (19:21 +0000)]
- Switch to using the common MII bitbang'ing code instead of duplicating it.
- Based on lessons learnt with dc(4) (see r185750), add bus space barriers to
  the MII bitbang read and write functions as well as to instances of page
  switching.
- Add missing locking to ed_ifmedia_{upd,sts}().
- Canonicalize some messages.
- Based on actual functionality, ED_TC5299J_MII_DIROUT should be rather named
  ED_TC5299J_MII_DIRIN.
- Remove unused headers.
- Use DEVMETHOD_END.
- Use NULL instead of 0 for pointers.

MFC after: 1 week

10 years agoAdd mibs for hastd(1) queue stats.
trociny [Sun, 29 Dec 2013 19:02:33 +0000 (19:02 +0000)]
Add mibs for hastd(1) queue stats.

MFC after: 1 week

10 years agoIn sys/netgraph/netflow, use __FBSDID() instead of old-style rcs_id[].
dim [Sun, 29 Dec 2013 18:53:45 +0000 (18:53 +0000)]
In sys/netgraph/netflow, use __FBSDID() instead of old-style rcs_id[].

MFC after: 3 days