freebsd-dev/sys
Andriy Gapon 4725e6bff3 new x86 smp topology detection code
Previously, the code determined a topology of processing units
(hardware threads, cores, packages) and then deduced a cache topology
using certain assumptions.  The new code builds a topology that
includes both processing units and caches using the information
provided by the hardware.

At the moment, the discovered full topology is used only to creeate
a scheduling topology for SCHED_ULE.
There is no KPI for other kernel uses.

Summary:
- based on APIC ID derivation rules for Intel and AMD CPUs
- can handle non-uniform topologies
- requires homogeneous APIC ID assignment (same bit widths for ID
  components)
- topology for dual-node AMD CPUs may not be optimal
- topology for latest AMD CPU models may not be optimal as the code is
  several years old
- supports only thread/package/core/cache nodes

Todo:
  - AMD dual-node processors
  - latest AMD processors
  - NUMA nodes
  - checking for homogeneity of the APIC ID assignment across packages
  - more flexible cache placement within topology
  - expose topology to userland, e.g., via sysctl nodes

Long term todo:
  - KPI for CPU sharing and affinity with respect to various resources
    (e.g., two logical processors may share the same FPU, etc)

Reviewed by:	mav
Tested by:	mav
MFC after:	1 month
Differential Revision:	https://reviews.freebsd.org/D2728
2016-04-04 16:09:29 +00:00
..
amd64 Move i386/i386/autoconf.c to sys/x86/x86 and use it on both amd64 and i386. 2016-04-03 23:03:54 +00:00
arm Define local-intc for BCM2836 platform (RPI2) and make BCM2835 intc 2016-04-04 09:41:22 +00:00
arm64 Reduce the diff for when we switch to intrng. The IPI interrupts will be 2016-04-04 15:13:17 +00:00
boot Define local-intc for BCM2836 platform (RPI2) and make BCM2835 intc 2016-04-04 09:41:22 +00:00
bsm Merge from contrib/openbsm to bring the kernel audit bits up to date with OpenBSM 1.2 alpha 4: 2015-12-20 23:22:04 +00:00
cam chdone(): Prevent returning uninitialized scalar value. 2016-04-03 16:38:15 +00:00
cddl remove emulation of VFS_HOLD and VFS_RELE from opensolaris compat 2016-04-02 16:25:46 +00:00
compat Fix indentation oops. 2016-04-03 14:40:54 +00:00
conf arm64: bzero optimization 2016-04-04 07:06:20 +00:00
contrib Sync in the latest CloudABI system call definitions. 2016-03-31 18:50:06 +00:00
crypto Break up opencrypto/xform.c so it can be reused piecemeal 2015-12-30 22:43:07 +00:00
ddb Add td_swinvoltick to track last involuntary context switch 2016-03-25 19:35:29 +00:00
dev Fix a format string when uint64_t is not unsigned long long by casting 2016-04-04 10:03:06 +00:00
fs Update comment: Linux does set a randomized generation number of an inode 2016-04-01 03:21:01 +00:00
gdb
geom g_sched_destroy(): prevent return of uninitialized scalar variable. 2016-04-03 16:25:51 +00:00
gnu Update our copy of the Linux dts files to be in sync with Linux 4.5-rc1. We 2016-02-09 16:42:32 +00:00
i386 Move i386/i386/autoconf.c to sys/x86/x86 and use it on both amd64 and i386. 2016-04-03 23:03:54 +00:00
isa Fix the resource_list_print_type() calls to use uintmax_t. 2016-03-22 22:25:08 +00:00
kern new x86 smp topology detection code 2016-04-04 16:09:29 +00:00
kgssapi kcrypto_aes: Use separate sessions for AES and SHA1 2016-02-02 00:14:51 +00:00
libkern
mips Fix the resource_list_print_type() calls to use uintmax_t. 2016-03-22 22:25:08 +00:00
modules Add support for the Nuvoton NCT5104D. 2016-03-31 04:57:38 +00:00
net Catch up with some more fields. I needed the bpf one lately. 2016-03-31 18:53:13 +00:00
net80211 [net80211] migrate the time_* macros to ieee80211_* namespace. 2016-03-30 00:44:10 +00:00
netgraph Migrate many bus_alloc_resource() calls to bus_alloc_resource_anywhere(). 2016-02-27 03:38:01 +00:00
netinet Set the chunk id for ERROR chunks. 2016-04-01 20:38:15 +00:00
netinet6 Unbreak the RSS/PCBGROUp build. 2016-03-31 00:53:23 +00:00
netipsec Fix handling of net.inet.ipsec.dfbit=2 variable. 2016-03-18 09:03:00 +00:00
netnatm
netpfil pf: Improve forwarding detection 2016-03-16 06:42:15 +00:00
netsmb The problem report was for a crash that happened when smbfs was 2015-11-18 23:04:01 +00:00
nfs Do not try to install a default route for each interface found, because 2016-03-27 23:16:37 +00:00
nfsclient
nfsserver
nlm
ofed tcp/lro: Use tcp_lro_flush_all in device drivers to avoid code duplication 2016-04-01 06:28:33 +00:00
opencrypto Break up opencrypto/xform.c so it can be reused piecemeal 2015-12-30 22:43:07 +00:00
pc98 Fix the resource_list_print_type() calls to use uintmax_t. 2016-03-22 22:25:08 +00:00
powerpc Reduce OFW PCI code duplication - involves ARM, PPC and SPARC64 2016-03-29 15:19:56 +00:00
riscv Add support for ddb(4). 2016-03-10 15:51:43 +00:00
rpc Remove some NULL checks for M_WAITOK allocations. 2016-03-29 13:56:59 +00:00
security Busy the mount point which is the owner of the audit vnode, around 2016-01-16 10:06:33 +00:00
sparc64 Fix the resource_list_print_type() calls to use uintmax_t. 2016-03-22 22:25:08 +00:00
sys new x86 smp topology detection code 2016-04-04 16:09:29 +00:00
teken
tests Style 9 changes. 2015-11-12 10:31:14 +00:00
tools Fix MFS builds when both MD_ROOT_SIZE and MFS_IMAGE are specified 2016-02-02 07:02:51 +00:00
ufs Remove some NULL checks for M_WAITOK allocations. 2016-03-29 13:56:59 +00:00
vm Remove UMA_ZONE_REFCNT feature, now unused. 2016-03-01 00:33:32 +00:00
x86 new x86 smp topology detection code 2016-04-04 16:09:29 +00:00
xdr
xen xenbus: add a comment with the names of the generated accessors 2016-01-15 14:34:31 +00:00
Makefile Add riscv to the list of architectures for cscope. 2016-02-29 16:39:27 +00:00