diff options
author | Hillf Danton <dhillf@gmail.com> | 2012-03-21 19:33:48 -0400 |
---|---|---|
committer | Linus Torvalds <torvalds@linux-foundation.org> | 2012-03-21 20:54:55 -0400 |
commit | 6131728914810a6c02e08750e13e45870101e862 (patch) | |
tree | d96768dccd30bc5c84cfd39594167efd6405782d /mm/vmscan.c | |
parent | c3f0327f8e9d7a503f0d64573c311eddd61f197d (diff) |
mm/vmscan.c: cleanup with s/reclaim_mode/isolate_mode/
With tons of reclaim_mode (defined as one field of struct scan_control)
already in the file, it is clearer to rename the local reclaim_mode when
setting up the isolation mode.
Signed-off-by: Hillf Danton <dhillf@gmail.com>
Acked-by: KAMEZAWA Hiroyuki <kamezawa.hiroyu@jp.fujitsu.com>
Acked-by: KOSAKI Motohiro <kosaki.motohiro@jp.fujitsu.com>
Reviewed-by: Rik van Riel <riel@redhat.com>
Cc: David Rientjes <rientjes@google.com>
Signed-off-by: Andrew Morton <akpm@linux-foundation.org>
Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
Diffstat (limited to 'mm/vmscan.c')
-rw-r--r-- | mm/vmscan.c | 18 |
1 files changed, 9 insertions, 9 deletions
diff --git a/mm/vmscan.c b/mm/vmscan.c index c52b23552659..61a66881235d 100644 --- a/mm/vmscan.c +++ b/mm/vmscan.c | |||
@@ -1509,7 +1509,7 @@ shrink_inactive_list(unsigned long nr_to_scan, struct mem_cgroup_zone *mz, | |||
1509 | unsigned long nr_file; | 1509 | unsigned long nr_file; |
1510 | unsigned long nr_dirty = 0; | 1510 | unsigned long nr_dirty = 0; |
1511 | unsigned long nr_writeback = 0; | 1511 | unsigned long nr_writeback = 0; |
1512 | isolate_mode_t reclaim_mode = ISOLATE_INACTIVE; | 1512 | isolate_mode_t isolate_mode = ISOLATE_INACTIVE; |
1513 | struct zone *zone = mz->zone; | 1513 | struct zone *zone = mz->zone; |
1514 | 1514 | ||
1515 | while (unlikely(too_many_isolated(zone, file, sc))) { | 1515 | while (unlikely(too_many_isolated(zone, file, sc))) { |
@@ -1522,20 +1522,20 @@ shrink_inactive_list(unsigned long nr_to_scan, struct mem_cgroup_zone *mz, | |||
1522 | 1522 | ||
1523 | set_reclaim_mode(priority, sc, false); | 1523 | set_reclaim_mode(priority, sc, false); |
1524 | if (sc->reclaim_mode & RECLAIM_MODE_LUMPYRECLAIM) | 1524 | if (sc->reclaim_mode & RECLAIM_MODE_LUMPYRECLAIM) |
1525 | reclaim_mode |= ISOLATE_ACTIVE; | 1525 | isolate_mode |= ISOLATE_ACTIVE; |
1526 | 1526 | ||
1527 | lru_add_drain(); | 1527 | lru_add_drain(); |
1528 | 1528 | ||
1529 | if (!sc->may_unmap) | 1529 | if (!sc->may_unmap) |
1530 | reclaim_mode |= ISOLATE_UNMAPPED; | 1530 | isolate_mode |= ISOLATE_UNMAPPED; |
1531 | if (!sc->may_writepage) | 1531 | if (!sc->may_writepage) |
1532 | reclaim_mode |= ISOLATE_CLEAN; | 1532 | isolate_mode |= ISOLATE_CLEAN; |
1533 | 1533 | ||
1534 | spin_lock_irq(&zone->lru_lock); | 1534 | spin_lock_irq(&zone->lru_lock); |
1535 | 1535 | ||
1536 | nr_taken = isolate_lru_pages(nr_to_scan, mz, &page_list, | 1536 | nr_taken = isolate_lru_pages(nr_to_scan, mz, &page_list, |
1537 | &nr_scanned, sc->order, | 1537 | &nr_scanned, sc->order, |
1538 | reclaim_mode, 0, file); | 1538 | isolate_mode, 0, file); |
1539 | if (global_reclaim(sc)) { | 1539 | if (global_reclaim(sc)) { |
1540 | zone->pages_scanned += nr_scanned; | 1540 | zone->pages_scanned += nr_scanned; |
1541 | if (current_is_kswapd()) | 1541 | if (current_is_kswapd()) |
@@ -1699,21 +1699,21 @@ static void shrink_active_list(unsigned long nr_to_scan, | |||
1699 | struct page *page; | 1699 | struct page *page; |
1700 | struct zone_reclaim_stat *reclaim_stat = get_reclaim_stat(mz); | 1700 | struct zone_reclaim_stat *reclaim_stat = get_reclaim_stat(mz); |
1701 | unsigned long nr_rotated = 0; | 1701 | unsigned long nr_rotated = 0; |
1702 | isolate_mode_t reclaim_mode = ISOLATE_ACTIVE; | 1702 | isolate_mode_t isolate_mode = ISOLATE_ACTIVE; |
1703 | struct zone *zone = mz->zone; | 1703 | struct zone *zone = mz->zone; |
1704 | 1704 | ||
1705 | lru_add_drain(); | 1705 | lru_add_drain(); |
1706 | 1706 | ||
1707 | if (!sc->may_unmap) | 1707 | if (!sc->may_unmap) |
1708 | reclaim_mode |= ISOLATE_UNMAPPED; | 1708 | isolate_mode |= ISOLATE_UNMAPPED; |
1709 | if (!sc->may_writepage) | 1709 | if (!sc->may_writepage) |
1710 | reclaim_mode |= ISOLATE_CLEAN; | 1710 | isolate_mode |= ISOLATE_CLEAN; |
1711 | 1711 | ||
1712 | spin_lock_irq(&zone->lru_lock); | 1712 | spin_lock_irq(&zone->lru_lock); |
1713 | 1713 | ||
1714 | nr_taken = isolate_lru_pages(nr_to_scan, mz, &l_hold, | 1714 | nr_taken = isolate_lru_pages(nr_to_scan, mz, &l_hold, |
1715 | &nr_scanned, sc->order, | 1715 | &nr_scanned, sc->order, |
1716 | reclaim_mode, 1, file); | 1716 | isolate_mode, 1, file); |
1717 | if (global_reclaim(sc)) | 1717 | if (global_reclaim(sc)) |
1718 | zone->pages_scanned += nr_scanned; | 1718 | zone->pages_scanned += nr_scanned; |
1719 | 1719 | ||