Skip to content

Commit

Permalink
ANDROID: adjust vendor hook to control blk_plug
Browse files Browse the repository at this point in the history
We shouldn't hold lru_lock to proceed blk_finish_plug.

Fixes: 89fed37 ("ANDROID: vendor hook to control blk_plug for shrink_lruvec")
Bug: 255471591
Change-Id: Ie9d9b0e4ee76b4735e802b2a202fbb79d0ae090e
Signed-off-by: Martin Liu <[email protected]>
  • Loading branch information
Martin Liu committed Nov 15, 2022
1 parent da7bcb7 commit b4b4c3c
Showing 1 changed file with 3 additions and 2 deletions.
5 changes: 3 additions & 2 deletions mm/vmscan.c
Original file line number Diff line number Diff line change
Expand Up @@ -2051,8 +2051,6 @@ shrink_inactive_list(unsigned long nr_to_scan, struct lruvec *lruvec,
spin_lock_irq(&pgdat->lru_lock);

move_pages_to_lru(lruvec, &page_list);
if (do_plug)
blk_finish_plug(&plug);

__mod_node_page_state(pgdat, NR_ISOLATED_ANON + file, -nr_taken);
lru_note_cost(lruvec, file, stat.nr_pageout);
Expand All @@ -2064,6 +2062,9 @@ shrink_inactive_list(unsigned long nr_to_scan, struct lruvec *lruvec,

spin_unlock_irq(&pgdat->lru_lock);

if (do_plug)
blk_finish_plug(&plug);

mem_cgroup_uncharge_list(&page_list);
free_unref_page_list(&page_list);

Expand Down

0 comments on commit b4b4c3c

Please sign in to comment.