Commit Graph

220311 Commits

Author SHA1 Message Date
Kenneth D. Merry
492a2ef556 Add task attribute support to camcontrol(8).
Users can use the new generic argument, -Q task_attr, to specify a task
attribute (simple, ordered, head of queue, aca) for the commands issued.
The the default is simple, which works with all SCSI devices that support
tagged queueing.

This will mostly be useful for debugging target behavior in certain
situations.

You can try it out by compiling CTL with CTL_IO_DELAY turned on (in
sys/cam/ctl/ctl_io.h) and then do something like this with one of the CTL
LUNs:

ctladm delay 0:0 -l done -t 10
camcontrol tur da34 -v

And at then before the 10 second timer is up, in another terminal:

camcontrol inquiry da34 -Q ordered -v

The Inquiry should complete just after the TUR completes.  Ordinarily
it would complete first because of the delay injection, but because the
task attribute is set to ordered in this case, CTL holds it up until the
previous command has completed.

sbin/camcontrol/camcontrol.c:
	Add the new generic argument, -Q, which allows the user to specify
	a SCSI task attribute.  The user can specify task attributes by
	name or numerically.

	Add a new task_attr arguments to SCSI sub-functions.

sbin/camcontrol/attrib.c,
sbin/camcontrol/camcontrol.h,
sbin/camcontrol/fwdownload.c,
sbin/camcontrol/modeedit.c,
sbin/camcontrol/persist.c,
sbin/camcontrol/timestamp.c,
sbin/camcontrol/zone.c:
	Add the new task_attr argument to SCSI sub-functions.

sbin/camcontrol/camcontrol.8:
	Document the new -Q option, and add an example.

Sponsored by:	Spectra Logic
MFC after:	1 week
2017-02-17 20:04:22 +00:00
Sean Bruno
9264dd40b6 Update OLD_DIRS for various targets so that some of the branches of
directories are pruned when the appropriate knobs are turned.

Specifically, turning off bsdconfig, locales, examples, i18n, man,
ntp, syscons.  It may not seem like a lot, but it helps when trying
to keep an x86 image under 96MB for MFSRoot netbooting.

Reviewed by:	ngie
Differential Revision:	https://reviews.freebsd.org/D9558
2017-02-17 20:02:40 +00:00
Pedro F. Giffuni
759a9a9d24 sort(1): Remove unneeded initializations.
Found by:	Clang static analyzer
2017-02-17 19:53:20 +00:00
Adrian Chadd
109e2d29cc [asmc] Add support for MacBook Pro 11,2
This patch will add support for MacBookPro 11.2.
For the macros, the MBP11_* macros (for the existing MacBookPro11.3) did not
match so they have been renamed to MBP113_* and a new MBP112_* has been
added (modified copy of MBP11_*).

Some trailing whitespaces may have been removed automatically.

PR:		kern/214836
Obtained from:	Johannes Lundberg <johannes@brilliantservice.co.jp
2017-02-17 18:49:18 +00:00
Josh Paetzel
aedc925301 MVF: 313876
7504 kmem_reap hangs spa_sync and administrative tasks

illumos/illumos-gate@405a5a0f5c
https://github.com/illumos/illumos-gate/commit/405a5a0f5c3ab36cb76559467d1a62ba648bd80

https://www.illumos.org/issues/7504

  We see long spa_sync(). We are waiting to hold dp_config_rwlock for writer. Some
  other thread holds dp_config_rwlock for reader, then calls arc_get_data_buf(),
  which finds that arc_is_overflowing()==B_TRUE. So it waits (while holding
  dp_config_rwlock for reader) for arc_reclaim_thread to signal arc_reclaim_waiters_cv.
  Before signaling, arc_reclaim_thread does arc_kmem_reap_now(), which takes ~seconds.

Author: Matthew Ahrens <mahrens@delphix.com>
Reviewed by: George Wilson <george.wilson@delphix.com>
Reviewed by: Prakash Surya <prakash.surya@delphix.com>
Approved by: Dan McDonald <danmcd@omniti.com>
2017-02-17 17:52:12 +00:00
Mateusz Guzik
cbebea4e67 mtx: get rid of file/line args from slow paths if they are unused
This denotes changes which went in by accident in r313877.

On most production kernels both said parameters are zeroed and have nothing
reading them in either __mtx_lock_sleep or __mtx_unlock_sleep. Thus this change
stops passing them by internal consumers which this is the case.

Kernel modules use _flags variants which are not affected kbi-wise.
2017-02-17 15:40:24 +00:00
Mateusz Guzik
09f1319acd mtx: restrict r313875 to kernels without LOCK_PROFILING 2017-02-17 15:34:40 +00:00
Josh Paetzel
91c038e77a 7504 kmem_reap hangs spa_sync and administrative tasks
illumos/illumos-gate@405a5a0f5c
https://github.com/illumos/illumos-gate/commit/405a5a0f5c3ab36cb76559467d1a62ba648bd80

https://www.illumos.org/issues/7504

  We see long spa_sync(). We are waiting to hold dp_config_rwlock for writer. Some
  other thread holds dp_config_rwlock for reader, then calls arc_get_data_buf(),
  which finds that arc_is_overflowing()==B_TRUE. So it waits (while holding
  dp_config_rwlock for reader) for arc_reclaim_thread to signal arc_reclaim_waiters_cv.
  Before signaling, arc_reclaim_thread does arc_kmem_reap_now(), which takes ~seconds.

Author: Matthew Ahrens <mahrens@delphix.com>
Reviewed by: George Wilson <george.wilson@delphix.com>
Reviewed by: Prakash Surya <prakash.surya@delphix.com>
Approved by: Dan McDonald <danmcd@omniti.com>
2017-02-17 15:00:13 +00:00
Mateusz Guzik
7640beb920 mtx: microoptimize lockstat handling in __mtx_lock_sleep
This saves a function call and multiple branches after the lock is acquired.
2017-02-17 14:55:59 +00:00
Mateusz Guzik
57abbcd5ad Make inline lockstat checks just inspect lockstat_enabled
There is no correctness issue and this lets the kernel just test one typically
false variable.
2017-02-17 14:05:57 +00:00
Michal Meloun
d98d230378 Publish fp[get][set]sticky() for ARMv6.
Although fp[get][set]sticky() functions are obsolete, they are still
required for GNU fortran49 library.

MFC after: 2 months
Reviewed by: kib
Differential Revision: https://reviews.freebsd.org/D9634
2017-02-17 13:49:46 +00:00
Hans Petter Selasky
269d8c86e9 Implement GFP_DMA32 flag in the LinuxKPI.
Define all FreeBSD native GFP bits as GFP_NATIVE_MASK.

Obtained from:		kmacy @
MFC after:		1 week
Sponsored by:		Mellanox Technologies
2017-02-17 13:31:11 +00:00
Roger Pau Monné
43b00aeb88 x86: fix MTRR initialization if EARLY_AP_STARTUP is used
MTRR handlers are set in {amd64/i686}_mem_drvinit, which is called at
SI_SUB_DRIVERS, and that's too late when EARLY_AP_STARTUP is set because APs
have already started at this point. {amd64/i686}_mrinit is also called too late
for the BSP, since that happens when the memory device is attached, also after
APs have already started.

Move the position to SI_SUB_CPU, and also initialize the state for the BSP, so
that the APs can correctly get to the same state as the BSP.

Sponsored by:		Citrix Systems R&D
MFC after:		1 week
Reviewed by:		jhb, kib
Differential Revision:	https://reviews.freebsd.org/D9630
2017-02-17 12:47:51 +00:00
Baptiste Daroussin
02db5d1d66 Use full name for the month
Reported by:	brueffer
2017-02-17 11:31:27 +00:00
Baptiste Daroussin
0150ca6914 Also add vsevolod@ in the authors 2017-02-17 11:26:03 +00:00
Baptiste Daroussin
9a00b6c855 Add history and Authors section in the manpage
Submitted by:	dteske
MFC after:	2 days
Differential Revision:	https://reviews.freebsd.org/D9419
2017-02-17 11:17:56 +00:00
Michal Meloun
cd9bdb7362 Publish __aeabi_uidiv and __aeabi_idiv as compatible symbols from libc.
Due to bug[1] in libcompiler_rt, all symbols declared by
DEFINE_AEABI_FUNCTION_ALIAS() are not hidden. All these but two
are explicitly exported from libc and don't causes problems.

Remaining two, __aeabi_uidiv and __aeabi_idiv, infecting all
non-versioned shared libraries. And these symbols are consumed
by many (if not all) packages[2].

As workaround, export these from libc as compatible symbols,
in global namespace. With this, these are still visible for
rtld, but static linker doesn't use then.

[1]
DEFINE_AEABI_FUNCTION_ALIAS() macro uses '.set' directive for
declaration of aliased symbol. Unfortunately, '.set' doesn't
inherit visibility of base symbol, and macro don't explicitly
sets visibility for aliased one.

[2]
Given symbols are exported from non-versioned libraries only if
library itself uses them. So, if world is built for CPU with
HW divide, these function are not used and given symbols are
not exported. By this, contents of these libraries is not stable,
and all packages fails to run.

