linux/drivers
Mel Gorman 599d0c954f mm, vmscan: move LRU lists to node
This moves the LRU lists from the zone to the node and related data such
as counters, tracing, congestion tracking and writeback tracking.

Unfortunately, due to reclaim and compaction retry logic, it is
necessary to account for the number of LRU pages on both zone and node
logic.  Most reclaim logic is based on the node counters but the retry
logic uses the zone counters which do not distinguish inactive and
active sizes.  It would be possible to leave the LRU counters on a
per-zone basis but it's a heavier calculation across multiple cache
lines that is much more frequent than the retry checks.

Other than the LRU counters, this is mostly a mechanical patch but note
that it introduces a number of anomalies.  For example, the scans are
per-zone but using per-node counters.  We also mark a node as congested
when a zone is congested.  This causes weird problems that are fixed
later but is easier to review.

In the event that there is excessive overhead on 32-bit systems due to
the nodes being on LRU then there are two potential solutions

1. Long-term isolation of highmem pages when reclaim is lowmem

   When pages are skipped, they are immediately added back onto the LRU
   list. If lowmem reclaim persisted for long periods of time, the same
   highmem pages get continually scanned. The idea would be that lowmem
   keeps those pages on a separate list until a reclaim for highmem pages
   arrives that splices the highmem pages back onto the LRU. It potentially
   could be implemented similar to the UNEVICTABLE list.

   That would reduce the skip rate with the potential corner case is that
   highmem pages have to be scanned and reclaimed to free lowmem slab pages.

2. Linear scan lowmem pages if the initial LRU shrink fails

   This will break LRU ordering but may be preferable and faster during
   memory pressure than skipping LRU pages.

