ANDROID: mm: page_pinner: report test_page_isolation_failure
Sometimes, alloc_contig_range fails at test_pages_isolated. Report the failed page to page_pinner for tracking them to be able to investigate it. Bug: 192475091 Signed-off-by: Minchan Kim <minchan@google.com> Change-Id: Ifcb913faa87a131915efd72848e6ca59c15b75b4
This commit is contained in:
@@ -47,6 +47,14 @@ static inline void page_pinner_put_page(struct page *page)
|
||||
__page_pinner_migration_failed(page);
|
||||
}
|
||||
|
||||
static inline void page_pinner_failure_detect(struct page *page)
|
||||
{
|
||||
if (!static_branch_unlikely(&failure_tracking))
|
||||
return;
|
||||
|
||||
__page_pinner_migration_failed(page);
|
||||
}
|
||||
|
||||
static inline void page_pinner_mark_migration_failed_pages(struct list_head *page_list)
|
||||
{
|
||||
if (!static_branch_unlikely(&failure_tracking))
|
||||
@@ -70,6 +78,9 @@ static inline void dump_page_pinner(struct page *page)
|
||||
static inline void page_pinner_put_page(struct page *page)
|
||||
{
|
||||
}
|
||||
static inline void page_pinner_failure_detect(struct page *page)
|
||||
{
|
||||
}
|
||||
static inline void page_pinner_mark_migration_failed_pages(struct list_head *page_list)
|
||||
{
|
||||
}
|
||||
|
@@ -308,6 +308,10 @@ int test_pages_isolated(unsigned long start_pfn, unsigned long end_pfn,
|
||||
spin_unlock_irqrestore(&zone->lock, flags);
|
||||
|
||||
trace_test_pages_isolated(start_pfn, end_pfn, pfn);
|
||||
if (pfn < end_pfn) {
|
||||
page_pinner_failure_detect(pfn_to_page(pfn));
|
||||
return -EBUSY;
|
||||
}
|
||||
|
||||
return pfn < end_pfn ? -EBUSY : 0;
|
||||
return 0;
|
||||
}
|
||||
|
Reference in New Issue
Block a user