aboutsummaryrefslogtreecommitdiff
AgeCommit message (Collapse)AuthorFilesLines
2017-06-16Merge tag 'meson-clk-headers-for-4.13' of ↵Kevin Hilman2-11/+19
git://github.com/BayLibre/clk-meson into v4.13/dt64 First round of amlogic clock headers update for v4.13 Only gx related update in this round. Expose i2s out, spdif out, EE uart gates and SPICC gate. Un-expose CPU clk which was wrongly copy/pasted from meson8b * tag 'meson-clk-headers-for-4.13' of git://github.com/BayLibre/clk-meson: clk: meson-gxbb: un-export the CPU clock clk: meson-gxbb: expose UART clocks clk: meson-gxbb: expose SPICC gate clk: meson-gxbb: expose spdif master clock clk: meson-gxbb: expose i2s master clock clk: meson-gxbb: expose spdif clock gates
2017-06-09ARM64: dts: meson-gxl-s905x-p212: Add HDMI and CVBS nodesNeil Armstrong1-0/+23
Add HDMI and CVBS nodes for the Amlogic P212 reference board. Signed-off-by: Neil Armstrong <[email protected]> Signed-off-by: Kevin Hilman <[email protected]>
2017-06-09ARM64: dts: meson-gxl-s905x-khadas-vim: Add HDMI nodesNeil Armstrong1-0/+23
Add HDMI nodes for the Khadas Vim board. Signed-off-by: Neil Armstrong <[email protected]> Signed-off-by: Kevin Hilman <[email protected]>
2017-06-09ARM64: dts: meson-gxl-s905d-p230: Add HDMI nodesNeil Armstrong1-0/+24
Add HDMI nodes for the Amlogic P230 board. Signed-off-by: Neil Armstrong <[email protected]> Signed-off-by: Kevin Hilman <[email protected]>
2017-06-09ARM64: dts: meson-gxbb-wetek-play2: Add HDMI and CVBS NodesNeil Armstrong1-0/+40
Add HDMI and CVBS nodes for the Wetek Play2 board. Signed-off-by: Neil Armstrong <[email protected]> Signed-off-by: Kevin Hilman <[email protected]>
2017-06-06ARM64: dts: meson-gx: Fix sensors reporting from SCPCarlo Caione1-1/+1
Switch to use the new compatible for the SCPI sensors so that the sensor readings are reported using the correct scale. Signed-off-by: Carlo Caione <[email protected]> Signed-off-by: Kevin Hilman <[email protected]>
2017-05-30ARM64: dts: meson-gxl: Add SPI pinctrl nodesNeil Armstrong1-0/+16
This patch adds the SPICC Controller pins nodes for Amlogic GXL SoCs. Signed-off-by: Neil Armstrong <[email protected]> Signed-off-by: Kevin Hilman <[email protected]>
2017-05-30ARM64: dts: meson-gxbb: Add SPI pinctrl nodesNeil Armstrong1-0/+16
This patch adds the SPICC Controller pins nodes for Amlogic GXBB SoCs. Signed-off-by: Neil Armstrong <[email protected]> Signed-off-by: Kevin Hilman <[email protected]>
2017-05-30ARM64: dts: meson-gxl: Add Ethernet PHY LEDS pins nodesNeil Armstrong1-0/+14
The Amlogic Meson GXL SoCs embeds an 10/100 Ethernet PHY, this patchs adds the Link and Activity LEDs signals pins nodes. Signed-off-by: Neil Armstrong <[email protected]> Signed-off-by: Kevin Hilman <[email protected]>
2017-05-30ARM64: dts: meson-gxl: Add CEC pins nodesNeil Armstrong1-0/+14
Add the AO and EE domain CEC pins nodes for the Amlogic Meson GXL SoCs. Signed-off-by: Neil Armstrong <[email protected]> Signed-off-by: Kevin Hilman <[email protected]>
2017-05-30ARM64: dts: meson-gxbb: Add CEC pins nodesNeil Armstrong1-0/+14
Add the AO and EE domain CEC pins nodes for the Amlogic Meson GXBB SoCs. Signed-off-by: Neil Armstrong <[email protected]> Signed-off-by: Kevin Hilman <[email protected]>
2017-05-30ARM64: dts: Fix GXBB periphs pinctrl pull-enable register baseNeil Armstrong1-1/+1
The pull-enable register base was wrongly copied from the meson8b pinctrl node, but was not used yet. Fixes: c328666d58aa ("ARM64: dts: amlogic: Add Meson GX dtsi from GXBB") Signed-off-by: Neil Armstrong <[email protected]> Reviewed-by: Jerome Brunet <[email protected]> Signed-off-by: Kevin Hilman <[email protected]>
2017-05-30ARM64: dts: Fix GXL periphs pinctrl pull-enable register baseNeil Armstrong1-1/+1
The pull-enable register base was wrongly copied from the GXBB pinctrl node, but was not used yet. Fixes: fb0fe92294a9 ("ARM64: dts: meson-gxl: Add pinctrl nodes") Signed-off-by: Neil Armstrong <[email protected]> Reviewed-by: Jerome Brunet <[email protected]> Signed-off-by: Kevin Hilman <[email protected]>
2017-05-30ARM64: dts: meson-gxl: Fix pinctrl periphs gpio-rangesNeil Armstrong1-1/+1
The gpio-range was badly added on the GXL dtsi, the AO pin count is 10 instead of 14. Fixes: 84412e4e857f ("ARM64: dts: meson-gxl: Add gpio-ranges properties") Signed-off-by: Neil Armstrong <[email protected]> Reviewed-by: Jerome Brunet <[email protected]> Signed-off-by: Kevin Hilman <[email protected]>
2017-05-30arm64: dts: amlogic: Add NanoPi K2Andreas Färber2-0/+292
The FriendlyARM NanoPi K2 is a single-board computer. Cc: [email protected] Signed-off-by: Andreas Färber <[email protected]> Signed-off-by: Kevin Hilman <[email protected]>
2017-05-30dt-bindings: arm: amlogic: Add NanoPi K2Andreas Färber1-0/+1
The FriendlyARM NanoPi K2 is a single-board computer. Cc: [email protected] Acked-by: Rob Herring <[email protected]> Signed-off-by: Andreas Färber <[email protected]> Signed-off-by: Kevin Hilman <[email protected]>
2017-05-30arm64: dts: meson-gxm: Add R-Box ProAndreas Färber2-0/+241
The R-Box Pro is a TV box derived from Amlogic q200 reference design. It uses an AP6255 Wifi module. It features an LED tube that lights a surrounding stripe and the top logo in blue or red or pink'ish - blue is on by default, and red (i.e., pink) is configured as panic indicator. This device is available in at least two models, with 2 GB vs. 3 GB RAM as well as varying eMMC size. The intent is to handle this with a single .dts that gets the actual RAM size from U-Boot. Cc: [email protected] Signed-off-by: Andreas Färber <[email protected]> Signed-off-by: Kevin Hilman <[email protected]>
2017-05-30dt-bindings: arm: amlogic: Add R-Box ProAndreas Färber1-0/+1
Cc: [email protected] Acked-by: Rob Herring <[email protected]> Signed-off-by: Andreas Färber <[email protected]> Signed-off-by: Kevin Hilman <[email protected]>
2017-05-30dt-bindings: Add Kingnovel vendor prefixAndreas Färber1-0/+1
Their domain name is spelled kingnoval, but textually Kingnovel. Cc: [email protected] Acked-by: Rob Herring <[email protected]> Signed-off-by: Andreas Färber <[email protected]> Signed-off-by: Kevin Hilman <[email protected]>
2017-05-29clk: meson-gxbb: un-export the CPU clockMartin Blumenstingl2-2/+1
The CPU clock defined in the Meson GX clock driver is actually a left-over from the Meson8b clock controller. Un-export the clock so we can remove it from the driver. Signed-off-by: Martin Blumenstingl <[email protected]> Signed-off-by: Jerome Brunet <[email protected]>
2017-05-29clk: meson-gxbb: expose UART clocksHelmut Klein2-3/+6
Expose the clock ids of the three none AO uarts to the dt-bindings Acked-by: Neil Armstrong <[email protected]> Signed-off-by: Helmut Klein <[email protected]> Signed-off-by: Neil Armstrong <[email protected]> [tidy the commit message to match similar change] Signed-off-by: Jerome Brunet <[email protected]>
2017-05-29clk: meson-gxbb: expose SPICC gateNeil Armstrong2-1/+2
Expose the SPICC gate clock to enable the SPICC controller. Acked-by: Jerome Brunet <[email protected]> Signed-off-by: Neil Armstrong <[email protected]> [tidy commit message to match similar changes] Signed-off-by: Jerome Brunet <[email protected]>
2017-05-29clk: meson-gxbb: expose spdif master clockJerome Brunet2-2/+4
Expose the spdif master clock and the mux to select the appropriate spdif clock parent depending on the data source. Acked-by: Michael Turquette <[email protected]> Signed-off-by: Jerome Brunet <[email protected]>
2017-05-29clk: meson-gxbb: expose i2s master clockJerome Brunet2-1/+2
Expose cts_amclk in the device tree bindings Acked-by: Michael Turquette <[email protected]> Signed-off-by: Jerome Brunet <[email protected]>
2017-05-29clk: meson-gxbb: expose spdif clock gatesJerome Brunet2-2/+4
Expose the clock gates required for the spdif output Acked-by: Michael Turquette <[email protected]> Signed-off-by: Jerome Brunet <[email protected]>
2017-05-17arm64: dts: meson-gx-p23x-q20x: Fix node orderAndreas Färber1-29/+29
Sort nodes referenced by label alphabetically. Signed-off-by: Andreas Färber <[email protected]> Signed-off-by: Kevin Hilman <[email protected]>
2017-05-17arm64: dts: meson-gxm-nexbox-a1: Fix node orderAndreas Färber1-43/+43
Sort nodes referenced by label alphabetically. Signed-off-by: Andreas Färber <[email protected]> Signed-off-by: Kevin Hilman <[email protected]>
2017-05-17arm64: dts: meson-gxl-s905x-nexbox-a95x: Fix node orderAndreas Färber1-26/+26
Sort nodes referenced by label alphabetically. Signed-off-by: Andreas Färber <[email protected]> Signed-off-by: Kevin Hilman <[email protected]>
2017-05-17arm64: dts: meson-gxl: Fix node orderAndreas Färber1-36/+36
Sort nodes referenced by label alphabetically. Signed-off-by: Andreas Färber <[email protected]> Signed-off-by: Kevin Hilman <[email protected]>
2017-05-17arm64: dts: meson-gxbb-p20x: Fix node orderAndreas Färber1-31/+31
Sort nodes referenced by label alphabetically. Signed-off-by: Andreas Färber <[email protected]> Signed-off-by: Kevin Hilman <[email protected]>
2017-05-17arm64: dts: meson-gxbb-nexbox-a95x: Fix node orderAndreas Färber1-26/+26
Sort nodes referenced by label alphabetically. Signed-off-by: Andreas Färber <[email protected]> Signed-off-by: Kevin Hilman <[email protected]>
2017-05-17arm64: dts: meson-gxbb-vega-s95: Fix node orderAndreas Färber1-27/+27
Sort nodes referenced by label alphabetically. Signed-off-by: Andreas Färber <[email protected]> Signed-off-by: Kevin Hilman <[email protected]>
2017-05-17arm64: dts: meson-gxbb-odroidc2: Fix node orderAndreas Färber1-54/+54
Sort nodes referenced by label alphabetically. Signed-off-by: Andreas Färber <[email protected]> Signed-off-by: Kevin Hilman <[email protected]>
2017-05-17arm64: dts: meson-gxbb: Fix node orderAndreas Färber1-85/+96
Sort nodes referenced by label alphabetically. Signed-off-by: Andreas Färber <[email protected]> Signed-off-by: Kevin Hilman <[email protected]>
2017-05-17arm64: dts: meson-gxbb-wetek-hub: Reference CVBS node by labelAndreas Färber2-4/+4
Makes the override safer. Acked-by: Neil Armstrong <[email protected]> Signed-off-by: Andreas Färber <[email protected]> Reviewed-by: Neil Armstrong <[email protected]> Signed-off-by: Kevin Hilman <[email protected]>
2017-05-17arm64: dts: meson-gxl-s905x: Comment typo fixAndreas Färber1-1/+1
Reviewed-by: Neil Armstrong <[email protected]> Signed-off-by: Andreas Färber <[email protected]> Reviewed-by: Neil Armstrong <[email protected]> Signed-off-by: Kevin Hilman <[email protected]>
2017-05-17arm64: dts: meson-gxm-nexbox-a1: Drop UART commentAndreas Färber1-1/+0
Product pictures show no DB9 connector, so this seems copy&paste. Acked-by: Neil Armstrong <[email protected]> Signed-off-by: Andreas Färber <[email protected]> Reviewed-by: Neil Armstrong <[email protected]> Signed-off-by: Kevin Hilman <[email protected]>
2017-05-17arm64: dts: meson-gxl-s905x-khadas-vim: Fix Wifi node nameAndreas Färber1-1/+1
bcrmf -> brcmf -> wifi Fixes: e15d2774b8c0 ("ARM64: dts: meson-gxl: add support for the Khadas VIM board") Cc: Martin Blumenstingl <[email protected]> Signed-off-by: Andreas Färber <[email protected]> Reviewed-by: Neil Armstrong <[email protected]> Reviewed-by: Martin Blumenstingl <[email protected]> Signed-off-by: Kevin Hilman <[email protected]>
2017-05-17arm64: dts: meson-gx-p23x-q20x: Fix Wifi node nameAndreas Färber1-1/+1
bcrmf -> brcmf -> wifi Fixes: bb51b5350d2f ("ARM64: dts: Add support for Meson GXM") Cc: Neil Armstrong <[email protected]> Signed-off-by: Andreas Färber <[email protected]> Reviewed-by: Neil Armstrong <[email protected]> Signed-off-by: Kevin Hilman <[email protected]>
2017-05-17arm64: dts: meson-gxbb-p20x: Fix Wifi node nameAndreas Färber1-1/+1
bcrmf -> brcmf -> wifi Fixes: ab3943fe57a2 ("ARM64: dts: meson-gxbb: Add P20x Wifi SDIO support") Cc: Neil Armstrong <[email protected]> Signed-off-by: Andreas Färber <[email protected]> Reviewed-by: Neil Armstrong <[email protected]> Signed-off-by: Kevin Hilman <[email protected]>
2017-05-17arm64: dts: meson-gxbb-vega-s95: Fix Wifi node nameAndreas Färber1-1/+1
bcrmf -> brcmf -> wifi Fixes: ab5b24fdd2d5 ("ARM64: dts: meson-gxbb-vega-s95: Add SD/SDIO/MMC and PWM nodes") Cc: Martin Blumenstingl <[email protected]> Signed-off-by: Andreas Färber <[email protected]> Reviewed-by: Neil Armstrong <[email protected]> Signed-off-by: Kevin Hilman <[email protected]>
2017-05-17arm64: dts: amlogic: Sort MakefileAndreas Färber1-3/+3
Sort the .dtb files alphabetically to make clear where to add new ones. Signed-off-by: Andreas Färber <[email protected]> Signed-off-by: Kevin Hilman <[email protected]>
2017-05-17dt-bindings: arm: amlogic: Reorder boardsAndreas Färber1-7/+13
Enforce groupment by SoCs, and order alphabetically within the group (with some exceptions). This should facilitate adding new boards. Signed-off-by: Andreas Färber <[email protected]> Signed-off-by: Kevin Hilman <[email protected]>
2017-05-13Linux 4.12-rc1Linus Torvalds1-2/+2
2017-05-13Merge branch 'for-linus' of ↵Linus Torvalds5-7/+445
git://git.kernel.org/pub/scm/linux/kernel/git/dtor/input Pull some more input subsystem updates from Dmitry Torokhov: "An updated xpad driver with a few more recognized device IDs, and a new psxpad-spi driver, allowing connecting Playstation 1 and 2 joypads via SPI bus" * 'for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/dtor/input: Input: cros_ec_keyb - remove extraneous 'const' Input: add support for PlayStation 1/2 joypads connected via SPI Input: xpad - add USB IDs for Mad Catz Brawlstick and Razer Sabertooth Input: xpad - sync supported devices with xboxdrv Input: xpad - sort supported devices by USB ID
2017-05-13Merge tag 'upstream-4.12-rc1' of git://git.infradead.org/linux-ubifsLinus Torvalds9-18/+195
Pull UBI/UBIFS updates from Richard Weinberger: - new config option CONFIG_UBIFS_FS_SECURITY - minor improvements - random fixes * tag 'upstream-4.12-rc1' of git://git.infradead.org/linux-ubifs: ubi: Add debugfs file for tracking PEB state ubifs: Fix a typo in comment of ioctl2ubifs & ubifs2ioctl ubifs: Remove unnecessary assignment ubifs: Fix cut and paste error on sb type comparisons ubi: fastmap: Fix slab corruption ubifs: Add CONFIG_UBIFS_FS_SECURITY to disable/enable security labels ubi: Make mtd parameter readable ubi: Fix section mismatch
2017-05-13Merge branch 'for-linus-4.12-rc1' of ↵Linus Torvalds7-19/+17
git://git.kernel.org/pub/scm/linux/kernel/git/rw/uml Pull UML fixes from Richard Weinberger: "No new stuff, just fixes" * 'for-linus-4.12-rc1' of git://git.kernel.org/pub/scm/linux/kernel/git/rw/uml: um: Add missing NR_CPUS include um: Fix to call read_initrd after init_bootmem um: Include kbuild.h instead of duplicating its macros um: Fix PTRACE_POKEUSER on x86_64 um: Set number of CPUs um: Fix _print_addr()
2017-05-13Merge branch 'akpm' (patches from Andrew)Linus Torvalds23-126/+145
Merge misc fixes from Andrew Morton: "15 fixes" * emailed patches from Andrew Morton <[email protected]>: mm, docs: update memory.stat description with workingset* entries mm: vmscan: scan until it finds eligible pages mm, thp: copying user pages must schedule on collapse dax: fix PMD data corruption when fault races with write dax: fix data corruption when fault races with write ext4: return to starting transaction in ext4_dax_huge_fault() mm: fix data corruption due to stale mmap reads dax: prevent invalidation of mapped DAX entries Tigran has moved mm, vmalloc: fix vmalloc users tracking properly mm/khugepaged: add missed tracepoint for collapse_huge_page_swapin gcov: support GCC 7.1 mm, vmstat: Remove spurious WARN() during zoneinfo print time: delete current_fs_time() hwpoison, memcg: forcibly uncharge LRU pages
2017-05-12mm, docs: update memory.stat description with workingset* entriesRoman Gushchin1-0/+12
Commit 4b4cea91691d ("mm: vmscan: fix IO/refault regression in cache workingset transition") introduced three new entries in memory stat file: - workingset_refault - workingset_activate - workingset_nodereclaim This commit adds a corresponding description to the cgroup v2 docs. Link: http://lkml.kernel.org/r/[email protected] Signed-off-by: Roman Gushchin <[email protected]> Cc: Johannes Weiner <[email protected]> Cc: Michal Hocko <[email protected]> Cc: Vladimir Davydov <[email protected]> Cc: Tejun Heo <[email protected]> Cc: Li Zefan <[email protected]> Signed-off-by: Andrew Morton <[email protected]> Signed-off-by: Linus Torvalds <[email protected]>
2017-05-12mm: vmscan: scan until it finds eligible pagesMinchan Kim1-6/+15
Although there are a ton of free swap and anonymous LRU page in elgible zones, OOM happened. balloon invoked oom-killer: gfp_mask=0x17080c0(GFP_KERNEL_ACCOUNT|__GFP_ZERO|__GFP_NOTRACK), nodemask=(null), order=0, oom_score_adj=0 CPU: 7 PID: 1138 Comm: balloon Not tainted 4.11.0-rc6-mm1-zram-00289-ge228d67e9677-dirty #17 Hardware name: QEMU Standard PC (i440FX + PIIX, 1996), BIOS Ubuntu-1.8.2-1ubuntu1 04/01/2014 Call Trace: oom_kill_process+0x21d/0x3f0 out_of_memory+0xd8/0x390 __alloc_pages_slowpath+0xbc1/0xc50 __alloc_pages_nodemask+0x1a5/0x1c0 pte_alloc_one+0x20/0x50 __pte_alloc+0x1e/0x110 __handle_mm_fault+0x919/0x960 handle_mm_fault+0x77/0x120 __do_page_fault+0x27a/0x550 trace_do_page_fault+0x43/0x150 do_async_page_fault+0x2c/0x90 async_page_fault+0x28/0x30 Mem-Info: active_anon:424716 inactive_anon:65314 isolated_anon:0 active_file:52 inactive_file:46 isolated_file:0 unevictable:0 dirty:27 writeback:0 unstable:0 slab_reclaimable:3967 slab_unreclaimable:4125 mapped:133 shmem:43 pagetables:1674 bounce:0 free:4637 free_pcp:225 free_cma:0 Node 0 active_anon:1698864kB inactive_anon:261256kB active_file:208kB inactive_file:184kB unevictable:0kB isolated(anon):0kB isolated(file):0kB mapped:532kB dirty:108kB writeback:0kB shmem:172kB writeback_tmp:0kB unstable:0kB all_unreclaimable? no DMA free:7316kB min:32kB low:44kB high:56kB active_anon:8064kB inactive_anon:0kB active_file:0kB inactive_file:0kB unevictable:0kB writepending:0kB present:15992kB managed:15908kB mlocked:0kB slab_reclaimable:464kB slab_unreclaimable:40kB kernel_stack:0kB pagetables:24kB bounce:0kB free_pcp:0kB local_pcp:0kB free_cma:0kB lowmem_reserve[]: 0 992 992 1952 DMA32 free:9088kB min:2048kB low:3064kB high:4080kB active_anon:952176kB inactive_anon:0kB active_file:36kB inactive_file:0kB unevictable:0kB writepending:88kB present:1032192kB managed:1019388kB mlocked:0kB slab_reclaimable:13532kB slab_unreclaimable:16460kB kernel_stack:3552kB pagetables:6672kB bounce:0kB free_pcp:56kB local_pcp:24kB free_cma:0kB lowmem_reserve[]: 0 0 0 959 Movable free:3644kB min:1980kB low:2960kB high:3940kB active_anon:738560kB inactive_anon:261340kB active_file:188kB inactive_file:640kB unevictable:0kB writepending:20kB present:1048444kB managed:1010816kB mlocked:0kB slab_reclaimable:0kB slab_unreclaimable:0kB kernel_stack:0kB pagetables:0kB bounce:0kB free_pcp:832kB local_pcp:60kB free_cma:0kB lowmem_reserve[]: 0 0 0 0 DMA: 1*4kB (E) 0*8kB 18*16kB (E) 10*32kB (E) 10*64kB (E) 9*128kB (ME) 8*256kB (E) 2*512kB (E) 2*1024kB (E) 0*2048kB 0*4096kB = 7524kB DMA32: 417*4kB (UMEH) 181*8kB (UMEH) 68*16kB (UMEH) 48*32kB (UMEH) 14*64kB (MH) 3*128kB (M) 1*256kB (H) 1*512kB (M) 2*1024kB (M) 0*2048kB 0*4096kB = 9836kB Movable: 1*4kB (M) 1*8kB (M) 1*16kB (M) 1*32kB (M) 0*64kB 1*128kB (M) 2*256kB (M) 4*512kB (M) 1*1024kB (M) 0*2048kB 0*4096kB = 3772kB 378 total pagecache pages 17 pages in swap cache Swap cache stats: add 17325, delete 17302, find 0/27 Free swap = 978940kB Total swap = 1048572kB 524157 pages RAM 0 pages HighMem/MovableOnly 12629 pages reserved 0 pages cma reserved 0 pages hwpoisoned [ pid ] uid tgid total_vm rss nr_ptes nr_pmds swapents oom_score_adj name [ 433] 0 433 4904 5 14 3 82 0 upstart-udev-br [ 438] 0 438 12371 5 27 3 191 -1000 systemd-udevd With investigation, skipping page of isolate_lru_pages makes reclaim void because it returns zero nr_taken easily so LRU shrinking is effectively nothing and just increases priority aggressively. Finally, OOM happens. The problem is that get_scan_count determines nr_to_scan with eligible zones so although priority drops to zero, it couldn't reclaim any pages if the LRU contains mostly ineligible pages. get_scan_count: size = lruvec_lru_size(lruvec, lru, sc->reclaim_idx); size = size >> sc->priority; Assumes sc->priority is 0 and LRU list is as follows. N-N-N-N-H-H-H-H-H-H-H-H-H-H-H-H-H-H-H-H (Ie, small eligible pages are in the head of LRU but others are almost ineligible pages) In that case, size becomes 4 so VM want to scan 4 pages but 4 pages from tail of the LRU are not eligible pages. If get_scan_count counts skipped pages, it doesn't reclaim any pages remained after scanning 4 pages so it ends up OOM happening. This patch makes isolate_lru_pages try to scan pages until it encounters eligible zones's pages. [[email protected]: clean up mind-bending `for' statement. Tweak comment text] Fixes: 3db65812d688 ("Revert "mm, vmscan: account for skipped pages as a partial scan"") Link: http://lkml.kernel.org/r/[email protected] Signed-off-by: Minchan Kim <[email protected]> Acked-by: Michal Hocko <[email protected]> Acked-by: Johannes Weiner <[email protected]> Cc: Mel Gorman <[email protected]> Signed-off-by: Andrew Morton <[email protected]> Signed-off-by: Linus Torvalds <[email protected]>