mirror of
https://github.com/BobTheBlinker/android_kernel_motorola_sm6375.git
synced 2026-10-31 04:01:48 -04:00
mm: memcontrol: use page lists for uncharge batching
Pages are now uncharged at release time, and all sources of batched uncharges operate on lists of pages. Directly use those lists, and get rid of the per-task batching state. This also batches statistics accounting, in addition to the res counter charges, to reduce IRQ-disabling and re-enabling. Signed-off-by: Johannes Weiner <[email protected]> Acked-by: Michal Hocko <[email protected]> Cc: Hugh Dickins <[email protected]> Cc: Tejun Heo <[email protected]> Cc: Vladimir Davydov <[email protected]> Cc: Naoya Horiguchi <[email protected]> Cc: Vladimir Davydov <[email protected]> Signed-off-by: Andrew Morton <[email protected]> Signed-off-by: Linus Torvalds <[email protected]>
This commit is contained in:
parent
0a31bc97c8
commit
747db954ca
6 changed files with 117 additions and 129 deletions
|
|
@ -908,8 +908,6 @@ void release_pages(struct page **pages, int nr, bool cold)
|
|||
struct lruvec *lruvec;
|
||||
unsigned long uninitialized_var(flags);
|
||||
|
||||
mem_cgroup_uncharge_start();
|
||||
|
||||
for (i = 0; i < nr; i++) {
|
||||
struct page *page = pages[i];
|
||||
|
||||
|
|
@ -941,7 +939,6 @@ void release_pages(struct page **pages, int nr, bool cold)
|
|||
__ClearPageLRU(page);
|
||||
del_page_from_lru_list(page, lruvec, page_off_lru(page));
|
||||
}
|
||||
mem_cgroup_uncharge(page);
|
||||
|
||||
/* Clear Active bit in case of parallel mark_page_accessed */
|
||||
__ClearPageActive(page);
|
||||
|
|
@ -951,8 +948,7 @@ void release_pages(struct page **pages, int nr, bool cold)
|
|||
if (zone)
|
||||
spin_unlock_irqrestore(&zone->lru_lock, flags);
|
||||
|
||||
mem_cgroup_uncharge_end();
|
||||
|
||||
mem_cgroup_uncharge_list(&pages_to_free);
|
||||
free_hot_cold_page_list(&pages_to_free, cold);
|
||||
}
|
||||
EXPORT_SYMBOL(release_pages);
|
||||
|
|
|
|||
Loading…
Reference in a new issue