linux/Documentation
Kemi Wang 4518085e12 mm, sysctl: make NUMA stats configurable
This is the second step which introduces a tunable interface that allow
numa stats configurable for optimizing zone_statistics(), as suggested
by Dave Hansen and Ying Huang.

=========================================================================

When page allocation performance becomes a bottleneck and you can
tolerate some possible tool breakage and decreased numa counter
precision, you can do:

	echo 0 > /proc/sys/vm/numa_stat

In this case, numa counter update is ignored.  We can see about
*4.8%*(185->176) drop of cpu cycles per single page allocation and
reclaim on Jesper's page_bench01 (single thread) and *8.1%*(343->315)
drop of cpu cycles per single page allocation and reclaim on Jesper's
page_bench03 (88 threads) running on a 2-Socket Broadwell-based server
(88 threads, 126G memory).

Benchmark link provided by Jesper D Brouer (increase loop times to
10000000):

  https://github.com/netoptimizer/prototype-kernel/tree/master/kernel/mm/bench

=========================================================================

When page allocation performance is not a bottleneck and you want all
tooling to work, you can do:

	echo 1 > /proc/sys/vm/numa_stat

This is system default setting.

Many thanks to Michal Hocko, Dave Hansen, Ying Huang and Vlastimil Babka
for comments to help improve the original patch.

[keescook@chromium.org: make sure mutex is a global static]
  Link: http://lkml.kernel.org/r/20171107213809.GA4314@beast
