diff options
Diffstat (limited to 'mm/vmscan.c')
-rw-r--r-- | mm/vmscan.c | 78 |
1 files changed, 0 insertions, 78 deletions
diff --git a/mm/vmscan.c b/mm/vmscan.c index 99082fa..08f11e2 100644 --- a/mm/vmscan.c +++ b/mm/vmscan.c @@ -770,9 +770,6 @@ static noinline_for_stack void free_page_list(struct list_head *free_pages) /* * shrink_page_list() returns the number of reclaimed pages */ -#ifndef CONFIG_ZRAM_FOR_ANDROID -static -#endif /* CONFIG_ZRAM_FOR_ANDROID */ unsigned long shrink_page_list(struct list_head *page_list, struct zone *zone, struct scan_control *sc) @@ -1279,9 +1276,6 @@ static unsigned long isolate_pages_global(unsigned long nr, * clear_active_flags() is a helper for shrink_active_list(), clearing * any active bits from the pages in the list. */ -#ifndef CONFIG_ZRAM_FOR_ANDROID -static -#endif /* CONFIG_ZRAM_FOR_ANDROID */ unsigned long clear_active_flags(struct list_head *page_list, unsigned int *count) { @@ -1352,40 +1346,6 @@ int isolate_lru_page(struct page *page) return ret; } -#ifdef CONFIG_ZRAM_FOR_ANDROID -/** - * isolate_lru_page_compcache - tries to isolate a page for compcache - * @page: page to isolate from its LRU list - * - * Isolates a @page from an LRU list, clears PageLRU,but - * does not adjusts the vmstat statistic - * Returns 0 if the page was removed from an LRU list. - * Returns -EBUSY if the page was not on an LRU list. - */ -int isolate_lru_page_compcache(struct page *page) -{ - int ret = -EBUSY; - - VM_BUG_ON(!page_count(page)); - - if (PageLRU(page)) { - struct zone *zone = page_zone(page); - - spin_lock_irq(&zone->lru_lock); - if (PageLRU(page)) { - int lru = page_lru(page); - ret = 0; - get_page(page); - ClearPageLRU(page); - list_del(&page->lru); - mem_cgroup_del_lru_list(page, lru); - } - spin_unlock_irq(&zone->lru_lock); - } - return ret; -} -#endif - /* * Are there way too many processes in the direct reclaim path already? */ @@ -1622,44 +1582,6 @@ shrink_inactive_list(unsigned long nr_to_scan, struct zone *zone, return nr_reclaimed; } -#ifdef CONFIG_ZRAM_FOR_ANDROID -unsigned long -zone_id_shrink_pagelist(struct zone *zone, struct list_head *page_list) -{ - unsigned long nr_reclaimed = 0; - unsigned long nr_anon; - unsigned long nr_file; - - struct scan_control sc = { - .gfp_mask = GFP_USER, - .may_writepage = 1, - .nr_to_reclaim = SWAP_CLUSTER_MAX, - .may_unmap = 1, - .may_swap = 1, - .swappiness = vm_swappiness, - .order = 0, - .mem_cgroup = NULL, - .nodemask = NULL, - }; - - spin_lock_irq(&zone->lru_lock); - - update_isolated_counts(zone, &sc, &nr_anon, &nr_file, page_list); - - spin_unlock_irq(&zone->lru_lock); - - nr_reclaimed = shrink_page_list(page_list, zone, &sc); - - __count_zone_vm_events(PGSTEAL, zone, nr_reclaimed); - - putback_lru_pages(zone, &sc, nr_anon, nr_file, page_list); - - return nr_reclaimed; -} - -EXPORT_SYMBOL(zone_id_shrink_pagelist); -#endif /* CONFIG_ZRAM_FOR_ANDROID */ - /* * This moves pages from the active list to the inactive list. * |