Daniel Vacek
f59f1caf72
Revert "mm: page_alloc: skip over regions of invalid pfns where possible"
...
This reverts commit b92df1de5d ("mm: page_alloc: skip over regions of
invalid pfns where possible"). The commit is meant to be a boot init
speed up skipping the loop in memmap_init_zone() for invalid pfns.
But given some specific memory mapping on x86_64 (or more generally
theoretically anywhere but on arm with CONFIG_HAVE_ARCH_PFN_VALID) the
implementation also skips valid pfns which is plain wrong and causes
'kernel BUG at mm/page_alloc.c:1389!'
crash> log | grep -e BUG -e RIP -e Call.Trace -e move_freepages_block -e rmqueue -e freelist -A1
kernel BUG at mm/page_alloc.c:1389!
invalid opcode: 0000 [#1 ] SMP
--
RIP: 0010: move_freepages+0x15e/0x160
--
Call Trace:
move_freepages_block+0x73/0x80
__rmqueue+0x263/0x460
get_page_from_freelist+0x7e1/0x9e0
__alloc_pages_nodemask+0x176/0x420
--
crash> page_init_bug -v | grep RAM
<struct resource 0xffff88067fffd2f8> 1000 - 9bfff System RAM (620.00 KiB)
<struct resource 0xffff88067fffd3a0> 100000 - 430bffff System RAM ( 1.05 GiB = 1071.75 MiB = 1097472.00 KiB)
<struct resource 0xffff88067fffd410> 4b0c8000 - 4bf9cfff System RAM ( 14.83 MiB = 15188.00 KiB)
<struct resource 0xffff88067fffd480> 4bfac000 - 646b1fff System RAM (391.02 MiB = 400408.00 KiB)
<struct resource 0xffff88067fffd560> 7b788000 - 7b7fffff System RAM (480.00 KiB)
<struct resource 0xffff88067fffd640> 100000000 - 67fffffff System RAM ( 22.00 GiB)
crash> page_init_bug | head -6
<struct resource 0xffff88067fffd560> 7b788000 - 7b7fffff System RAM (480.00 KiB)
<struct page 0xffffea0001ede200> 1fffff00000000 0 <struct pglist_data 0xffff88047ffd9000> 1 <struct zone 0xffff88047ffd9800> DMA32 4096 1048575
<struct page 0xffffea0001ede200> 505736 505344 <struct page 0xffffea0001ed8000> 505855 <struct page 0xffffea0001edffc0>
<struct page 0xffffea0001ed8000> 0 0 <struct pglist_data 0xffff88047ffd9000> 0 <struct zone 0xffff88047ffd9000> DMA 1 4095
<struct page 0xffffea0001edffc0> 1fffff00000400 0 <struct pglist_data 0xffff88047ffd9000> 1 <struct zone 0xffff88047ffd9800> DMA32 4096 1048575
BUG, zones differ!
crash> kmem -p 77fff000 78000000 7b5ff000 7b600000 7b787000 7b788000
PAGE PHYSICAL MAPPING INDEX CNT FLAGS
ffffea0001e00000 78000000 0 0 0 0
ffffea0001ed7fc0 7b5ff000 0 0 0 0
ffffea0001ed8000 7b600000 0 0 0 0 <<<<
ffffea0001ede1c0 7b787000 0 0 0 0
ffffea0001ede200 7b788000 0 0 1 1fffff00000000
Link: http://lkml.kernel.org/r/20180316143855.29838-1-neelx@redhat.com
Fixes: b92df1de5d ("mm: page_alloc: skip over regions of invalid pfns where possible")
Signed-off-by: Daniel Vacek <neelx@redhat.com>
Acked-by: Ard Biesheuvel <ard.biesheuvel@linaro.org>
Acked-by: Michal Hocko <mhocko@suse.com>
Reviewed-by: Andrew Morton <akpm@linux-foundation.org>
Cc: Vlastimil Babka <vbabka@suse.cz>
Cc: Mel Gorman <mgorman@techsingularity.net>
Cc: Pavel Tatashin <pasha.tatashin@oracle.com>
Cc: Paul Burton <paul.burton@imgtec.com>
Cc: <stable@vger.kernel.org>
Signed-off-by: Andrew Morton <akpm@linux-foundation.org>
Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
2018-03-22 17:07:01 -07:00
arch
x86/mm: implement free pmd/pte page interfaces
2018-03-22 17:07:01 -07:00
block
for-linus-20180302
2018-03-02 09:35:36 -08:00
certs
certs/blacklist_nohashes.c: fix const confusion in certs blacklist
2018-02-21 15:35:43 -08:00
crypto
X.509: fix NULL dereference when restricting key with unsupported_sig
2018-02-22 14:38:34 +00:00
Documentation
Merge branch 'for-4.16-fixes' of git://git.kernel.org/pub/scm/linux/kernel/git/tj/libata
2018-03-19 14:23:30 -07:00
drivers
A late collection of fixes for regressions seen this release cycle.
2018-03-20 17:44:27 -07:00
firmware
kbuild: remove all dummy assignments to obj-
2017-11-18 11:46:06 +09:00
fs
hugetlbfs: check for pgoff value overflow
2018-03-22 17:07:01 -07:00
include
Revert "mm: page_alloc: skip over regions of invalid pfns where possible"
2018-03-22 17:07:01 -07:00
init
jump_label: Explicitly disable jump labels in __init code
2018-02-21 16:54:05 +01:00
ipc
vfs: do bulk POLL* -> EPOLL* replacement
2018-02-11 14:34:03 -08:00
kernel
Merge branch 'for-4.16-fixes' of git://git.kernel.org/pub/scm/linux/kernel/git/tj/cgroup
2018-03-19 15:39:02 -07:00
lib
mm/vmalloc: add interfaces to free unmapped page table
2018-03-22 17:07:01 -07:00
LICENSES
LICENSES: Add MPL-1.1 license
2018-01-06 10:59:44 -07:00
mm
Revert "mm: page_alloc: skip over regions of invalid pfns where possible"
2018-03-22 17:07:01 -07:00
net
Merge git://git.kernel.org/pub/scm/linux/kernel/git/davem/net
2018-03-05 11:29:24 -08:00
samples
- do not build samples when cross compiling (Michal Hocko)
2018-02-27 10:39:29 -08:00
scripts
kbuild: Handle builtin dtb file names containing hyphens
2018-03-09 01:14:38 +09:00
security
integrity/security: fix digsig.c build error with header file
2018-02-22 20:09:08 -08:00
sound
ASoC: Fixes for v4.16
2018-03-12 17:30:38 +01:00
tools
Merge branch 'x86-pti-for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/tip/tip
2018-03-18 12:03:15 -07:00
usr
initramfs: fix initramfs rebuilds w/ compression after disabling
2017-11-03 07:39:19 -07:00
virt
kvm/arm fixes for 4.16, take 2
2018-03-15 21:45:37 +01:00
.cocciconfig
.get_maintainer.ignore
.gitattributes
.gitattributes: set git diff driver for C source code files
2016-10-07 18:46:30 -07:00
.gitignore
.gitignore: ignore ASN.1 auto generated files
2018-02-14 21:05:38 +01:00
.mailmap
mailmap: update Mark Yao's email address
2018-01-04 16:45:09 -08:00
COPYING
CREDITS
MAINTAINERS: update TPM driver infrastructure changes
2017-11-09 17:58:40 -08:00
Kbuild
Kbuild updates for v4.15
2017-11-17 17:45:29 -08:00
Kconfig
License cleanup: add SPDX GPL-2.0 license identifier to files with no license
2017-11-02 11:10:55 +01:00
MAINTAINERS
MAINTAINERS: update Mark Fasheh's e-mail
2018-03-22 17:07:01 -07:00
Makefile
Linux 4.16-rc6
2018-03-18 17:48:42 -07:00
README
README: add a new README file, pointing to the Documentation/
2016-10-24 08:12:35 -02:00