Link: http://lkml.kernel.org/r/1467970510-21195-4-git-send-email-mgorman@techsingularity.net
Signed-off-by: Mel Gorman <mgorman@techsingularity.net>
Acked-by: Johannes Weiner <hannes@cmpxchg.org>
Acked-by: Vlastimil Babka <vbabka@suse.cz>
Cc: Hillf Danton <hillf.zj@alibaba-inc.com>
Cc: Joonsoo Kim <iamjoonsoo.kim@lge.com>
Cc: Michal Hocko <mhocko@kernel.org>
Cc: Minchan Kim <minchan@kernel.org>
Cc: Rik van Riel <riel@surriel.com>
Signed-off-by: Andrew Morton <akpm@linux-foundation.org>
Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
2016-07-28 16:07:41 -07:00
..
accessibility
acpi xen: features and fixes for 4.8-rc0 2016-07-27 11:35:37 -07:00
amba
android
ata New LED class driver: 2016-07-27 14:03:52 -07:00
atm drivers: atm: nicstar: Use the correct function to free some resources 2016-07-19 11:30:26 -07:00
auxdisplay
base mm, vmscan: move LRU lists to node 2016-07-28 16:07:41 -07:00
bcma wireless-drivers-next patches for 4.8 2016-07-25 11:09:19 -07:00
block xen: features and fixes for 4.8-rc0 2016-07-27 11:35:37 -07:00
bluetooth Bluetooth: btmrvl: reset is_suspending flag in failure path 2016-07-18 10:13:02 +02:00
bus
cdrom cdrom: support read sub-channel command in LBA format 2016-07-12 08:24:50 -07:00
char A number of improvements for the /dev/random driver; the most 2016-07-27 15:11:55 -07:00
clk clk: at91: fix clk_programmable_set_parent() 2016-07-18 17:45:41 -07:00
clocksource clocksource/drivers/time-armada-370-xp: Fix return value check 2016-07-12 17:33:22 +02:00
connector connector: make cn_proc explicitly non-modular 2016-07-05 11:40:47 -07:00
cpufreq Power management material for v4.8-rc1 2016-07-26 17:29:07 -07:00
cpuidle cpuidle: introduce CPU_PM_CPU_IDLE_ENTER macro for ARM{32, 64} 2016-07-21 23:29:38 +02:00
crypto Merge branch 'linus' of git://git.kernel.org/pub/scm/linux/kernel/git/herbert/crypto-2.6 2016-07-26 13:40:17 -07:00
dax
dca
devfreq PM / devfreq: exynos-bus: add missing of_node_put after calling of_parse_phandle 2016-07-06 13:11:24 +09:00
dio
dma dmaengine: hsu: Export hsu_dma_get_status() 2016-06-25 14:30:42 -07:00
dma-buf
edac * Altera Arria10 ethernet FIFO buffer support (Thor Thayer) 2016-07-27 13:40:47 -07:00
eisa
extcon extcon: adc-jack: add suspend/resume support 2016-07-02 14:31:34 +09:00
firewire
firmware xen: features and fixes for 4.8-rc0 2016-07-27 11:35:37 -07:00
fmc
fpga
gpio This is the bulk of GPIO changes for the v4.8 kernel cycle. 2016-07-26 19:16:01 -07:00
gpu Add braces to avoid "ambiguous ‘else’" compiler warnings 2016-07-27 20:03:31 -07:00
hid HID: multitouch: enable palm rejection for Windows Precision Touchpad 2016-06-28 13:24:14 +02:00
hsi HSI: omap_ssi: drop pm_runtime_irq_safe 2016-06-28 00:40:08 +02:00
hv random: add interrupt callback to VMBus IRQ handler 2016-06-13 11:54:33 -04:00
hwmon Merge branch 'i2c/for-4.8' of git://git.kernel.org/pub/scm/linux/kernel/git/wsa/linux 2016-07-27 14:19:25 -07:00
hwspinlock
hwtracing intel_th: Fixes -stable 2016-07-15 14:19:11 +09:00
i2c Merge branch 'i2c/for-4.8' of git://git.kernel.org/pub/scm/linux/kernel/git/wsa/linux 2016-07-27 14:19:25 -07:00
ide New LED class driver: 2016-07-27 14:03:52 -07:00
idle intel_idle: correct BXT support 2016-07-09 01:05:30 +02:00
iio Third set of IIO new device support, features and cleanups for the 4.8 cycle. 2016-07-14 12:05:29 +09:00
infiniband Merge git://git.kernel.org/pub/scm/linux/kernel/git/davem/net 2016-07-24 00:53:32 -04:00
input Merge branch 'for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/dtor/input 2016-07-27 14:30:41 -07:00
iommu Add braces to avoid "ambiguous ‘else’" compiler warnings 2016-07-27 20:03:31 -07:00
ipack
irqchip Merge branch 'irq-core-for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/tip/tip 2016-07-25 21:35:03 -07:00
isdn isdn: eicon: fix old-style declarations 2016-06-16 22:06:30 -07:00
leds leds: is31fl32xx: define complete i2c_device_id table 2016-07-19 13:58:42 +02:00
lguest
lightnvm block: get rid of bio_rw and READA 2016-07-20 17:37:01 -06:00
macintosh powerpc: use the new LED disk activity trigger 2016-06-27 08:58:40 +02:00
mailbox
mcb mcb: Acquire reference to carrier module in core 2016-06-13 18:49:30 -07:00
md - initially based on Jens' 'for-4.8/core' (given all the flag churn) and 2016-07-26 17:12:11 -07:00
media media updates for v4.8-rc1 2016-07-27 14:58:31 -07:00
memory memory: omap-gpmc: Fix omap gpmc EXTRADELAY timing 2016-06-16 11:43:48 +03:00
memstick memstick: don't allow REQ_TYPE_BLOCK_PC requests 2016-07-20 17:38:27 -06:00
message
mfd Merge remote-tracking branches 'regulator/topic/qcom-spmi', 'regulator/topic/rn5t618', 'regulator/topic/tps65218' and 'regulator/topic/twl' into regulator-next 2016-07-20 18:02:08 +01:00
misc Merge branch 'i2c/for-4.8' of git://git.kernel.org/pub/scm/linux/kernel/git/wsa/linux 2016-07-27 14:19:25 -07:00
mmc Merge branch 'for-4.8/drivers' of git://git.kernel.dk/linux-block 2016-07-26 15:37:51 -07:00
mtd Merge git://git.kernel.org/pub/scm/linux/kernel/git/davem/net-next 2016-07-27 12:03:20 -07:00
net Merge git://git.kernel.org/pub/scm/linux/kernel/git/davem/net-next 2016-07-27 12:03:20 -07:00
nfc NFC 4.8 pull request 2016-07-20 23:39:36 -07:00
ntb
nubus
nvdimm Merge branch 'for-4.8/drivers' of git://git.kernel.dk/linux-block 2016-07-26 15:37:51 -07:00
nvme Merge branch 'for-4.8/drivers' of git://git.kernel.dk/linux-block 2016-07-26 15:37:51 -07:00
nvmem nvmem: imx-ocotp: Fix assignment warning. 2016-06-25 07:42:55 -07:00
of Merge git://git.kernel.org/pub/scm/linux/kernel/git/davem/net-next 2016-07-27 12:03:20 -07:00
oprofile
parisc
parport
pci Power management material for v4.8-rc1 2016-07-26 17:29:07 -07:00
pcmcia
perf drivers/perf: arm-pmu: Handle per-interrupt affinity mask 2016-07-08 17:39:55 +01:00
phy Merge git://git.kernel.org/pub/scm/linux/kernel/git/davem/net-next 2016-07-27 12:03:20 -07:00
pinctrl This is the bulk of GPIO changes for the v4.8 kernel cycle. 2016-07-26 19:16:01 -07:00
platform platform-drivers-x86 for 4.8-1 2016-07-26 17:23:08 -07:00
pnp PNP material for v4.8-rc1 2016-07-26 18:27:20 -07:00
power power supply and reset changes for the v4.8 series 2016-07-26 19:49:09 -07:00
powercap powercap / RAPL: Add support for Ivy Bridge server 2016-06-25 03:00:58 +02:00
pps pps: do not crash when failed to register 2016-07-23 10:25:54 +09:00
ps3
ptp
pwm pwm: atmel-hlcdc: Fix default PWM polarity 2016-06-14 10:51:45 +02:00
rapidio
ras
regulator Merge remote-tracking branches 'regulator/topic/qcom-spmi', 'regulator/topic/rn5t618', 'regulator/topic/tps65218' and 'regulator/topic/twl' into regulator-next 2016-07-20 18:02:08 +01:00
remoteproc
reset
rpmsg
rtc
s390 Merge git://git.kernel.org/pub/scm/linux/kernel/git/davem/net-next 2016-07-27 12:03:20 -07:00
sbus
scsi SCSI misc on 20160727 2016-07-27 14:48:37 -07:00
sfi
sh
sn
soc
spi spi: Updates for v4.8 2016-07-27 14:11:43 -07:00
spmi
ssb
staging mm, vmscan: move LRU lists to node 2016-07-28 16:07:41 -07:00
target Merge git://git.kernel.org/pub/scm/linux/kernel/git/davem/net-next 2016-07-27 12:03:20 -07:00
tc
thermal Merge branch 'x86/cpu' into x86/platform, to avoid conflict 2016-06-14 12:25:07 +02:00
thunderbolt
tty mm: oom: add memcg to oom_control 2016-07-26 16:19:19 -07:00
uio
usb media updates for v4.8-rc1 2016-07-26 18:59:59 -07:00
uwb
vfio
vhost tun: switch to use skb array for tx 2016-07-01 05:32:17 -04:00
video fbmon: remove unused function argument 2016-07-26 16:19:19 -07:00
virt
virtio mm: fix build warnings in <linux/compaction.h> 2016-07-26 16:19:19 -07:00
vlynq
vme
w1
watchdog watchdog: ebc-c384_wdt: Allow build for X86_64 2016-06-17 20:21:12 -07:00
xen xen: features and fixes for 4.8-rc0 2016-07-27 11:35:37 -07:00
zorro
Kconfig
Makefile HSI changes for the v4.8 series 2016-07-27 15:18:53 -07:00