ANDROID: avoid huge-page not to clear trylock-bit after shrink_page_list.

Clearing trylock-bit of page shrinked by shrnk_page_list in advance
which avoids huge-page not to clear trylock-bit after shrink_page_list.

Fixes: 1f8f6d59a2 ("ANDROID: vendor_hook: Add hook to not be stuck ro rmap lock in kswapd or direct_reclaim")

Bug: 240003372
Signed-off-by: Peifeng Li <lipeifeng@oppo.com>
Change-Id: Iac4d60ec3497d9bb7ba1f001a5c08a604daf4f5a
This commit is contained in:
Peifeng Li
2022-08-22 18:21:29 +08:00
committed by Treehugger Robot
parent 548da5d23d
commit 9ecb2fcca3

View File

@@ -1490,12 +1490,11 @@ free_it:
* Is there need to periodically free_page_list? It would
* appear not as the counts should be low
*/
trace_android_vh_page_trylock_clear(page);
if (unlikely(PageTransHuge(page)))
destroy_compound_page(page);
else {
trace_android_vh_page_trylock_clear(page);
else
list_add(&page->lru, &free_pages);
}
continue;
activate_locked_split: