201239 Commits

Author SHA1 Message Date
trasz
8a895b1fb5 MFC r287396:
It's 2015, and some people are still trying to use fdisk and then
go asking what debug flags to set for GEOM to make it work.  Advice
them to use gpart(8) instead.

Something similar should probably done with disklabel,
but I need to rewrite the disklabel examples first.

Sponsored by:	The FreeBSD Foundation
2016-01-11 20:10:14 +00:00
trasz
3426ec6df3 MFC r287704:
Point potential geom_fox(4) users to gmultipath(8).

Sponsored by:	The FreeBSD Foundation
2016-01-11 20:03:58 +00:00
trasz
55bfa73168 MFC 289113:
Add 'p' postfix to mdconfig(8).

Sponsored by:	The FreeBSD Foundation
2016-01-11 20:01:50 +00:00
trasz
abb53e3983 MFC r289111:
Provide better debug message on kernel module name clash.

Sponsored by:	The FreeBSD Foundation
2016-01-11 19:59:56 +00:00
trasz
cfd269b25d MFC r290408:
Make rctl(8) use more reasonable buffer size for retrieving the rules.

Sponsored by:	The FreeBSD Foundation
2016-01-11 19:32:07 +00:00
bapt
7ba2ab6d8e MFC: r290153 (by bdrewery)
Fix unlikely memory leak.

It is unlikely since the first check in the function is that dir[0] is '/',
but later code changes may make it real.

Coverity CID:	1332104
2016-01-11 19:26:18 +00:00
bapt
d873bf8d21 MFC: 278899
Regression: fix usershow -7
2016-01-11 19:22:58 +00:00
trasz
05a2e89882 MFC r290404:
Fix markup in rctl(8) - the 'rule' or 'filter' arguments are not optional.

Sponsored by:	The FreeBSD Foundation
2016-01-11 19:21:20 +00:00
jimharris
4ee57b647a MFC r293369:
ismt: fix ISMT_DESC_ADDR_RW macro
2016-01-11 17:54:23 +00:00
jimharris
984dd4e553 MFC r266474:
Add ismt(4) driver.

  ismt(4) supports the SMBus Message Transport controller found on Intel
  C2000 series (Avoton) and S1200 series (Briarwood) Atom SoCs.

