Merge 5.9-rc6 into android-mainline
Linux 5.9-rc6 Signed-off-by: Greg Kroah-Hartman <gregkh@google.com> Change-Id: I3bccdbb773bfc2c604742e6ff5983bf0b61ba0b5
此提交包含在:
24
mm/mlock.c
24
mm/mlock.c
@@ -58,11 +58,14 @@ EXPORT_SYMBOL(can_do_mlock);
|
||||
*/
|
||||
void clear_page_mlock(struct page *page)
|
||||
{
|
||||
int nr_pages;
|
||||
|
||||
if (!TestClearPageMlocked(page))
|
||||
return;
|
||||
|
||||
mod_zone_page_state(page_zone(page), NR_MLOCK, -thp_nr_pages(page));
|
||||
count_vm_event(UNEVICTABLE_PGCLEARED);
|
||||
nr_pages = thp_nr_pages(page);
|
||||
mod_zone_page_state(page_zone(page), NR_MLOCK, -nr_pages);
|
||||
count_vm_events(UNEVICTABLE_PGCLEARED, nr_pages);
|
||||
/*
|
||||
* The previous TestClearPageMlocked() corresponds to the smp_mb()
|
||||
* in __pagevec_lru_add_fn().
|
||||
@@ -76,7 +79,7 @@ void clear_page_mlock(struct page *page)
|
||||
* We lost the race. the page already moved to evictable list.
|
||||
*/
|
||||
if (PageUnevictable(page))
|
||||
count_vm_event(UNEVICTABLE_PGSTRANDED);
|
||||
count_vm_events(UNEVICTABLE_PGSTRANDED, nr_pages);
|
||||
}
|
||||
}
|
||||
|
||||
@@ -93,9 +96,10 @@ void mlock_vma_page(struct page *page)
|
||||
VM_BUG_ON_PAGE(PageCompound(page) && PageDoubleMap(page), page);
|
||||
|
||||
if (!TestSetPageMlocked(page)) {
|
||||
mod_zone_page_state(page_zone(page), NR_MLOCK,
|
||||
thp_nr_pages(page));
|
||||
count_vm_event(UNEVICTABLE_PGMLOCKED);
|
||||
int nr_pages = thp_nr_pages(page);
|
||||
|
||||
mod_zone_page_state(page_zone(page), NR_MLOCK, nr_pages);
|
||||
count_vm_events(UNEVICTABLE_PGMLOCKED, nr_pages);
|
||||
if (!isolate_lru_page(page))
|
||||
putback_lru_page(page);
|
||||
}
|
||||
@@ -138,7 +142,7 @@ static void __munlock_isolated_page(struct page *page)
|
||||
|
||||
/* Did try_to_unlock() succeed or punt? */
|
||||
if (!PageMlocked(page))
|
||||
count_vm_event(UNEVICTABLE_PGMUNLOCKED);
|
||||
count_vm_events(UNEVICTABLE_PGMUNLOCKED, thp_nr_pages(page));
|
||||
|
||||
putback_lru_page(page);
|
||||
}
|
||||
@@ -154,10 +158,12 @@ static void __munlock_isolated_page(struct page *page)
|
||||
*/
|
||||
static void __munlock_isolation_failed(struct page *page)
|
||||
{
|
||||
int nr_pages = thp_nr_pages(page);
|
||||
|
||||
if (PageUnevictable(page))
|
||||
__count_vm_event(UNEVICTABLE_PGSTRANDED);
|
||||
__count_vm_events(UNEVICTABLE_PGSTRANDED, nr_pages);
|
||||
else
|
||||
__count_vm_event(UNEVICTABLE_PGMUNLOCKED);
|
||||
__count_vm_events(UNEVICTABLE_PGMUNLOCKED, nr_pages);
|
||||
}
|
||||
|
||||
/**
|
||||
|
新增問題並參考
封鎖使用者