MFC r242139:

Add CPU percentage limit enforcement to RCTL.  The resouce name is "pcpu".
It was implemented by Rudolf Tomori during Google Summer of Code 2012.

MFC r242957:

Don't divide by zero.

MFC r243070:

Fix kassert that's not really valid for %CPU accounting.  The problem
here is race between decaying the resource usage in containers, and updating
per-process usage; basically, the former may cause per-container usage
to get smaller than per-process usage.

MFC r243088:

Improve KASSERT messages in racct, to make it clear which resource
caused the problem.

MFC r248298:

Accessing td_state requires thread lock to be held.

MFC r248300:

When throttling a process to enforce RACCT limits, do not use neither
PBDRY (which simply doesn't make any sense) nor PCATCH (which could
be used by a malicious process to work around the PCPU limit).
MFC r242140:

Add pcpu to the the rctl(8) manual page.
MFC r243849 by bdrewery@:

- Move EXAMPLES descriptions to before the actual command
- Add mdoc macros for EXAMPLES
MFC r249375 by joel@:

Minor spelling and grammar fixes.
MFC r243856 by joel@:

Remove superfluous paragraph macro.
MFC r225846, r225853, r225854, r226121, r226320, r226351, r226942, r228991, r229164, r230876, r231274, r231516, r232105, r232353, r234221, r234320, r234446, r234600, r236392, r236733, r238058, r238976, r239498, r240362, r240548, r242549, r242849, r242900, r245447, r247752, r249113

Merge all outstanding calendars commits.

Discussed with:	gjb, des
MFC r248824 & r248826

Fix compile with CISS_DEBUG defined

Fix DDB hook to actually work again
MFC r249359:
	fuser(1) requires a filename.

Approved by:	cperciva (mentor, implicit)
MFC 234223:

Update to version 2.3.1.0

MFC 234284, 234425, 234481:

Unbreak the build caused by 234233

PR:	kern/157770
Obtained from:	Daniel Braniss <danny@cs.huji.ac.il>
MFC: r246166

Update hwpmc to support the Xeon class of Ivybridge processors.
case 0x3E:      /* Per Intel document 325462-045US 01/2013. */

Add manpage to document all the goodness that is available in this
processor model.

No support for uncore events at this time.

Approved by:	sbruno (mentor)
MFC r249397:

Fix a few typos.

Reviewed by:	gjb
MFC: r248151, r248168

Ports are no more exported via cvsup, remove cvsup examples and documentation refering to
ports
MFC r249009:

Make it possible to build CTL as a module.

MFC r249022 by glebius@:

- Remove extra $FreeBSD$
- Touch options headers to make module buildable.
MFC r249012:

Remove unused code.
MFC r249019:

Fix comment formatting.
MFC r249026:

Don't directly dereference userland pointer; instead use kernel pointer
copied in from userspace.  This fixes instant panic when creating CTL LUN
on sparc64.  Not a security problem, since the API is root-only.
Pull in r178636 from upstream llvm trunk:

  Second pass at addressing PR15351 by explicitly checking for AVX
  support when getting the host processor information.  It emits a
  .byte sequence on GNUC compilers to work around lack of xgetbv
  support with older assemblers, and resolves a comment typo found in
  the previous patch.

This should fix crashes due to emitting of AVX instructions on certain
processors, which do not support then, when using -march=native.

This is a direct commit to stable/9, since head has a complete import of
llvm/clang trunk, and there is no single commit to merge.

Reported by:	Kubilay Kocak <koobs.freebsd@gmail.com>
MFC r249011:

Fix dates in manual pages modified in 249009.
Fix mergeinfo after r249503

Submitted by:	gavin
MFC r249240:

Use pget(9) to reduce code duplication.