swap.c (12d27107867fc7216e8faaff0b894b0f162dcf75) swap.c (2bcf887963812c075f80a14e1fad8ec7e1c67acf)
1/*
2 * linux/mm/swap.c
3 *
4 * Copyright (C) 1991, 1992, 1993, 1994 Linus Torvalds
5 */
6
7/*
8 * This file contains the default values for the operation of the

--- 9 unchanged lines hidden (view full) ---

18#include <linux/kernel_stat.h>
19#include <linux/swap.h>
20#include <linux/mman.h>
21#include <linux/pagemap.h>
22#include <linux/pagevec.h>
23#include <linux/init.h>
24#include <linux/export.h>
25#include <linux/mm_inline.h>
1/*
2 * linux/mm/swap.c
3 *
4 * Copyright (C) 1991, 1992, 1993, 1994 Linus Torvalds
5 */
6
7/*
8 * This file contains the default values for the operation of the

--- 9 unchanged lines hidden (view full) ---

18#include <linux/kernel_stat.h>
19#include <linux/swap.h>
20#include <linux/mman.h>
21#include <linux/pagemap.h>
22#include <linux/pagevec.h>
23#include <linux/init.h>
24#include <linux/export.h>
25#include <linux/mm_inline.h>
26#include <linux/buffer_head.h> /* for try_to_release_page() */
27#include <linux/percpu_counter.h>
28#include <linux/percpu.h>
29#include <linux/cpu.h>
30#include <linux/notifier.h>
31#include <linux/backing-dev.h>
32#include <linux/memcontrol.h>
33#include <linux/gfp.h>
34

--- 690 unchanged lines hidden (view full) ---

725{
726 VM_BUG_ON(is_unevictable_lru(lru));
727
728 pagevec_lru_move_fn(pvec, ____pagevec_lru_add_fn, (void *)lru);
729}
730
731EXPORT_SYMBOL(____pagevec_lru_add);
732
26#include <linux/percpu_counter.h>
27#include <linux/percpu.h>
28#include <linux/cpu.h>
29#include <linux/notifier.h>
30#include <linux/backing-dev.h>
31#include <linux/memcontrol.h>
32#include <linux/gfp.h>
33

--- 690 unchanged lines hidden (view full) ---

724{
725 VM_BUG_ON(is_unevictable_lru(lru));
726
727 pagevec_lru_move_fn(pvec, ____pagevec_lru_add_fn, (void *)lru);
728}
729
730EXPORT_SYMBOL(____pagevec_lru_add);
731
733/*
734 * Try to drop buffers from the pages in a pagevec
735 */
736void pagevec_strip(struct pagevec *pvec)
737{
738 int i;
739
740 for (i = 0; i < pagevec_count(pvec); i++) {
741 struct page *page = pvec->pages[i];
742
743 if (page_has_private(page) && trylock_page(page)) {
744 if (page_has_private(page))
745 try_to_release_page(page, 0);
746 unlock_page(page);
747 }
748 }
749}
750
751/**
752 * pagevec_lookup - gang pagecache lookup
753 * @pvec: Where the resulting pages are placed
754 * @mapping: The address_space to search
755 * @start: The starting page index
756 * @nr_pages: The maximum number of pages
757 *
758 * pagevec_lookup() will search for and return a group of up to @nr_pages pages

--- 48 unchanged lines hidden ---
732/**
733 * pagevec_lookup - gang pagecache lookup
734 * @pvec: Where the resulting pages are placed
735 * @mapping: The address_space to search
736 * @start: The starting page index
737 * @nr_pages: The maximum number of pages
738 *
739 * pagevec_lookup() will search for and return a group of up to @nr_pages pages

--- 48 unchanged lines hidden ---