summaryrefslogtreecommitdiff
path: root/mm/migrate.c
diff options
context:
space:
mode:
authorMatthew Wilcox (Oracle) <willy@infradead.org>2020-06-27 22:19:08 -0400
committerMatthew Wilcox (Oracle) <willy@infradead.org>2020-10-26 14:17:18 -0400
commitd7b0d86188965c9152eed8edc55027479bd722e9 (patch)
tree8fcd7b4eb7ee1b13e4b493ea69994dd992d31881 /mm/migrate.c
parentb1cbfaa28309a0033d3d81a763cbd4911ef58b50 (diff)
mm: Use multi-index entries in the page cache
We currently store order-N THPs as 2^N consecutive entries. While this consumes rather more memory than necessary, it also turns out to be buggy. A writeback operation which starts in the middle of a dirty THP will not notice as the dirty bit is only set on the head index. With multi-index entries, the dirty bit will be found no matter where in the THP the iteration starts. This does end up simplifying the page cache slightly, although not as much as I had hoped. Signed-off-by: Matthew Wilcox (Oracle) <willy@infradead.org>
Diffstat (limited to 'mm/migrate.c')
-rw-r--r--mm/migrate.c8
1 files changed, 0 insertions, 8 deletions
diff --git a/mm/migrate.c b/mm/migrate.c
index 262c91038c41..2dabb6e25e7c 100644
--- a/mm/migrate.c
+++ b/mm/migrate.c
@@ -460,14 +460,6 @@ int migrate_page_move_mapping(struct address_space *mapping,
}
xas_store(&xas, newpage);
- if (PageTransHuge(page)) {
- int i;
-
- for (i = 1; i < HPAGE_PMD_NR; i++) {
- xas_next(&xas);
- xas_store(&xas, newpage);
- }
- }
/*
* Drop cache reference from old page by unfreezing