Note: Due to r313823 I'm forced to commit this too early, without
leave enough time for proper review.

MFC after: 1 month
Differential Revision: https://reviews.freebsd.org/D9632
2017-02-17 11:16:19 +00:00
Mateusz Guzik
0108a98012 sx: fix compilation on UP kernels after r313855
sx primitives use inlines as opposed to macros. Change the tested condition
to LOCK_DEBUG which covers the case, but is slightly overzelaous.

Reported by:	kib
2017-02-17 10:58:12 +00:00
Mahdi Mokhtari
1fdfb24aa7 Add documentations related to new APIs of r313761
PR:		216850 216851 216852 216856 216857 216858
Submitted by:	sgk@troutmask.apl.washington.edu
Reported by:	sgk@troutmask.apl.washington.edu
Reviewed by:	bde emaste hselasky
Approved by:	bde emaste hselasky
Differential Revision:	https://reviews.freebsd.org/D9491
2017-02-17 08:25:48 +00:00
Mahdi Mokhtari
a287735349 Fix building of r313761 on platforms that
`long double` is alias of `double` (MIPS, etc)

PR:		216850 216851 216852 216856 216857 216858
Reported by:	emsate
Reviewed by:	bde emaste hselasky
Approved by:	bde emaste hselasky
Differential Revision:	https://reviews.freebsd.org/D9491
2017-02-17 08:22:32 +00:00
Warner Losh
31754f4996 Remove ahb references as well as 1640 info in aha.4 2017-02-17 06:49:54 +00:00
Warner Losh
dabe508323 Remove residuals of mca support 2017-02-17 06:49:46 +00:00
Mateusz Guzik
91fa47076d Introduce SCHEDULER_STOPPED_TD for use when the thread pointer was already read
Sprinkle in few places.
2017-02-17 06:45:04 +00:00
Warner Losh
7a457115a9 Bump FreeBSD_version to 1200021 for removal of EISA and MCA. 2017-02-17 06:22:05 +00:00
Warner Losh
18f447ed56 Note EISA and MCA bus removal 2017-02-17 06:22:00 +00:00
Warner Losh
08356e1450 Remove EISA build option 2017-02-17 06:13:49 +00:00
Mateusz Guzik
ffd5c94c4f locks: let primitives for modules unlock without always goging to the slsow path
It is only needed if the LOCK_PROFILING is enabled. It has to always check if
the lock is about to be released which requires an avoidable read if the option
is not specified..
2017-02-17 05:39:40 +00:00
Alexander Motin
7a465c285f Change the way MaxCmdSN is used.
Before this change MaxCmdSN was reported as CmdSN + delta, that made it
limit number of requests in transmission from the initiator to target,
that was pretty useless.  After this change MaxCmdSN limits number of
requests queued to CTL, i.e. maximal queue depth for the initiator.
The default limit is 256 outstanding requests per initiator at a time.

This code uses existing cs_outstanding_ctl_pdus counter to track queue
depth.  It's semantics doen't perfectly match, but close enough to not
add another counter.  Just don't set the maxtags below 2.

MFC after:	2 weeks
2017-02-17 05:22:58 +00:00
Mateusz Guzik
afa39f7a32 locks: remove SCHEDULER_STOPPED checks from primitives for modules
They all fallback to the slow path if necessary and the check is there.

This means a panicked kernel executing code from modules will be able to
succeed doing actual lock/unlock, but this was already the case for core code
which has said primitives inlined.
2017-02-17 05:09:51 +00:00
Alexander Motin
4c9ea0ced9 Freeze CAM SIM when request is postponed due to MaxCmdSN.
This allows to avoid resource allocation (especially offload) for requests
that can not be executed at this time any way.

MFC after:	2 weeks
2017-02-17 04:34:17 +00:00
Alexander Motin
5b338bc073 Fix tight loop spinning on postponed requests.
MFC after:	2 weeks
2017-02-17 04:29:23 +00:00
Mark Johnston
7174af791e Directly include needed headers rather than relying on pollution.
We get machine/cpu.h via kmem.h -> proc.h -> _vm_domain.h -> seq.h.

Reported by:	Ryan Libby
Sponsored by:	Dell EMC Isilon
X-MFC with:	r313841
2017-02-17 03:27:20 +00:00
Warner Losh
2fe7440f84 Remove EISA reference here 2017-02-16 23:38:30 +00:00
Mark Johnston
a11ac730a7 Prevent CPU migration when checking the DTrace nofault flag on x86.
dtrace_trap() consumes page and protection faults triggered by code running
in DTrace probe context. Such faults occur with interrupts disabled and are
detected using a per-CPU flag. Regular faults cause dtrace_trap() to be
called with interrupts enabled, and nothing was ensuring that the flag was
read from the correct CPU. This may result in dtrace_trap() consuming
unrelated page and protection faults when DTrace is enabled, causing the
fault handler to return without actually having handled the fault.

Diagnosed by:	Ryan Libby <rlibby@gmail.com>
MFC after:	3 days
Sponsored by:	Dell EMC Isilon
2017-02-16 23:05:20 +00:00
Glen Barber
f82185a08f Fix the hardware.html build.
Sponsored by:	The FreeBSD Foundation
2017-02-16 22:29:37 +00:00
Warner Losh
86d99b6884 Remove EISA bus support for add-in cards. Remove related kernel and
compile options. Remove doxygen pointers to now deleted files. Remove
EISA and VME as examples in bus_space.9.

Retained EISA mode code for IO PIC and MPTABLES because that's not
EISA bus, per se, and some people have abused EISA to mean "EISA-like
behavior as opposed to ISA" rather than using it for EISA add-in
cards.

Relnotes: yes
2017-02-16 21:57:35 +00:00
Warner Losh
7a3a7496f1 Remove PCI/EISA bridge support. But keep knowing that a chip is this
kind of bridge since we know for other types of unsupported bridges as
well.
2017-02-16 21:57:30 +00:00
Warner Losh
792c00971a Remove EISA support from Buslogic (bt) cards. Remove known models form
man page. Tweak comments to not refer to EISA scenarios now that it is
no longer supported. Remove unused enum.
2017-02-16 21:57:25 +00:00
Warner Losh
a4e4cebf17 Remove EISA support from ahc driver. The AIC-7770 chip can be on ISA,
VesaLocalBus or EISA. Internally, EISA and ISA are handled the same,
with VL being handled slightly differently. To avoid too much code
churn, retain the EISA name, despite it being used only for ISA
bus. When it is on the ISA bus, weird gymnastics are required with
EISA-space address accesses as well. Remove known models from the ahc
man page. Remove ahc_eisa module.
2017-02-16 21:57:19 +00:00
Warner Losh
bcb3c3b5eb Remove EISA support from dpt. Remove known EISA models from
dpt.4. Remove EISA-only bits from dpt_scsi.c.
2017-02-16 21:57:13 +00:00
Warner Losh
f08a6f5946 Remove EISA attachment (fea) from pdq driver. Remove vestiges of
TurboChannel and Q-Bus support while I'm here. Remove obsolete
diagnostics from man page.
2017-02-16 21:57:08 +00:00
Warner Losh
3fb3ab7f1c Remove EISA support from adv driver. Remove references to it from man
page. Remove comment about EISA dual channel card. Remove trivial
references in advlib to avoid false positives with grep. Remove stray
MCA reference not worth a seperate commit.
2017-02-16 21:57:02 +00:00
Warner Losh
68872de68c Remove support for EISA in the ida driver. Remove references to
EISA-only registers. Remove known EISA cards from man page.
2017-02-16 21:56:57 +00:00
Warner Losh
f2e8ba3f76 Remove EISA support for ep driver. Left in place EISA strings that are
still relevant (ISA cards can still be in EISA mode, and we're still
ignoring those in the identify routine). Notes about cards in EISA
mode have been left in the manual since they aren't relevant to EISA
support, but instruct how to properly configure an ISA card in a mode
when it is in a ISA bus slot.
2017-02-16 21:56:51 +00:00
Warner Losh
222dc69183 Remove references to EISA support from the vx driver, along with EISA
support. Fix a comment block that's shared with both vx and ep. Remove
obsolete refernce to statically compiling a kernel with a fixed number
of vx devices. Have not removed EISA from the title of the document
the register definitions were originally derived from (though no doubt
more recent docments were also consulted).
2017-02-16 21:56:46 +00:00
Warner Losh
1697447ec0 Remove references to C-Bus support in the le(4) driver. Support for
these devices were removed when pc98 was removed.
2017-02-16 21:56:41 +00:00
Warner Losh
62942cfb95 Remove stray reference to EISA bus support that was never in FreeBSD. 2017-02-16 21:56:36 +00:00
Warner Losh
572f2440a8 Remove references to EISA support in mlx. The driver never supported
the EISA cards and EISA bus support is being removed.
2017-02-16 21:56:32 +00:00
Warner Losh
d4bfe93950 Remove the ahb driver for the EISA Adaptec 174x. 2017-02-16 21:56:27 +00:00
Warner Losh
596c88eeb8 Remove stale MCA comment now that the MCA bus support is gone.
Relnotes: yes
2017-02-16 21:56:21 +00:00