|
@@ -1920,7 +1920,7 @@ static void get_scan_count(struct mem_cgroup_zone *mz, struct scan_control *sc,
|
|
unsigned long ap, fp;
|
|
unsigned long ap, fp;
|
|
struct zone_reclaim_stat *reclaim_stat = get_reclaim_stat(mz);
|
|
struct zone_reclaim_stat *reclaim_stat = get_reclaim_stat(mz);
|
|
u64 fraction[2], denominator;
|
|
u64 fraction[2], denominator;
|
|
- enum lru_list l;
|
|
|
|
|
|
+ enum lru_list lru;
|
|
int noswap = 0;
|
|
int noswap = 0;
|
|
bool force_scan = false;
|
|
bool force_scan = false;
|
|
|
|
|
|
@@ -2010,18 +2010,18 @@ static void get_scan_count(struct mem_cgroup_zone *mz, struct scan_control *sc,
|
|
fraction[1] = fp;
|
|
fraction[1] = fp;
|
|
denominator = ap + fp + 1;
|
|
denominator = ap + fp + 1;
|
|
out:
|
|
out:
|
|
- for_each_evictable_lru(l) {
|
|
|
|
- int file = is_file_lru(l);
|
|
|
|
|
|
+ for_each_evictable_lru(lru) {
|
|
|
|
+ int file = is_file_lru(lru);
|
|
unsigned long scan;
|
|
unsigned long scan;
|
|
|
|
|
|
- scan = zone_nr_lru_pages(mz, l);
|
|
|
|
|
|
+ scan = zone_nr_lru_pages(mz, lru);
|
|
if (priority || noswap) {
|
|
if (priority || noswap) {
|
|
scan >>= priority;
|
|
scan >>= priority;
|
|
if (!scan && force_scan)
|
|
if (!scan && force_scan)
|
|
scan = SWAP_CLUSTER_MAX;
|
|
scan = SWAP_CLUSTER_MAX;
|
|
scan = div64_u64(scan * fraction[file], denominator);
|
|
scan = div64_u64(scan * fraction[file], denominator);
|
|
}
|
|
}
|
|
- nr[l] = scan;
|
|
|
|
|
|
+ nr[lru] = scan;
|
|
}
|
|
}
|
|
}
|
|
}
|
|
|
|
|
|
@@ -2097,7 +2097,7 @@ static void shrink_mem_cgroup_zone(int priority, struct mem_cgroup_zone *mz,
|
|
{
|
|
{
|
|
unsigned long nr[NR_LRU_LISTS];
|
|
unsigned long nr[NR_LRU_LISTS];
|
|
unsigned long nr_to_scan;
|
|
unsigned long nr_to_scan;
|
|
- enum lru_list l;
|
|
|
|
|
|
+ enum lru_list lru;
|
|
unsigned long nr_reclaimed, nr_scanned;
|
|
unsigned long nr_reclaimed, nr_scanned;
|
|
unsigned long nr_to_reclaim = sc->nr_to_reclaim;
|
|
unsigned long nr_to_reclaim = sc->nr_to_reclaim;
|
|
struct blk_plug plug;
|
|
struct blk_plug plug;
|
|
@@ -2110,13 +2110,13 @@ restart:
|
|
blk_start_plug(&plug);
|
|
blk_start_plug(&plug);
|
|
while (nr[LRU_INACTIVE_ANON] || nr[LRU_ACTIVE_FILE] ||
|
|
while (nr[LRU_INACTIVE_ANON] || nr[LRU_ACTIVE_FILE] ||
|
|
nr[LRU_INACTIVE_FILE]) {
|
|
nr[LRU_INACTIVE_FILE]) {
|
|
- for_each_evictable_lru(l) {
|
|
|
|
- if (nr[l]) {
|
|
|
|
|
|
+ for_each_evictable_lru(lru) {
|
|
|
|
+ if (nr[lru]) {
|
|
nr_to_scan = min_t(unsigned long,
|
|
nr_to_scan = min_t(unsigned long,
|
|
- nr[l], SWAP_CLUSTER_MAX);
|
|
|
|
- nr[l] -= nr_to_scan;
|
|
|
|
|
|
+ nr[lru], SWAP_CLUSTER_MAX);
|
|
|
|
+ nr[lru] -= nr_to_scan;
|
|
|
|
|
|
- nr_reclaimed += shrink_list(l, nr_to_scan,
|
|
|
|
|
|
+ nr_reclaimed += shrink_list(lru, nr_to_scan,
|
|
mz, sc, priority);
|
|
mz, sc, priority);
|
|
}
|
|
}
|
|
}
|
|
}
|