mm-thp-decrease-nr_thps-in-files-mapping-on-thp-split.patch removed from -mm tree
The patch titled
Subject: mm/thp: decrease nr_thps in file's mapping on THP split
has been removed from the -mm tree. Its filename was
mm-thp-decrease-nr_thps-in-files-mapping-on-thp-split.patch
This patch was dropped because it was merged into mainline or a subsystem tree
------------------------------------------------------
From: Marek Szyprowski <[email protected]>
Subject: mm/thp: decrease nr_thps in file's mapping on THP split
Decrease nr_thps counter in file's mapping to ensure that the page cache won't be dropped excessively on file write access if page has been already split.
I've tried a test scenario, where one runs a big binary, kernel remaps it with THPs, then one forces THP split with /sys/kernel/debug/split_huge_pages. During any further open of that binary with O_RDWR or O_WRITEONLY kernel drops page cache for it, because of non-zero thps counter.
---
mm/huge_memory.c | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-)
mm/huge_memory.c renamed from mm/huge_memory.c~mm-thp-decrease-nr_thps-in-files-mapping-on-thp-split +4 -2
@@ -2700,12 +2700,14 @@ int split_huge_page_to_list(struct pageif (mapping) {int nr =thp_nr_pages (head); -if (PageSwapBacked (head)) +if (PageSwapBacked (head)) {__mod_lruvec_page_state (head,NR_SHMEM_THPS , -nr); -else + }else {__mod_lruvec_page_state (head,NR_FILE_THPS , -nr); +filemap_nr_thps_dec (mapping); + } }__split_huge_page (page, list, end);
_
Patches currently in -mm which might be from [email protected] are