freebsd-skq/sys/amd64
Konstantin Belousov 37eed8419c Implement support for the process-context identifiers ('PCID') on
Intel CPUs.  The feature tags TLB entries with the Id of the address
space and allows to avoid TLB invalidation on the context switch, it
is available only in the long mode.  In the microbenchmarks, using the
PCID decreased latency of the context switches by ~30% on SandyBridge
class desktop CPUs, measured with the lat_ctx program from lmbench.

If available, use INVPCID instruction when a TLB entry in non-current
address space needs to be invalidated.  The instruction is typically
available on the Haswell.

If needed, the use of PCID can be turned off with the
vm.pmap.pcid_enabled loader tunable set to 0.  The state of the
feature is reported by the vm.pmap.pcid_enabled sysctl.  The sysctl
vm.pmap.pcid_save_cnt reports the number of context switches which
avoided invalidating the TLB; compare with the total number of context
switches, available as sysctl vm.stats.sys.v_swtch.

Sponsored by:	The FreeBSD Foundation
Reviewed by:	alc
Tested by:	pho, bf
2013-08-30 07:59:49 +00:00
..
acpica Consistently use round_page(x) rather than roundup(x, PAGE_SIZE). There is 2013-02-15 22:43:08 +00:00
amd64 Implement support for the process-context identifiers ('PCID') on 2013-08-30 07:59:49 +00:00
conf The PADLOCK_RNG and RDRAND_RNG kernel options are now devices. 2013-08-21 22:43:29 +00:00
ia32 Use slightly more idiomatic expression to get the address of array. 2013-05-27 18:39:39 +00:00
include Implement support for the process-context identifiers ('PCID') on 2013-08-30 07:59:49 +00:00
linux32 Retire write-only PCB_GS32BIT pcb flag on amd64. 2013-05-09 21:42:43 +00:00
pci Remove duplicate code. Reduce diff between amd64 and i386. 2012-12-01 00:56:19 +00:00
vmm Add support for emulating the byte move instruction "mov r/m8, r8". 2013-08-27 16:49:20 +00:00
Makefile