diff for duplicates of <20151020072109.GD2941@bbox> diff --git a/a/1.txt b/N1/1.txt index 0be9a9c..c2e5345 100644 --- a/a/1.txt +++ b/N1/1.txt @@ -38,3 +38,40 @@ On Mon, Oct 19, 2015 at 07:01:50PM +0900, Minchan Kim wrote: I reviewed THP refcount redesign patch and It seems below patch fixes MADV_FREE problem. It works well for hours. + +>From 104a0940b4c0f97e61de9fee0fd602926ff28312 Mon Sep 17 00:00:00 2001 +From: Minchan Kim <minchan@kernel.org> +Date: Tue, 20 Oct 2015 16:00:52 +0900 +Subject: [PATCH] mm: mark head page dirty in split_huge_page + +In thp split in old THP refcount, we mappped all of pages +(ie, head + tails) to pte_mkdirty and mark PG_flags to every +tail pages. + +But with THP refcount redesign, we can lose dirty bit in page table +and PG_dirty for head page if we want to free the THP page using +migration_entry. + +It ends up discarding head page by madvise_free suddenly. +This patch fixes it by mark the head page PG_dirty when VM splits +the THP page. + +Signed-off-by: Minchan Kim <minchan@kernel.org> +--- + mm/huge_memory.c | 1 + + 1 file changed, 1 insertion(+) + +diff --git a/mm/huge_memory.c b/mm/huge_memory.c +index adccfb48ce57..7fbbd42554a1 100644 +--- a/mm/huge_memory.c ++++ b/mm/huge_memory.c +@@ -3258,6 +3258,7 @@ static void __split_huge_page(struct page *page, struct list_head *list) + atomic_sub(tail_mapcount, &head->_count); + + ClearPageCompound(head); ++ SetPageDirty(head); + spin_unlock_irq(&zone->lru_lock); + + unfreeze_page(page_anon_vma(head), head); +-- +1.9.1 diff --git a/a/content_digest b/N1/content_digest index 8643866..fa7f04a 100644 --- a/a/content_digest +++ b/N1/content_digest @@ -54,6 +54,43 @@ "> SetPageDirty(page);\n" "\n" "I reviewed THP refcount redesign patch and It seems below patch fixes\n" - MADV_FREE problem. It works well for hours. + "MADV_FREE problem. It works well for hours.\n" + "\n" + ">From 104a0940b4c0f97e61de9fee0fd602926ff28312 Mon Sep 17 00:00:00 2001\n" + "From: Minchan Kim <minchan@kernel.org>\n" + "Date: Tue, 20 Oct 2015 16:00:52 +0900\n" + "Subject: [PATCH] mm: mark head page dirty in split_huge_page\n" + "\n" + "In thp split in old THP refcount, we mappped all of pages\n" + "(ie, head + tails) to pte_mkdirty and mark PG_flags to every\n" + "tail pages.\n" + "\n" + "But with THP refcount redesign, we can lose dirty bit in page table\n" + "and PG_dirty for head page if we want to free the THP page using\n" + "migration_entry.\n" + "\n" + "It ends up discarding head page by madvise_free suddenly.\n" + "This patch fixes it by mark the head page PG_dirty when VM splits\n" + "the THP page.\n" + "\n" + "Signed-off-by: Minchan Kim <minchan@kernel.org>\n" + "---\n" + " mm/huge_memory.c | 1 +\n" + " 1 file changed, 1 insertion(+)\n" + "\n" + "diff --git a/mm/huge_memory.c b/mm/huge_memory.c\n" + "index adccfb48ce57..7fbbd42554a1 100644\n" + "--- a/mm/huge_memory.c\n" + "+++ b/mm/huge_memory.c\n" + "@@ -3258,6 +3258,7 @@ static void __split_huge_page(struct page *page, struct list_head *list)\n" + " \tatomic_sub(tail_mapcount, &head->_count);\n" + " \n" + " \tClearPageCompound(head);\n" + "+\tSetPageDirty(head);\n" + " \tspin_unlock_irq(&zone->lru_lock);\n" + " \n" + " \tunfreeze_page(page_anon_vma(head), head);\n" + "-- \n" + 1.9.1 -8349273f2d36a6410b0352274959cf6afcc389a68d7d6679abf0269aff4859d8 +4326ed3295ba63ea680835a46731000174ea894af1027df1857f98708ef4e121
This is an external index of several public inboxes, see mirroring instructions on how to clone and mirror all data and code used by this external index.