linux-mm.kvack.org archive mirror
 help / color / mirror / Atom feed
* [PATCH] mm/hugetl.c: keep the page mapping info when free_huge_page() hit the VM_BUG_ON_PAGE
@ 2018-11-13 12:38 Yongkai Wu
  2018-11-13 13:04 ` Michal Hocko
  0 siblings, 1 reply; 8+ messages in thread
From: Yongkai Wu @ 2018-11-13 12:38 UTC (permalink / raw)
  To: mike.kravetz; +Cc: linux-mm, linux-kernel

[-- Attachment #1: Type: text/plain, Size: 843 bytes --]

It is better to keep page mapping info when free_huge_page() hit the
VM_BUG_ON_PAGE,
so we can get more infomation from the coredump for further analysis.

Signed-off-by: Yongkai Wu <nic_w@163.com>
---
 mm/hugetlb.c | 5 +++--
 1 file changed, 3 insertions(+), 2 deletions(-)

diff --git a/mm/hugetlb.c b/mm/hugetlb.c
index c007fb5..ba693bb 100644
--- a/mm/hugetlb.c
+++ b/mm/hugetlb.c
@@ -1248,10 +1248,11 @@ void free_huge_page(struct page *page)
  (struct hugepage_subpool *)page_private(page);
  bool restore_reserve;

+        VM_BUG_ON_PAGE(page_count(page), page);
+        VM_BUG_ON_PAGE(page_mapcount(page), page);
+
  set_page_private(page, 0);
  page->mapping = NULL;
- VM_BUG_ON_PAGE(page_count(page), page);
- VM_BUG_ON_PAGE(page_mapcount(page), page);
  restore_reserve = PagePrivate(page);
  ClearPagePrivate(page);

-- 
1.8.3.1

[-- Attachment #2: Type: text/html, Size: 1537 bytes --]

^ permalink raw reply related	[flat|nested] 8+ messages in thread

end of thread, other threads:[~2018-11-15  8:52 UTC | newest]

Thread overview: 8+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2018-11-13 12:38 [PATCH] mm/hugetl.c: keep the page mapping info when free_huge_page() hit the VM_BUG_ON_PAGE Yongkai Wu
2018-11-13 13:04 ` Michal Hocko
2018-11-13 15:12   ` Yongkai Wu
2018-11-13 15:24     ` Michal Hocko
2018-11-13 18:04     ` Mike Kravetz
2018-11-14 15:37       ` Yongkai Wu
2018-11-15  8:30       ` Yongkai Wu
2018-11-15  8:52         ` Michal Hocko

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).