linux/Documentation
Feng Tang 911ac7979d Documentation: Add document for false sharing
When doing performance tuning or debugging performance regressions,
more and more cases are found to be related to false sharing [1][2][3],
and the situation can be worse for newer platforms with hundreds of
CPUs. There are already many commits in current kernel specially
for mitigating the performance degradation due to false sharing.

False sharing could harm the performance silently without being
noticed, due to reasons like:
* data members of a big data structure randomly sitting together
  in one cache line
* global data of small size are linked compactly together

So it's better to make a simple document about the normal pattern
of false sharing, basic ways to mitigate it and call out to
developers to pay attention during code-writing.

[ Many thanks to Dave Hansen, Ying Huang, Tim Chen, Julie Du and
  Yu Chen for their contributions ]

[1]. https://lore.kernel.org/lkml/20220619150456.GB34471@xsang-OptiPlex-9020/
[2]. https://lore.kernel.org/lkml/20201102091543.GM31092@shao2-debian/
[3]. https://lore.kernel.org/lkml/20230307125538.818862491@linutronix.de/

Signed-off-by: Feng Tang <feng.tang@intel.com>
Reviewed-by: Randy Dunlap <rdunlap@infradead.org>
Reviewed-by: Shakeel Butt <shakeelb@google.com>
Link: https://lore.kernel.org/r/20230407041235.37886-1-feng.tang@intel.com
Signed-off-by: Jonathan Corbet <corbet@lwn.net>
2023-04-10 16:46:11 -06:00
..
ABI power supply changes for the v6.3 series (part 2) 2023-03-03 16:33:28 -08:00
accel Documentation: accel: escape wildcard in special file path 2023-01-26 11:52:14 +02:00
accounting
admin-guide docs: move m68k architecture documentation under Documentation/arch/ 2023-04-10 16:46:11 -06:00
arch docs: move m68k architecture documentation under Documentation/arch/ 2023-04-10 16:46:11 -06:00
arm
arm64 arm64 updates for 6.3: 2023-02-21 15:27:48 -08:00
block block: stub out and deprecated the capability attribute on the gendisk 2023-02-06 08:44:55 -07:00
bpf Documentation: bpf: Add missing line break separator in node_data struct code block 2023-02-15 08:43:51 -08:00
cdrom
core-api dma-api-howto: typo fix 2023-04-10 16:46:11 -06:00
cpu-freq
crypto
dev-tools - Daniel Verkamp has contributed a memfd series ("mm/memfd: add 2023-02-23 17:09:35 -08:00
devicetree sound fixes for 6.3-rc1 2023-03-04 10:53:59 -08:00
doc-guide
driver-api docs: move x86 documentation into Documentation/arch/ 2023-03-30 12:58:51 -06:00
fault-injection docs: fault-injection: add requirements of error injectable functions 2023-02-02 22:50:00 -08:00
fb
features m68k: Add kernel seccomp support 2023-01-30 16:40:15 +01:00
filesystems docs: filesystems: vfs: actualize struct super_operations description 2023-03-14 12:12:12 -06:00
firmware_class
firmware-guide Documentation: firmware-guide: gpio-properties: Clarify Explicit and Implicit 2023-02-14 15:50:09 +01:00
fpga
gpu drm next for 6.3-rc1 2023-02-22 18:28:03 -08:00
hid It has been a moderately calm cycle for documentation; the significant 2023-02-22 12:00:20 -08:00
hwmon It has been a moderately calm cycle for documentation; the significant 2023-02-22 12:00:20 -08:00
i2c Documentation: i2c: correct spelling 2023-02-15 20:59:44 +01:00
iio
images
infiniband
input
isdn Documentation: isdn: correct spelling 2023-02-10 16:28:13 -08:00
kbuild Kbuild updates for v6.3 2023-02-26 11:53:25 -08:00
kernel-hacking Documentation: Add document for false sharing 2023-04-10 16:46:11 -06:00
leds - Remove Drivers 2023-02-23 15:09:31 -08:00
litmus-tests
livepatch Documentation: livepatch: module-elf-format: Remove local klp_modinfo definition 2023-02-06 08:45:55 -08:00
locking docs: locking: refer to the actual existing config names 2023-02-23 12:26:00 -07:00
loongarch
maintainer docs: rebasing-and-merging: Drop wrong statement about git 2023-03-07 10:26:22 -07:00
mhi
mips
misc-devices
mm docs/mm: Physical Memory: add example of interleaving nodes 2023-03-14 12:56:30 -06:00
netlabel
netlink netdev-genl: fix repeated typo oflloading -> offloading 2023-02-24 11:01:16 +00:00
networking Including fixes from wireless and netfilter. 2023-02-27 14:05:08 -08:00
nvdimm
nvme
PCI
pcmcia
peci
power Power management updates for 6.3-rc1 2023-02-21 12:13:58 -08:00
powerpc
process coding-style: fix title of Greg K-H's talk 2023-03-23 12:04:08 -06:00
RCU
riscv Documentation: riscv: fix insufficient list item indent 2023-02-14 16:00:02 -08:00
rust Documentation: rust: Fix arch support table 2023-02-13 10:14:32 +01:00
s390 VFIO updates for v6.3-rc1 2023-02-25 11:52:57 -08:00
scheduler sched/doc: supplement CPU capacity with RISC-V 2023-03-07 10:19:04 -07:00
scsi SCSI misc on 20230222 2023-02-22 13:41:41 -08:00
security
sound It has been a moderately calm cycle for documentation; the significant 2023-02-22 12:00:20 -08:00
sphinx docs: Use HTML comments for the kernel-toc SPDX line 2023-02-16 16:06:44 -07:00
sphinx-static docs: Add more information to the HTML sidebar 2023-02-08 13:28:27 -07:00
spi spi: correct spelling 2023-01-27 12:14:17 +00:00
staging
target scsi: target: Documentation: Correct spelling 2023-02-08 18:49:48 -05:00
timers
tools Documentation/rtla: Add hwnoise man page 2023-02-13 23:56:46 -05:00
trace Char/Misc and other driver subsystem changes for 6.3-rc1 2023-02-24 12:47:33 -08:00
translations docs: move parisc documentation under Documentation/arch/ 2023-04-10 16:45:52 -06:00
usb usb: gadget: configfs: Support arbitrary string descriptors 2023-02-07 08:46:36 +01:00
userspace-api media updates for v6.3-rc1 2023-02-26 11:47:26 -08:00
virt docs: move x86 documentation into Documentation/arch/ 2023-03-30 12:58:51 -06:00
w1
watchdog Documentation/watchdog/hpwdt: Fix Format 2023-02-16 17:31:29 -07:00
.gitignore
atomic_bitops.txt
atomic_t.txt
Changes
CodingStyle
conf.py It has been a moderately calm cycle for documentation; the significant 2023-02-22 12:00:20 -08:00
docutils.conf
dontdiff
index.rst docs: create a top-level arch/ directory 2023-03-23 13:27:27 -06:00
Kconfig
Makefile
memory-barriers.txt
SubmittingPatches
subsystem-apis.rst