* [patch 08/11] mm, page_owner: handle THP splits correctly
@ 2019-08-25 0:54 akpm
2019-08-26 1:30 ` Sasha Levin
0 siblings, 1 reply; 2+ messages in thread
From: akpm @ 2019-08-25 0:54 UTC (permalink / raw)
To: akpm, kirill, linux-mm, mgorman, mhocko, mm-commits, stable,
torvalds, vbabka, willy
From: Vlastimil Babka <vbabka@suse.cz>
Subject: mm, page_owner: handle THP splits correctly
THP splitting path is missing the split_page_owner() call that
split_page() has. As a result, split THP pages are wrongly reported in
the page_owner file as order-9 pages. Furthermore when the former head
page is freed, the remaining former tail pages are not listed in the
page_owner file at all. This patch fixes that by adding the
split_page_owner() call into __split_huge_page().
Link: http://lkml.kernel.org/r/20190820131828.22684-2-vbabka@suse.cz
Fixes: a9627bc5e34e ("mm/page_owner: introduce split_page_owner and replace manual handling")
Reported-by: Kirill A. Shutemov <kirill@shutemov.name>
Signed-off-by: Vlastimil Babka <vbabka@suse.cz>
Cc: Michal Hocko <mhocko@kernel.org>
Cc: Mel Gorman <mgorman@techsingularity.net>
Cc: Matthew Wilcox <willy@infradead.org>
Cc: <stable@vger.kernel.org>
Signed-off-by: Andrew Morton <akpm@linux-foundation.org>
---
mm/huge_memory.c | 4 ++++
1 file changed, 4 insertions(+)
--- a/mm/huge_memory.c~mm-page_owner-handle-thp-splits-correctly
+++ a/mm/huge_memory.c
@@ -32,6 +32,7 @@
#include <linux/shmem_fs.h>
#include <linux/oom.h>
#include <linux/numa.h>
+#include <linux/page_owner.h>
#include <asm/tlb.h>
#include <asm/pgalloc.h>
@@ -2516,6 +2517,9 @@ static void __split_huge_page(struct pag
}
ClearPageCompound(head);
+
+ split_page_owner(head, HPAGE_PMD_ORDER);
+
/* See comment in __split_huge_page_tail() */
if (PageAnon(head)) {
/* Additional pin to swap cache */
_
^ permalink raw reply [flat|nested] 2+ messages in thread* Re: [patch 08/11] mm, page_owner: handle THP splits correctly
2019-08-25 0:54 [patch 08/11] mm, page_owner: handle THP splits correctly akpm
@ 2019-08-26 1:30 ` Sasha Levin
0 siblings, 0 replies; 2+ messages in thread
From: Sasha Levin @ 2019-08-26 1:30 UTC (permalink / raw)
To: Sasha Levin, Vlastimil Babka, akpm, kirill, linux-mm
Cc: Michal Hocko, Mel Gorman, Matthew Wilcox, stable, stable
Hi,
[This is an automated email]
This commit has been processed because it contains a "Fixes:" tag,
fixing commit: a9627bc5e34e mm/page_owner: introduce split_page_owner and replace manual handling.
The bot has tested the following trees: v5.2.9, v4.19.67, v4.14.139, v4.9.189.
v5.2.9: Build OK!
v4.19.67: Failed to apply! Possible dependencies:
426dcd4b600f ("hexagon: switch to NO_BOOTMEM")
46515fdb1adf ("ixgbe: move common Rx functions to ixgbe_txrx_common.h")
57c8a661d95d ("mm: remove include/linux/bootmem.h")
6471f52af786 ("alpha: switch to NO_BOOTMEM")
98fa15f34cb3 ("mm: replace all open encodings for NUMA_NO_NODE")
d0bcacd0a130 ("ixgbe: add AF_XDP zero-copy Rx support")
e0a9317d9004 ("hexagon: use generic dma_noncoherent_ops")
f406f222d4b2 ("hexagon: implement the sync_sg_for_device DMA operation")
v4.14.139: Failed to apply! Possible dependencies:
01417c6cc7dc ("powerpc/64: Change soft_enabled from flag to bitmask")
0b63acf4a0eb ("powerpc/64: Move set_soft_enabled() and rename")
1696d0fb7fcd ("powerpc/64: Set DSCR default initially from SPR")
1af19331a3a1 ("powerpc/64s: Relax PACA address limitations")
4890aea65ae7 ("powerpc/64: Allocate pacas per node")
4e26bc4a4ed6 ("powerpc/64: Rename soft_enabled to irq_soft_mask")
8e0b634b1327 ("powerpc/64s: Do not allocate lppaca if we are not virtualized")
98fa15f34cb3 ("mm: replace all open encodings for NUMA_NO_NODE")
9f83e00f4cc1 ("powerpc/64: Improve inline asm in arch_local_irq_disable")
b5c1bd62c054 ("powerpc/64: Fix arch_local_irq_disable() prototype")
c2e480ba8227 ("powerpc/64: Add #defines for paca->soft_enabled flags")
ff967900c9d4 ("powerpc/64: Fix latency tracing for lazy irq replay")
v4.9.189: Failed to apply! Possible dependencies:
010426079ec1 ("sched/headers: Prepare for new header dependencies before moving more code to <linux/sched/mm.h>")
2077be6783b5 ("arm64: Use __pa_symbol for kernel symbols")
39bc88e5e38e ("arm64: Disable TTBR0_EL1 during normal kernel execution")
3f07c0144132 ("sched/headers: Prepare for new header dependencies before moving code to <linux/sched/signal.h>")
68db0cf10678 ("sched/headers: Prepare for new header dependencies before moving code to <linux/sched/task_stack.h>")
7c0f6ba682b9 ("Replace <asm/uaccess.h> with <linux/uaccess.h> globally")
869dcfd10dfe ("arm64: Add cast for virt_to_pfn")
9164bb4a18df ("sched/headers: Prepare to move 'init_task' and 'init_thread_union' from <linux/sched.h> to <linux/sched/task.h>")
98fa15f34cb3 ("mm: replace all open encodings for NUMA_NO_NODE")
9cf09d68b89a ("arm64: xen: Enable user access before a privcmd hvc call")
bd38967d406f ("arm64: Factor out PAN enabling/disabling into separate uaccess_* macros")
NOTE: The patch will not be queued to stable trees until it is upstream.
How should we proceed with this patch?
--
Thanks,
Sasha
^ permalink raw reply [flat|nested] 2+ messages in thread
end of thread, other threads:[~2019-08-26 1:30 UTC | newest]
Thread overview: 2+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2019-08-25 0:54 [patch 08/11] mm, page_owner: handle THP splits correctly akpm
2019-08-26 1:30 ` Sasha Levin
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox