mirror of
https://git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git
synced 2025-01-12 00:00:00 +00:00
vmscan: kill unnecessary page flag test
The page_lru() already evaluate PageActive() and PageSwapBacked(). We don't need to re-evaluate it. Signed-off-by: KOSAKI Motohiro <kosaki.motohiro@jp.fujitsu.com> Reviewed-by: Johannes Weiner <hannes@cmpxchg.org> Cc: Rik van Riel <riel@redhat.com> Cc: Minchan Kim <minchan.kim@gmail.com> Cc: Mel Gorman <mel@csn.ul.ie> Cc: Wu Fengguang <fengguang.wu@intel.com> Signed-off-by: Andrew Morton <akpm@linux-foundation.org> Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
This commit is contained in:
parent
5205e56eea
commit
74a1c48fb4
@ -1208,8 +1208,8 @@ static unsigned long shrink_inactive_list(unsigned long max_scan,
|
|||||||
SetPageLRU(page);
|
SetPageLRU(page);
|
||||||
lru = page_lru(page);
|
lru = page_lru(page);
|
||||||
add_page_to_lru_list(zone, page, lru);
|
add_page_to_lru_list(zone, page, lru);
|
||||||
if (PageActive(page)) {
|
if (is_active_lru(lru)) {
|
||||||
int file = !!page_is_file_cache(page);
|
int file = !!is_file_lru(lru);
|
||||||
reclaim_stat->recent_rotated[file]++;
|
reclaim_stat->recent_rotated[file]++;
|
||||||
}
|
}
|
||||||
if (!pagevec_add(&pvec, page)) {
|
if (!pagevec_add(&pvec, page)) {
|
||||||
|
Loading…
x
Reference in New Issue
Block a user