mirror of
https://github.com/BobTheBlinker/android_kernel_motorola_sm6375.git
synced 2026-10-07 04:12:04 -04:00
LUR: Revert "BACKPORT: mm: don't pass "enum lru_list" to lru list addition functions"
The LRU function is not compatible with GKI, causing GKI to fail to start, so revert. This reverts commit 34909e452db7c4eacb96d5faa4a070d4bf26985b. Change-Id: I79aa270fe5e4620bde28824d7c90f3c38d491e67 Reviewed-on: https://gerrit.mot.com/2609770 SME-Granted: SME Approvals Granted SLTApproved: Slta Waiver Tested-by: Jira Key Reviewed-by: Xiangpo Zhao <zhaoxp3@motorola.com> Submit-Approved: Jira Key
This commit is contained in:
parent
efefa59fcb
commit
15869d4f25
4 changed files with 17 additions and 17 deletions
|
|
@ -105,19 +105,15 @@ static __always_inline enum lru_list page_lru(struct page *page)
|
|||
}
|
||||
|
||||
static __always_inline void add_page_to_lru_list(struct page *page,
|
||||
struct lruvec *lruvec)
|
||||
struct lruvec *lruvec, enum lru_list lru)
|
||||
{
|
||||
enum lru_list lru = page_lru(page);
|
||||
|
||||
update_lru_size(lruvec, lru, page_zonenum(page), hpage_nr_pages(page));
|
||||
list_add(&page->lru, &lruvec->lists[lru]);
|
||||
}
|
||||
|
||||
static __always_inline void add_page_to_lru_list_tail(struct page *page,
|
||||
struct lruvec *lruvec)
|
||||
struct lruvec *lruvec, enum lru_list lru)
|
||||
{
|
||||
enum lru_list lru = page_lru(page);
|
||||
|
||||
update_lru_size(lruvec, lru, page_zonenum(page), hpage_nr_pages(page));
|
||||
list_add_tail(&page->lru, &lruvec->lists[lru]);
|
||||
}
|
||||
|
|
|
|||
|
|
@ -2757,7 +2757,7 @@ static void unlock_page_lru(struct page *page, int isolated)
|
|||
lruvec = mem_cgroup_page_lruvec(page, pgdat);
|
||||
VM_BUG_ON_PAGE(PageLRU(page), page);
|
||||
SetPageLRU(page);
|
||||
add_page_to_lru_list(page, lruvec);
|
||||
add_page_to_lru_list(page, lruvec, page_lru(page));
|
||||
}
|
||||
spin_unlock_irq(&pgdat->lru_lock);
|
||||
}
|
||||
|
|
|
|||
18
mm/swap.c
18
mm/swap.c
|
|
@ -224,7 +224,7 @@ static void pagevec_move_tail_fn(struct page *page, struct lruvec *lruvec,
|
|||
if (PageLRU(page) && !PageUnevictable(page)) {
|
||||
del_page_from_lru_list(page, lruvec, page_lru(page));
|
||||
ClearPageActive(page);
|
||||
add_page_to_lru_list_tail(page, lruvec);
|
||||
add_page_to_lru_list_tail(page, lruvec, page_lru(page));
|
||||
(*pgmoved)++;
|
||||
}
|
||||
}
|
||||
|
|
@ -281,7 +281,8 @@ static void __activate_page(struct page *page, struct lruvec *lruvec,
|
|||
|
||||
del_page_from_lru_list(page, lruvec, lru);
|
||||
SetPageActive(page);
|
||||
add_page_to_lru_list(page, lruvec);
|
||||
lru += LRU_ACTIVE;
|
||||
add_page_to_lru_list(page, lruvec, lru);
|
||||
trace_mm_lru_activate(page);
|
||||
|
||||
__count_vm_event(PGACTIVATE);
|
||||
|
|
@ -522,14 +523,14 @@ static void lru_deactivate_file_fn(struct page *page, struct lruvec *lruvec,
|
|||
* It can make readahead confusing. But race window
|
||||
* is _really_ small and it's non-critical problem.
|
||||
*/
|
||||
add_page_to_lru_list(page, lruvec);
|
||||
add_page_to_lru_list(page, lruvec, lru);
|
||||
SetPageReclaim(page);
|
||||
} else {
|
||||
/*
|
||||
* The page's writeback ends up during pagevec
|
||||
* We moves tha page into tail of inactive.
|
||||
*/
|
||||
add_page_to_lru_list_tail(page, lruvec);
|
||||
add_page_to_lru_list_tail(page, lruvec, lru);
|
||||
__count_vm_event(PGROTATED);
|
||||
}
|
||||
|
||||
|
|
@ -548,7 +549,7 @@ static void lru_deactivate_fn(struct page *page, struct lruvec *lruvec,
|
|||
del_page_from_lru_list(page, lruvec, lru + LRU_ACTIVE);
|
||||
ClearPageActive(page);
|
||||
ClearPageReferenced(page);
|
||||
add_page_to_lru_list(page, lruvec);
|
||||
add_page_to_lru_list(page, lruvec, lru);
|
||||
|
||||
__count_vm_events(PGDEACTIVATE, hpage_nr_pages(page));
|
||||
update_page_reclaim_stat(lruvec, file, 0);
|
||||
|
|
@ -572,7 +573,7 @@ static void lru_lazyfree_fn(struct page *page, struct lruvec *lruvec,
|
|||
* pages
|
||||
*/
|
||||
ClearPageSwapBacked(page);
|
||||
add_page_to_lru_list(page, lruvec);
|
||||
add_page_to_lru_list(page, lruvec, LRU_INACTIVE_FILE);
|
||||
|
||||
__count_vm_events(PGLAZYFREE, hpage_nr_pages(page));
|
||||
count_memcg_page_event(page, PGLAZYFREE);
|
||||
|
|
@ -890,7 +891,8 @@ void lru_add_page_tail(struct page *page, struct page *page_tail,
|
|||
* Put page_tail on the list at the correct position
|
||||
* so they all end up in order.
|
||||
*/
|
||||
add_page_to_lru_list_tail(page_tail, lruvec);
|
||||
add_page_to_lru_list_tail(page_tail, lruvec,
|
||||
page_lru(page_tail));
|
||||
}
|
||||
|
||||
if (!PageUnevictable(page))
|
||||
|
|
@ -949,7 +951,7 @@ static void __pagevec_lru_add_fn(struct page *page, struct lruvec *lruvec,
|
|||
count_vm_event(UNEVICTABLE_PGCULLED);
|
||||
}
|
||||
|
||||
add_page_to_lru_list(page, lruvec);
|
||||
add_page_to_lru_list(page, lruvec, lru);
|
||||
trace_mm_lru_insertion(page, lru);
|
||||
}
|
||||
|
||||
|
|
|
|||
|
|
@ -1965,7 +1965,7 @@ static unsigned noinline_for_stack move_pages_to_lru(struct lruvec *lruvec,
|
|||
|
||||
SetPageLRU(page);
|
||||
lru = page_lru(page);
|
||||
add_page_to_lru_list(page, lruvec);
|
||||
add_page_to_lru_list(page, lruvec, lru);
|
||||
|
||||
if (put_page_testzero(page)) {
|
||||
__ClearPageLRU(page);
|
||||
|
|
@ -4566,10 +4566,12 @@ void check_move_unevictable_pages(struct pagevec *pvec)
|
|||
continue;
|
||||
|
||||
if (page_evictable(page)) {
|
||||
enum lru_list lru = page_lru_base_type(page);
|
||||
|
||||
VM_BUG_ON_PAGE(PageActive(page), page);
|
||||
ClearPageUnevictable(page);
|
||||
del_page_from_lru_list(page, lruvec, LRU_UNEVICTABLE);
|
||||
add_page_to_lru_list(page, lruvec);
|
||||
add_page_to_lru_list(page, lruvec, lru);
|
||||
pgrescued++;
|
||||
}
|
||||
}
|
||||
|
|
|
|||
Loading…
Reference in a new issue