MFC r227802:

Improve the way to calculate available pages in tmpfs:

 - Don't deduct wired pages from total usable counts because it does not
   make any sense.  To make things worse, on systems where swap size is
   smaller than physical memory and use a lot of wired pages (e.g. ZFS),
   tmpfs can suddenly have free space of 0 because of this;
 - Count cached pages as available; [1]
 - Don't count inactive pages as available, technically we could but that
   might be too aggressive; [1]

[1] Suggested by kib@


git-svn-id: svn://svn.freebsd.org/base/stable/9@233769 ccf9f872-aa2e-dd11-9fc8-001c23d0bc1f
Merge r233506: MySQL port 3306 in /etc/services


git-svn-id: svn://svn.freebsd.org/base/stable/9@233772 ccf9f872-aa2e-dd11-9fc8-001c23d0bc1f
MFC r233168:
If we ever allow for managed fictitious pages, the pages shall be
excluded from superpage promotions.  At least one of the reason is
that pv_table is sized for non-fictitious pages only.

Consistently check for the page to be non-fictitious before accesing
superpage pv list.

MFC note: erronous chunks from r233168 which were fixed in r233185
are not included into the merge.


git-svn-id: svn://svn.freebsd.org/base/stable/9@233775 ccf9f872-aa2e-dd11-9fc8-001c23d0bc1f
Turn off WITNESS, etc. for GENERIC64. This was missed in the stable/9
branch in r226405.


git-svn-id: svn://svn.freebsd.org/base/stable/9@233779 ccf9f872-aa2e-dd11-9fc8-001c23d0bc1f
MFC r233622:

Ensure consistent target IDs for direct-attached devices.

Sponsored by: Intel
Reported by: sbruno, Ravi Pokala <rpokala at panasas dot com>
Tested by: Ravi Pokala <rpokala at panasas dot com>
Approved by: sbruno


git-svn-id: svn://svn.freebsd.org/base/stable/9@233784 ccf9f872-aa2e-dd11-9fc8-001c23d0bc1f
MFC r233663:

Fix bug where isci(4) would report only 15 bytes of returned data on a
READ_CAP_16 command to a SATA target.

Sponsored by: Intel
Approved by: sbruno


git-svn-id: svn://svn.freebsd.org/base/stable/9@233788 ccf9f872-aa2e-dd11-9fc8-001c23d0bc1f
MFC:	r233619

Add a PNP ID for Japanese 106-key keyboard.


git-svn-id: svn://svn.freebsd.org/base/stable/9@233794 ccf9f872-aa2e-dd11-9fc8-001c23d0bc1f
MFC:	r232416, r232561

Add VESA option to GENERIC for amd64 and i386.


git-svn-id: svn://svn.freebsd.org/base/stable/9@233797 ccf9f872-aa2e-dd11-9fc8-001c23d0bc1f
MFC:	r233702

Work around Erratum 721 for AMD Family 10h and 12h processors.


git-svn-id: svn://svn.freebsd.org/base/stable/9@233798 ccf9f872-aa2e-dd11-9fc8-001c23d0bc1f
MFC r231976:

unp_connect() may use a shared lock on the vnode to fetch the socket.

Suggested by:	jhb
Reviewed by:	jhb, kib, rwatson


git-svn-id: svn://svn.freebsd.org/base/stable/9@233801 ccf9f872-aa2e-dd11-9fc8-001c23d0bc1f
MFC r232152:

When detaching a unix domain socket, uipc_detach() checks
unp->unp_vnode pointer to detect if there is a vnode associated with
(binded to) this socket and does necessary cleanup if there is.

The issue is that after forced unmount this check may be too late as
the unp_vnode is reclaimed and the reference is stale.

To fix this provide a helper function that is called on a socket vnode
reclamation to do necessary cleanup.

Pointed by:	kib
Reviewed by:	kib


git-svn-id: svn://svn.freebsd.org/base/stable/9@233803 ccf9f872-aa2e-dd11-9fc8-001c23d0bc1f
MFC r231975:

Make vnode_if.awk parse vnode operations with underscores, like VOP_FOO_BAR.

Reviewed by:	kib


git-svn-id: svn://svn.freebsd.org/base/stable/9@233804 ccf9f872-aa2e-dd11-9fc8-001c23d0bc1f
MFC r232181, r232455:

r232181:

Add sysctl to retrieve or set umask of another process.

Submitted by:	Dmitry Banschikov <me ubique spb ru>
Discussed with:	kib, rwatson
Reviewed by:	kib

r232455:

Make kern.proc.umask sysctl readonly.

Requested by:	src


git-svn-id: svn://svn.freebsd.org/base/stable/9@233806 ccf9f872-aa2e-dd11-9fc8-001c23d0bc1f
MFC r232182:

When displaying security credential information show also process umask.

Submitted by:   Dmitry Banschikov <me ubique spb ru>
Discussed with: rwatson


git-svn-id: svn://svn.freebsd.org/base/stable/9@233807 ccf9f872-aa2e-dd11-9fc8-001c23d0bc1f
MFC: 232612

Properly mask off bits that are not supported in the IAP counters.
This fixes a bug where users would see massively large counts, near
to 2**64 -1, due to the bits not being cleared.


git-svn-id: svn://svn.freebsd.org/base/stable/9@233810 ccf9f872-aa2e-dd11-9fc8-001c23d0bc1f
MFC: r233701

- Remove erroneous trailing semicolon. [1]
- Correctly determine the maximum payload size for setting the TX link
  frequent NACK latency and replay timer thresholds.

Submitted by:	stefanf [1]


git-svn-id: svn://svn.freebsd.org/base/stable/9@233811 ccf9f872-aa2e-dd11-9fc8-001c23d0bc1f
MFC 232700:
Add a new sched_clear_name() method to the scheduler interface to clear
the cached name used for KTR_SCHED traces when a thread's name changes.
This way KTR_SCHED traces (and thus schedgraph) will notice when a thread's
name changes, most commonly via execve().


git-svn-id: svn://svn.freebsd.org/base/stable/9@233814 ccf9f872-aa2e-dd11-9fc8-001c23d0bc1f
MFC 233236: Add sys/ofed to the 'make cscope' target.


git-svn-id: svn://svn.freebsd.org/base/stable/9@233816 ccf9f872-aa2e-dd11-9fc8-001c23d0bc1f
Merge remote-tracking branch 'upstream/svn_stable_9' into svn_stable_9