Link: http://lkml.kernel.org/r/1508290927-8518-1-git-send-email-kemi.wang@intel.com
Signed-off-by: Kemi Wang <kemi.wang@intel.com>
Signed-off-by: Kees Cook <keescook@chromium.org>
Reported-by: Jesper Dangaard Brouer <brouer@redhat.com>
Suggested-by: Dave Hansen <dave.hansen@intel.com>
Suggested-by: Ying Huang <ying.huang@intel.com>
Acked-by: Vlastimil Babka <vbabka@suse.cz>
Acked-by: Michal Hocko <mhocko@suse.com>
Cc: "Luis R . Rodriguez" <mcgrof@kernel.org>
Cc: Kees Cook <keescook@chromium.org>
Cc: Jonathan Corbet <corbet@lwn.net>
Cc: Mel Gorman <mgorman@techsingularity.net>
Cc: Johannes Weiner <hannes@cmpxchg.org>
Cc: Christopher Lameter <cl@linux.com>
Cc: Sebastian Andrzej Siewior <bigeasy@linutronix.de>
Cc: Andrey Ryabinin <aryabinin@virtuozzo.com>
Cc: Tim Chen <tim.c.chen@intel.com>
Cc: Andi Kleen <andi.kleen@intel.com>
Cc: Aaron Lu <aaron.lu@intel.com>
Signed-off-by: Andrew Morton <akpm@linux-foundation.org>
Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
2017-11-15 18:21:07 -08:00
..
ABI This is the bulk of GPIO changes for the v4.15 kernel cycle: 2017-11-14 17:23:44 -08:00
accounting
acpi ACPI / LPIT: Add Low Power Idle Table (LPIT) support 2017-10-11 15:38:10 +02:00
admin-guide kmemcheck: rip it out 2017-11-15 18:21:05 -08:00
aoe
arm
arm64 arm64 updates for 4.15 2017-11-15 10:56:56 -08:00
auxdisplay
backlight
blackfin
block block: remove __bio_kmap_atomic 2017-11-10 19:53:25 -07:00
blockdev SCSI misc on 20170907 2017-09-07 21:11:05 -07:00
bus-devices
cdrom documentation: Update ide-cd documentation to reflect CONFIG_BLK_DEV_HD_IDE removal 2017-10-12 11:25:31 -06:00
cgroup-v1
cma
connector
console
core-api A relatively calm cycle for the docs tree again. 2017-11-13 08:25:06 -08:00
cpu-freq cpufreq: stats: Handle the case when trans_table goes beyond PAGE_SIZE 2017-11-08 23:41:25 +01:00
cpuidle
cris
crypto crypto: doc - adapt api sample to use async. op wait 2017-11-03 22:11:23 +08:00
dev-tools kmemcheck: rip it out 2017-11-15 18:21:05 -08:00
device-mapper dm raid: fix incorrect status output at the end of a "recover" process 2017-10-05 16:21:30 -04:00
devicetree arm64 updates for 4.15 2017-11-15 10:56:56 -08:00
doc-guide Documentation: fix ref to sphinx/kerneldoc.py 2017-10-19 12:57:10 -06:00
driver-api SCSI misc on 20171114 2017-11-14 16:23:44 -08:00
driver-model driver core: remove DRIVER_ATTR 2017-09-19 09:20:33 +02:00
early-userspace
EDID
extcon
fault-injection cpu/hotplug: Get rid of CPU hotplug notifier leftovers 2017-11-13 10:03:53 +01:00
fb documentation: fb: update list of available compiled-in fonts 2017-11-08 03:39:52 -07:00
features Documentation/features/KASAN: mark KASAN as supported only on 64-bit on x86 2017-10-03 14:40:22 -06:00
filesystems mm: consolidate page table accounting 2017-11-15 18:21:04 -08:00
firmware_class
fmc
fpga
frv
gpio gpio: Move irq_valid_mask into struct gpio_irq_chip 2017-11-08 14:10:18 +01:00
gpu Merge tag 'drm-intel-next-2017-08-18' of git://anongit.freedesktop.org/git/drm-intel into drm-next 2017-08-22 10:03:07 +10:00
hid Documentation: fix input related doc refs 2017-10-12 11:14:06 -06:00
hwmon pmbus: Add driver for Maxim MAX31785 Intelligent Fan Controller 2017-11-05 06:06:33 -08:00
i2c i2c: i801: Add support for Intel Cedar Fork 2017-10-05 14:44:56 +02:00
ia64
ide
iio
infiniband Documentation: Hardware tag matching 2017-08-29 08:30:21 -04:00
input Documentation: fix input related doc refs 2017-10-12 11:14:06 -06:00
ioctl
isdn
kbuild DeviceTree for 4.15: 2017-11-14 18:25:40 -08:00
kdump
kernel-hacking
laptops Documentation: fix admin-guide doc refs 2017-10-12 11:13:28 -06:00
leds Documentation: leds: Update 00-INDEX file 2017-10-23 20:17:03 +02:00
lightnvm
livepatch livepatch: add (un)patch callbacks 2017-10-19 10:08:56 +02:00
locking Documentation: fix locking rt-mutex doc refs 2017-10-19 12:56:44 -06:00
m68k
md md-cluster: update document for raid10 2017-11-01 21:32:25 -07:00
media Documentation: fix media related doc refs 2017-10-12 11:15:06 -06:00
memory-devices
metag
mic
mips
misc-devices
mmc
mn10300
mtd
namespaces
netlabel
networking A relatively calm cycle for the docs tree again. 2017-11-13 08:25:06 -08:00
nfc
nios2
nvdimm
nvmem NVMEM documentation fix: A minor typo 2017-08-24 13:31:58 -06:00
openrisc Documentation: openrisc: Updates to README 2017-10-30 21:37:53 +09:00
parisc
PCI
pcmcia
perf Documentation: perf: hisi: Documentation for HiSilicon SoC PMU driver 2017-10-19 17:06:34 +01:00
phy
platform
power Power management updates for v4.15-rc1 2017-11-13 19:43:50 -08:00
powerpc
pps drivers/pps: aesthetic tweaks to PPS-related content 2017-09-08 18:26:51 -07:00
process A relatively calm cycle for the docs tree again. 2017-11-13 08:25:06 -08:00
pti
ptp
rapidio
RCU Merge branch 'core-rcu-for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/tip/tip 2017-11-13 12:18:10 -08:00
s390
scheduler
scsi scsi: smartpqi: correct spelling error in documentation 2017-10-23 04:15:17 -04:00
security Documentation: fix security related doc refs 2017-10-12 11:14:40 -06:00
serial
sh
sound sound updates for 4.15-rc1 2017-11-14 18:01:46 -08:00
sparc
sphinx Documentation/sphinx: fix kernel-doc decode for non-utf-8 locale 2017-08-31 13:36:28 -06:00
sphinx-static
spi
sysctl mm, sysctl: make NUMA stats configurable 2017-11-15 18:21:07 -08:00
target
thermal
timers docs: highres: fix broken urls 2017-09-26 14:58:23 -06:00
trace ftrace/docs: Add documentation on how to use ftrace from within the kernel 2017-11-05 09:55:29 -07:00
translations locking/barriers: Kill lockless_dereference() 2017-10-24 13:17:33 +02:00
usb Documentation: fix usb related doc refs 2017-10-12 11:15:48 -06:00
userspace-api seccomp: Implement SECCOMP_RET_KILL_PROCESS action 2017-08-14 13:46:50 -07:00
virtual KVM/ARM Changes for v4.14 2017-09-07 18:22:04 +02:00
vm mm/mmu_notifier: avoid double notification when it is useless 2017-11-15 18:21:03 -08:00
w1
watchdog Documentation: fix selftests related file refs 2017-10-19 12:58:21 -06:00
wimax
x86 Merge branch 'x86-cache-for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/tip/tip 2017-11-13 19:05:19 -08:00
xtensa
.gitignore
00-INDEX
atomic_bitops.txt Documentation/locking/atomic: Add documents for new atomic_t APIs 2017-08-10 12:29:00 +02:00
atomic_t.txt Documentation/locking/atomic: Finish the document... 2017-08-25 11:06:33 +02:00
bcache.txt
bt8xxgpio.txt
btmrvl.txt
bus-virt-phys-mapping.txt
cachetlb.txt
cgroup-v2.txt
Changes
circular-buffers.txt
clk.txt
CodingStyle
conf.py docs-rst: don't require adjustbox anymore 2017-09-08 10:02:55 -06:00
cpu-load.txt
cputopology.txt
crc32.txt
dcdbas.txt
debugging-modules.txt
debugging-via-ohci1394.txt
dell_rbu.txt
digsig.txt
DMA-API-HOWTO.txt
DMA-API.txt dma-coherent: remove the DMA_MEMORY_MAP and DMA_MEMORY_IO flags 2017-09-01 11:59:17 +02:00
DMA-attributes.txt
DMA-ISA-LPC.txt
docutils.conf
dontdiff Remove gperf usage from toolchain 2017-08-19 11:02:53 -07:00
efi-stub.txt
eisa.txt
errseq.rst
flexible-arrays.txt
futex-requeue-pi.txt
gcc-plugins.txt
highuid.txt
hw_random.txt
hwspinlock.txt
index.rst
intel_txt.txt
Intel-IOMMU.txt
io_ordering.txt
io-mapping.txt
iostats.txt
IPMI.txt
IRQ-affinity.txt
IRQ-domain.txt
IRQ.txt
irqflags-tracing.txt
isa.txt
isapnp.txt
kernel-doc-nano-HOWTO.txt
kernel-per-CPU-kthreads.txt
kobject.txt
kprobes.txt kprobes/docs: Remove jprobes related documents 2017-10-20 11:02:55 +02:00
kref.txt
ldm.txt
lockup-watchdogs.txt
logo.gif
logo.txt
lsm.txt
lzo.txt
mailbox.txt
Makefile Documentation: add script and build target to check for broken file references 2017-10-12 11:07:42 -06:00
memory-barriers.txt Merge branch 'locking-core-for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/tip/tip 2017-11-13 12:38:26 -08:00
memory-hotplug.txt
men-chameleon-bus.txt
nommu-mmap.txt
ntb.txt
numastat.txt
padata.txt
parport-lowlevel.txt
percpu-rw-semaphore.txt
phy.txt
pi-futex.txt Documentation: fix locking rt-mutex doc refs 2017-10-19 12:56:44 -06:00
pnp.txt
preempt-locking.txt
printk-formats.txt printk-formats.txt: Add examples for %pF and %pS usage 2017-08-24 18:49:52 +02:00
pwm.txt
rbtree.txt rbtree: cache leftmost node internally 2017-09-08 18:26:48 -07:00
remoteproc.txt
rfkill.txt
robust-futex-ABI.txt
robust-futexes.txt
rpmsg.txt
rtc.txt
SAK.txt
sgi-ioc4.txt
siphash.txt
SM501.txt
smsc_ece1099.txt
static-keys.txt jump_label: Provide hotplug context variants 2017-08-10 12:28:59 +02:00
SubmittingPatches
svga.txt
switchtec.txt
sync_file.txt
tee.txt
this_cpu_ops.txt
unaligned-memory-access.txt
vfio-mediated-device.txt
vfio.txt
video-output.txt
xillybus.txt
xz.txt
zorro.txt