Commit Graph

186667 Commits

Author SHA1 Message Date
Alexander Motin
99e2428636 Remove extra conversion to nanoseconds from ddi_get_lbolt64().
As result this uses one multiplication and shifts instead of one division
and two multiplications.
2014-01-03 18:08:31 +00:00
Mateusz Guzik
231a0fe857 Plug a memory leak in dup2 when both old and new fd have ioctl caps.
Reviewed by:	pjd
MFC after:	3 days
2014-01-03 16:36:55 +00:00
Mateusz Guzik
0918d4b21f Don't check for fd limits in fdgrowtable_exp.
Callers do that already and additional check races with process
decreasing limits and can result in not growing the table at all, which
is currently not handled.

MFC after:	3 days
2014-01-03 16:34:16 +00:00
Alexander Motin
d473bac729 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.
2014-01-03 15:09:59 +00:00
Alexander V. Chernikov
868f984c05 Remove useless register variable modifiers.
Do some more style(9).

MFC after:	2 weeks
2014-01-03 14:33:25 +00:00
Gleb Smirnoff
e5d72e64d9 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
2014-01-03 12:06:54 +00:00
Gleb Smirnoff
0cc726f25a Make failure of ifpromisc() a non-fatal error. This makes it possible to
run carp(4) on vtnet(4).

Sponsored by:	Nginx, Inc.
2014-01-03 11:03:12 +00:00
Pawel Jakub Dawidek
93b3fdba4a MFp4 @1189741:
- Add missing nvlist_destroy().
- Don't override nvlout.

Submitted by:	Mariusz Zaborski <oshogbo@FreeBSD.org>
MFC after:	3 days
2014-01-03 09:10:04 +00:00
Pawel Jakub Dawidek
3ae9762b9a MFp4 @1189711:
Fix resource leaks on nvlist_destroy().

Reported by:	Mariusz Zaborski <oshogbo@FreeBSD.org>
MFC after:	3 days
2014-01-03 09:07:03 +00:00
Kevin Lo
2f95141e5f Regen. 2014-01-03 06:02:08 +00:00
Kevin Lo
7a7e01caa4 Add support for the MediaTek/Ralink RT3593 chipset.
Committed over the ZyXEL NWD2705 on amd64 with WPA.
2014-01-03 06:01:05 +00:00
Andrey V. Elsukov
b88aef1dcf Use pointer to struct sockaddr_in6 in lla_lookup() call.
This prevents from triggering KASSERT in in6_lltable_lookup.
2014-01-03 02:40:56 +00:00
Andrey V. Elsukov
e2d14d9317 Add IF_AFDATA_WLOCK_ASSERT() in case lla_lookup() is called with
LLE_CREATE flag.

MFC after:	1 week
2014-01-03 02:32:05 +00:00
Warner Losh
8b96ccd4b5 Fill in some more info about the (somewhat old) Samsung parts I have
here...
2014-01-03 00:26:56 +00:00
Warner Losh
de74da330d The HOT-E HL201 has 128MB Samsung SLC NAND, ID it properly. 2014-01-03 00:17:52 +00:00
Adrian Chadd
3af0f449ae 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
2014-01-02 23:23:33 +00:00
George V. Neville-Neil
d9168b014f Convert #defines to enums so that the values are visible in the debugger.
Requested by:	gibbs
MFC after:	2 weeks
2014-01-02 21:30:59 +00:00
John Baldwin
e6c8bc291a 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)
2014-01-02 21:26:59 +00:00
Konstantin Belousov
27fd75d2c8 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
2014-01-02 18:50:52 +00:00
Konstantin Belousov
c0be75a58a Assert that accounting for the pmap resident pages does not underflow.
Reviewed by:	alc
Sponsored by:	The FreeBSD Foundation
MFC after:	1 week
2014-01-02 18:49:05 +00:00
Pedro F. Giffuni
d096f2f5a8 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.
2014-01-02 13:53:53 +00:00
Zbigniew Bodek
b1c5afbb2f 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.
2014-01-02 11:24:04 +00:00
Gleb Smirnoff
183e1c8634 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
2014-01-02 10:18:39 +00:00
Andrey V. Elsukov
ea0c377602 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
2014-01-02 08:40:37 +00:00
Xin LI
ccee6fd2e5 Fix !INET6 build for various platforms. 2014-01-02 08:39:47 +00:00
Xin LI
7c88e58f46 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@8b36997aa2

