swap.c (bc49a7831b1137ce1c2dda1c57e3631655f5d2ae) | swap.c (c55e8d035b28b2867e68b0e2d0eee2c0f1016b43) |
---|---|
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 --- 195 unchanged lines hidden (view full) --- 204 pagevec_reinit(pvec); 205} 206 207static void pagevec_move_tail_fn(struct page *page, struct lruvec *lruvec, 208 void *arg) 209{ 210 int *pgmoved = arg; 211 | 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 --- 195 unchanged lines hidden (view full) --- 204 pagevec_reinit(pvec); 205} 206 207static void pagevec_move_tail_fn(struct page *page, struct lruvec *lruvec, 208 void *arg) 209{ 210 int *pgmoved = arg; 211 |
212 if (PageLRU(page) && !PageActive(page) && !PageUnevictable(page)) { 213 enum lru_list lru = page_lru_base_type(page); 214 list_move_tail(&page->lru, &lruvec->lists[lru]); | 212 if (PageLRU(page) && !PageUnevictable(page)) { 213 del_page_from_lru_list(page, lruvec, page_lru(page)); 214 ClearPageActive(page); 215 add_page_to_lru_list_tail(page, lruvec, page_lru(page)); |
215 (*pgmoved)++; 216 } 217} 218 219/* 220 * pagevec_move_tail() must be called with IRQ disabled. 221 * Otherwise this may cause nasty races. 222 */ --- 7 unchanged lines hidden (view full) --- 230 231/* 232 * Writeback is about to end against a page which has been marked for immediate 233 * reclaim. If it still appears to be reclaimable, move it to the tail of the 234 * inactive list. 235 */ 236void rotate_reclaimable_page(struct page *page) 237{ | 216 (*pgmoved)++; 217 } 218} 219 220/* 221 * pagevec_move_tail() must be called with IRQ disabled. 222 * Otherwise this may cause nasty races. 223 */ --- 7 unchanged lines hidden (view full) --- 231 232/* 233 * Writeback is about to end against a page which has been marked for immediate 234 * reclaim. If it still appears to be reclaimable, move it to the tail of the 235 * inactive list. 236 */ 237void rotate_reclaimable_page(struct page *page) 238{ |
238 if (!PageLocked(page) && !PageDirty(page) && !PageActive(page) && | 239 if (!PageLocked(page) && !PageDirty(page) && |
239 !PageUnevictable(page) && PageLRU(page)) { 240 struct pagevec *pvec; 241 unsigned long flags; 242 243 get_page(page); 244 local_irq_save(flags); 245 pvec = this_cpu_ptr(&lru_rotate_pvecs); 246 if (!pagevec_add(pvec, page) || PageCompound(page)) --- 738 unchanged lines hidden --- | 240 !PageUnevictable(page) && PageLRU(page)) { 241 struct pagevec *pvec; 242 unsigned long flags; 243 244 get_page(page); 245 local_irq_save(flags); 246 pvec = this_cpu_ptr(&lru_rotate_pvecs); 247 if (!pagevec_add(pvec, page) || PageCompound(page)) --- 738 unchanged lines hidden --- |