freebsd kernel with SKQ
Go to file
jhb 34dd7e04e0 MFC 283123:
Fix two bugs that could result in PMC sampling effectively stopping.
In both cases, the the effect of the bug was that a very small positive
number was written to the counter. This means that a large number of
events needed to occur before the next sampling interrupt would trigger.
Even with very frequently occurring events like clock cycles wrapping all
the way around could take a long time. Both bugs occurred when updating
the saved reload count for an outgoing thread on a context switch.

First, the counter-independent code compares the current reload count
against the count set when the thread switched in and generates a delta
to apply to the saved count. If this delta causes the reload counter
to go negative, it would add a full reload interval to wrap it around to
a positive value. The fix is to add the full reload interval if the
resulting counter is zero.

Second, occasionally the raw counter value read during a context switch
has actually wrapped, but an interrupt has not yet triggered. In this
case the existing logic would return a very large reload count (e.g.
2^48 - 2 if the counter had overflowed by a count of 2). This was seen
both for fixed-function and programmable counters on an E5-2643.
Workaround this case by returning a reload count of zero.

PR:		198149
Sponsored by:	Norse Corp, Inc.
2015-06-01 18:08:56 +00:00
bin MFC r282208: 2015-06-01 09:04:57 +00:00
cddl MFC r283147: 2015-05-31 23:00:35 +00:00
contrib MFC r283170: 2015-05-31 22:44:14 +00:00
crypto MFC r280999: 2015-04-23 15:19:56 +00:00
etc MFC r277627,r277650,r282059,r283056,r283840,r283845: 2015-05-31 22:39:48 +00:00
games MFC: r269089: 2015-04-16 00:29:49 +00:00
gnu MFC r282115, r282152, r282201 2015-05-16 15:44:13 +00:00
include MFC r275805: 2015-04-30 16:08:47 +00:00
kerberos5 MFC r264400,r265836: 2014-12-31 23:25:37 +00:00
lib MFC r283502: 2015-05-31 22:41:22 +00:00
libexec MFC r282245: 2015-05-06 09:38:44 +00:00
release MFC r283673, r283674: 2015-06-01 16:46:51 +00:00
rescue MFC sa(4) and mt(1) improvements. 2015-03-24 14:36:10 +00:00
sbin MFC r282965: 2015-05-31 22:58:41 +00:00
secure MFC: r280297 2015-03-20 21:54:45 +00:00
share MFC r281915: 2015-05-29 04:01:39 +00:00
sys MFC 283123: 2015-06-01 18:08:56 +00:00
tests MFC r277627,r277650,r282059,r283056,r283840,r283845: 2015-05-31 22:39:48 +00:00
tools MFC r283357: 2015-05-31 22:56:03 +00:00
usr.bin MFC r281202: 2015-05-29 13:30:37 +00:00
usr.sbin MFC 282643: 2015-06-01 18:05:30 +00:00
COPYRIGHT MFC r276462: 2014-12-31 10:03:19 +00:00
LOCKS Explicitly require Security Officer's approval for kernel PRNG bits. 2013-09-17 14:19:05 +00:00
MAINTAINERS MFH (r263160): remove lukemftpd 2014-08-23 15:07:09 +00:00
Makefile MFC r270155, r274490, r274593, r274607 2015-04-21 17:02:55 +00:00
Makefile.inc1 MFC r281618,r281823: 2015-05-13 10:53:16 +00:00
ObsoleteFiles.inc MFC r282574: 2015-05-21 16:44:31 +00:00
README
UPDATING MFC r282208: 2015-06-01 09:04:57 +00:00

This is the top level of the FreeBSD source directory.  This file
was last revised on:
$FreeBSD$

For copyright information, please see the file COPYRIGHT in this
directory (additional copyright information also exists for some
sources in this tree - please see the specific source directories for
more information).

The Makefile in this directory supports a number of targets for
building components (or all) of the FreeBSD source tree, the most
commonly used one being ``world'', which rebuilds and installs
everything in the FreeBSD system from the source tree except the
kernel, the kernel-modules and the contents of /etc.  The ``world''
target should only be used in cases where the source tree has not
changed from the currently running version.  See:
http://www.freebsd.org/doc/en_US.ISO8859-1/books/handbook/makeworld.html
for more information, including setting make(1) variables.

The ``buildkernel'' and ``installkernel'' targets build and install
the kernel and the modules (see below).  Please see the top of
the Makefile in this directory for more information on the
standard build targets and compile-time flags.

Building a kernel is a somewhat more involved process, documentation
for which can be found at:
   http://www.freebsd.org/doc/en_US.ISO8859-1/books/handbook/kernelconfig.html
And in the config(8) man page.
Note: If you want to build and install the kernel with the
``buildkernel'' and ``installkernel'' targets, you might need to build
world before.  More information is available in the handbook.

The sample kernel configuration files reside in the sys/<arch>/conf
sub-directory (assuming that you've installed the kernel sources), the
file named GENERIC being the one used to build your initial installation
kernel.  The file NOTES contains entries and documentation for all possible
devices, not just those commonly used.  It is the successor of the ancient
LINT file, but in contrast to LINT, it is not buildable as a kernel but a
pure reference and documentation file.


Source Roadmap:
---------------
bin		System/user commands.

cddl		Various commands and libraries under the Common Development
		and Distribution License.

contrib		Packages contributed by 3rd parties.

crypto		Cryptography stuff (see crypto/README).

etc		Template files for /etc.

games		Amusements.

gnu		Various commands and libraries under the GNU Public License.
		Please see gnu/COPYING* for more information.

include		System include files.

kerberos5	Kerberos5 (Heimdal) package.

lib		System libraries.

libexec		System daemons.

release		Release building Makefile & associated tools.

rescue		Build system for statically linked /rescue utilities.

sbin		System commands.

secure		Cryptographic libraries and commands.

share		Shared resources.

sys		Kernel sources.

tools		Utilities for regression testing and miscellaneous tasks.

usr.bin		User commands.

usr.sbin	System administration commands.


For information on synchronizing your source tree with one or more of
the FreeBSD Project's development branches, please see:

  http://www.freebsd.org/doc/en_US.ISO8859-1/books/handbook/synching.html