ANDROID: mm: page_pinner: add state of page_pinner
To keep track of page migration failures, record the following page states to capture natural state transitions of a page during migration: * detected * put reference count * free With such transition change, it was a lot easier to analyze page migration failure issues. Since we already have annotation on the put_page side, this patch adds the record in free path and page migration failure path. Bug: 192475091 Signed-off-by: Minchan Kim <minchan@google.com> Change-Id: I18182d3fd62850c5580c9e89a5362bdae630f153
This commit is contained in:
@@ -174,6 +174,8 @@ void __reset_page_pinner(struct page *page, unsigned int order, bool free)
|
||||
|
||||
page_pinner = get_page_pinner(page_ext);
|
||||
if (free) {
|
||||
/* record page free call path */
|
||||
__page_pinner_migration_failed(page);
|
||||
atomic_set(&page_pinner->count, 0);
|
||||
__clear_bit(PAGE_EXT_PINNER_MIGRATION_FAILED, &page_ext->flags);
|
||||
} else {
|
||||
@@ -363,6 +365,7 @@ void __page_pinner_mark_migration_failed_pages(struct list_head *page_list)
|
||||
if (unlikely(!page_ext))
|
||||
continue;
|
||||
__set_bit(PAGE_EXT_PINNER_MIGRATION_FAILED, &page_ext->flags);
|
||||
__page_pinner_migration_failed(page);
|
||||
}
|
||||
}
|
||||
|
||||
|
Reference in New Issue
Block a user