MFC after:	2 weeks
2014-01-02 08:10:35 +00:00
Hans Petter Selasky
682d7ab884 Minor correction for the XHCI reset logic.
MFC after:	1 week
Found by:	Horse Ma <HMa@wyse.com>
2014-01-02 08:02:57 +00:00
Xin LI
ab0b9f6b30 MFV r260154 + 260182:
4369 implement zfs bookmarks
4368 zfs send filesystems from readonly pools

Illumos/illumos-gate@78f1710053

MFC after:	2 weeks
2014-01-02 07:34:36 +00:00
Xin LI
6f2791f53a Fix build on platforms where atomic_swap_64 is not available. 2014-01-02 03:24:44 +00:00
Warner Losh
e6ffadc39f Make the comment match the code. Not sure why we calculate it this
weird way, but didn't change that...
2014-01-02 02:20:10 +00:00
Marcel Moolenaar
37ed8bfa35 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.
2014-01-01 22:51:19 +00:00
Gleb Smirnoff
7ee35ac9f3 - 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.
2014-01-01 21:48:04 +00:00
Neel Natu
0492757c70 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@
2014-01-01 21:17:08 +00:00
Zbigniew Bodek
e1b5472915 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
2014-01-01 20:35:38 +00:00
Zbigniew Bodek
49390e758d 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
2014-01-01 20:26:08 +00:00
Zbigniew Bodek
df2ec2e4fb 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
2014-01-01 20:18:03 +00:00
Ed Maste
0e5e176f1f Remove TNF license clauses 3 and 4, matching upstream
Approved by raj@ (Semihalf has a copyright statement in the license block
as well).
2014-01-01 20:04:43 +00:00
Zbigniew Bodek
4acd62c51e 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
2014-01-01 20:03:48 +00:00
Ed Maste
98457e0bb5 Increase vt(9) max glyph data to 1MB for CJK fonts with many glyphs
Sponsored by:	The FreeBSD Foundation
2014-01-01 19:38:15 +00:00
Xin LI
647795d181 MFV r260153:
4121 vdev_label_init should treat request as succeeded when pool
     is read only

Illumos/illumos-gate@973c78e94b

MFC after:	2 weeks
2014-01-01 01:26:39 +00:00
Xin LI
7353c6e991 MFV r260152:
4208 Typo in zfs_main.c: "posxiuser"

illumos/illumos-gate@f38cb554a5

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

MFC after:	2 weeks
2014-01-01 01:23:40 +00:00
Xin LI
5ed46bbf4d 4391 panic system rather than corrupting pool if we hit bug 4390
llumos/illumos-gate@8b36997aa2
2014-01-01 01:18:37 +00:00
Xin LI
cbdc759424 4369 implement zfs bookmarks
4368 zfs send filesystems from readonly pools

llumos/illumos-gate@78f1710053
2014-01-01 01:15:53 +00:00
Xin LI
f6eff23569 4121 vdev_label_init should treat request as succeeded when pool
is read only

llumos/illumos-gate@973c78e94b
2014-01-01 01:05:38 +00:00
Xin LI
3142b7d42d (Stripped down import from Illumos)
4208 Typo in zfs_main.c: "posxiuser"

llumos/illumos-gate@f38cb554a5
2014-01-01 01:00:04 +00:00
Adrian Chadd
c445d2520d 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.
2014-01-01 00:56:26 +00:00
Xin LI
f4c8ba8370 MFV r259170:
4370 avoid transmitting holes during zfs send

4371 DMU code clean up

illumos/illumos-gate@43466aae47

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

MFC after:	2 weeks
2014-01-01 00:45:28 +00:00
Steve Kargl
1531aa5f6a * 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
2013-12-31 23:59:33 +00:00
Xin LI
f86b34932a MFV r258972:
4373 add block contents print to zstreamdump

illumos/illumos-gate@994fb6b8a9

MFC after:	2 weeks
2013-12-31 21:37:24 +00:00
Xin LI
cca1e7c623 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@39cddb10a3

MFC after:	2 weeks
2013-12-31 21:24:00 +00:00