Relnotes:	Yes
2016-01-11 17:53:24 +00:00
jimharris
cf634dbeba MFC r293354:
nvme: replace NVME_CEILING macro with howmany()
2016-01-11 17:33:51 +00:00
jimharris
132d9697c0 MFC r293352:
nvme: add hw.nvme.min_cpus_per_ioq tunable

  Due to FreeBSD system-wide limits on number of MSI-X vectors
  (https://bugs.freebsd.org/bugzilla/show_bug.cgi?id=199321),
  it may be desirable to allocate fewer than the maximum number
  of vectors for an NVMe device, in order to save vectors for
  other devices (usually Ethernet) that can take better
  advantage of them and may be probed after NVMe.

  This tunable is expressed in terms of minimum number of CPUs
  per I/O queue instead of max number of queues per controller,
  to allow for a more even distribution of CPUs per queue.  This
  avoids cases where some number of CPUs have a dedicated queue,
  but other CPUs need to share queues.  Ideally the PR referenced
  above will eventually be fixed and the mechanism implemented
  here becomes obsolete anyways.

  While here, fix a bug in the CPUs per I/O queue calculation to
  properly account for the admin queue's MSI-X vector.
2016-01-11 17:32:56 +00:00
jimharris
613dac6224 MFC r293328:
nvme: do not revert to single I/O queue when per-CPU queues not available

  Previously nvme(4) would revert to a single I/O queue if it could not
  allocate enought interrupt vectors or NVMe submission/completion queues
  to have one I/O queue per core.  This patch determines how to utilize a
  smaller number of available interrupt vectors, and assigns (as closely
  as possible) an equal number of cores to each associated I/O queue.
2016-01-11 17:31:18 +00:00
jimharris
37703e3991 MFC r293327:
nvme: break out interrupt setup code into a separate function
2016-01-11 17:29:42 +00:00
jimharris
0cfdfff8b8 MFC r293326:
nvme: do not pre-allocate MSI-X IRQ resources

  The issue referenced here was resolved by other changes
  in recent commits, so this code is no longer needed.
2016-01-11 17:28:47 +00:00
jimharris
19ecb17f9b MFC r293325:
nvme: remove per_cpu_io_queues from struct nvme_controller

  Instead just use num_io_queues to make this determination.

  This prepares for some future changes enabling use of multiple
  queues when we do not have enough queues or MSI-X vectors
  for one queue per CPU.
2016-01-11 17:27:20 +00:00
jimharris
87e2ccc8c2 MFC r293324:
nvme: simplify some of the nested ifs in interrupt setup code

  This prepares for some follow-up commits which do more work in
  this area.
2016-01-11 17:26:06 +00:00
jimharris
cc3b9500d5 MFC r293323:
nvd: submit bios directly when BIO_ORDERED not set or in flight

  This significantly improves parallelism in the most common case.
  The taskqueue is still used whenever BIO_ORDERED bios are in flight.

  This patch is based heavily on a patch from gallatin@.
2016-01-11 17:24:18 +00:00
jimharris
f1a487f0bc MFC r293322:
nvd: break out submission logic into separate function

  This enables a future patch using this same logic to submit
  I/O directly bypassing the taskqueue.
2016-01-11 17:22:57 +00:00
jimharris
2680e52f64 MFC r293321:
nvd: skip BIO_ORDERED logic when bio fails submission

  This ensures the bio flags are not read after biodone().
  The ordering will still be enforced, after the bio is
  submitted successfully.
2016-01-11 17:21:38 +00:00
jimharris
5c319e733f MFC r293320:
nvd: do not wait for previous bios before submitting ordered bio

  Still wait until all in-flight bios (including the ordered bio)
  complete before processing more bios from the queue.
2016-01-11 17:20:30 +00:00
jimharris
6e9e265991 MFC r293319:
nvd: set DISKFLAG_DIRECT_COMPLETION
2016-01-11 17:19:11 +00:00
emaste
617c4d1412 MFC r286967 by imp: use -mno-aes and -mno-avx flags only with Clang
The flags -mno-aes -mno-avx only exist for clang, not [base] gcc, so
add them only to the clang CFLAGS.
2016-01-11 15:30:19 +00:00
emaste
f7c85d0c10 Move -msoft-float compiler flag into x86/i386 cases to fix ia64
Direct commit to stable/10 as ia64 support does not exist in HEAD.
2016-01-11 04:25:03 +00:00
glebius
c41fbaf9bc Merge r293423, r293469:
ntp 4.2.8p5

Relnotes:	yes
2016-01-11 01:09:50 +00:00
emaste
3066f138bc MFC r281027: Clean up more x86 only options in the efi code. 2016-01-11 00:43:50 +00:00
pfg
d10ff89a31 MFC r293370:
ext2fs: reading mmaped file in Ext4 causes panic

Always call brelse(path.ep_bp), fixing reading EXT4 files using mmap().

Patch by Damjan Jovanovic.

PR:		205938
2016-01-10 22:30:39 +00:00
ngie
e491a7871f Unbreak stable/10 buildworlds on arm/arm, mips/mips, mips/mips64, mips/mipsel,
mips/mipsn32, powerpc/powerpc, powerpc/powerpc64, sparc64/sparc64 with gcc
after r293307 (some of the BURN_BRIDGES code)

MFC after: 3 days
Pointyhat to: markj
Sponsored by: EMC / Isilon Storage Division

MFC r279017:

r279017 (by glebius):

Burn bridges to FreeBSD 7.x IGMP stats.
2016-01-10 17:39:49 +00:00
ae
09204e7670 MFC r292057:
Make detection of GPT a bit more reliable.

  When we are detecting a partition table and didn't find PMBR, try to
  read backup GPT header from the last sector and if it is correct,
  assume that we have GPT.

  Differential Revision:	https://reviews.freebsd.org/D4282

MFC r292058:
  Remove a note about damaged PMBR. Now GPT will be detected automatically
  with such corruption.

Relnotes:	yes
2016-01-10 13:53:57 +00:00
dteske
fdecbaeff5 MFC SVN revisions 293340, 293379
r293340: Increase maximum buffer size for `-x cmd' value
r293379: Bump copyright
2016-01-09 23:44:41 +00:00
dteske
cac8f39a78 MFC r290275: Make figpar(3) types/macros [more] unique (s/fp_/figpar_/gi) 2016-01-09 23:33:44 +00:00
dchagin
9cc1e32ab0 Bump __FreeBSD_version after Linux changes merge. 2016-01-09 18:40:20 +00:00
dchagin
07e5594c02 MFC r289055 (by mjg@):
linux: fix handling of out-of-bounds syscall attempts

 Due to an off by one the code would read an entry past the table, as
 opposed to the last entry which contains the nosys handler.

 This fixes my fault.

MFC r289058 (by cem@):

 Fix missing semi-colon from r289055.

MFC r289768 (by jhb@):

 Merge r289055 to amd64/linux32:

 linux: fix handling of out-of-bounds syscall attempts

 Due to an off by one the code would read an entry past the table, as
 opposed to the last entry which contains the nosys handler.
2016-01-09 18:32:52 +00:00
dchagin
f7ac54cb05 MFC r288994 (by bdrewery):
Remove redundant RFFPWAIT/vfork(2) handling in Linux fork(2) and clone(2) wrappers.

r161611 added some of the code from sys_vfork() directly into the Linux
module wrappers since they use RFSTOPPED.  In r232240, the RFFPWAIT handling
was moved to syscallret(), thus this code in the Linux module is no longer
needed as it will be called later.

This also allows the Linux wrappers to benefit from the fix in r275616 for
threads not getting suspended if their vforked child is stopped while they
wait on them.
2016-01-09 18:28:15 +00:00
dchagin
236dbed3f3 MFC r287395 (by trasz):
Fixes a panic triggered by threaded Linux applications when running
with RACCT/RCTL enabled.
2016-01-09 18:24:53 +00:00
dchagin
0fba4d3140 MFC r284626:
Add EPOLLRDHUP support.
2016-01-09 18:23:34 +00:00
dchagin
3fca4fe852 MFC r284166 (by jkim):
Properly initialize flags for accept4(2) not to return spurious EINVAL.
Note this fixes a Linuxulator regression introduced in r283490.

PR:             200662
2016-01-09 18:22:09 +00:00
dchagin
d1e4a825ff MFC r284159:
Futex is an aligned 32-bit integer. Use the proper instruction and
operand when dereferencing futex pointer.
2016-01-09 18:19:18 +00:00
dchagin
ea82ee5fc1 MFC r284051:
Finish r283544. In exec case properly detach threads from user space
before suicide.
2016-01-09 18:17:58 +00:00
dchagin
9ef3c11237 MFC r283680, r283681:
Move linux64 and linux_common to it's right place and make them not
depend on bhyve.
2016-01-09 18:16:36 +00:00
dchagin
1db5b62099 MFC r283569 (by nyan):
MFi386: r283407
  Implement vdso - virtual dynamic shared object.

MFi386: r283474
  Rework signal code to allow using it by other modules, like linprocfs.

MFi386: r283506
  For objcopy, use --input-target and --output-target.

This fixes pc98 build.
2016-01-09 18:09:07 +00:00
dchagin
1fd2c934ac MFC r283544:
When I merged the lemul branch I missied kib@'s r282708 commit.
This is not the final fix as I need properly cleanup thread resources
before other threads suicide.
2016-01-09 18:07:48 +00:00
dchagin
76b321901e MFC r283506 (by rodrigc):
For objcopy, use --input-target and --output-target

When building with gcc 4.9 and binutils 2.25,
using '--input' and '--output' returns an error
message:
   objcopy: option `--input' is ambiguous
2016-01-09 18:06:38 +00:00
dchagin
196dc3bdfb MFC r283498:
Linux nanosleep() and clock_nanosleep() system calls always
writes the remaining time into the structure pointed to by rmtp
unless rmtp is NULL. The value of *rmtp can then be used to call
nanosleep() again and complete the specified pause if the previous
call was interrupted.

Note. clock_nanosleep() with an absolute time value does not write
the remaining time.

While here fix whitespaces and typo in SDT_PROBE.
2016-01-09 18:05:04 +00:00
dchagin
7cbbe6a948 MFC r283497:
Convert SCM_TIMESTAMP in recvmsg().
2016-01-09 18:04:10 +00:00
dchagin
b7998c8663 MFC r283496:
The latest cp tool is trying to use the btrfs clone operation that is
implemented via ioctl interface. First of all return ENOTSUP for this
operation as a cp fallback to usual method in that case. Secondly, do
not print out the message about unimplemented operation.
2016-01-09 18:03:09 +00:00
dchagin
8f96e27e04 MFC r283495:
Hide vfs.pfs.trace variable if it is not used.
2016-01-09 18:02:08 +00:00
dchagin
1e8561a8e3 MFC r283494:
Fix an mbuf(9) leak in sendmsg() under failure condition and
remove unneeded check for failed M_WAITOK allocation.
2016-01-09 18:00:51 +00:00
dchagin
6470ace45c Regen for r293592. 2016-01-09 17:56:04 +00:00
dchagin
ddaf8065bb MFC r283492:
Implement Linux specific syncfs() system call.
2016-01-09 17:54:37 +00:00