Skip to content

Commit

Permalink
---
Browse files Browse the repository at this point in the history
yaml
---
r: 356486
b: refs/heads/master
c: d778df5
h: refs/heads/master
v: v3
  • Loading branch information
Johannes Weiner authored and Linus Torvalds committed Feb 24, 2013
1 parent 59a7c02 commit a5aeb1e
Show file tree
Hide file tree
Showing 3 changed files with 8 additions and 6 deletions.
2 changes: 1 addition & 1 deletion [refs]
Original file line number Diff line number Diff line change
@@ -1,2 +1,2 @@
---
refs/heads/master: 7c5bd705d8f983ae1868a126956f5aa3a6702e3f
refs/heads/master: d778df51c09264076fe0208c099ef7d428f21790
2 changes: 1 addition & 1 deletion trunk/include/linux/swap.h
Original file line number Diff line number Diff line change
Expand Up @@ -156,7 +156,7 @@ enum {
SWP_SCANNING = (1 << 8), /* refcount in scan_swap_map */
};

#define SWAP_CLUSTER_MAX 32
#define SWAP_CLUSTER_MAX 32UL
#define COMPACT_CLUSTER_MAX SWAP_CLUSTER_MAX

/*
Expand Down
10 changes: 6 additions & 4 deletions trunk/mm/vmscan.c
Original file line number Diff line number Diff line change
Expand Up @@ -1761,15 +1761,17 @@ static void get_scan_count(struct lruvec *lruvec, struct scan_control *sc,
out:
for_each_evictable_lru(lru) {
int file = is_file_lru(lru);
unsigned long size;
unsigned long scan;

scan = get_lru_size(lruvec, lru);
size = get_lru_size(lruvec, lru);
if (sc->priority || noswap || !vmscan_swappiness(sc)) {
scan >>= sc->priority;
scan = size >> sc->priority;
if (!scan && force_scan)
scan = SWAP_CLUSTER_MAX;
scan = min(size, SWAP_CLUSTER_MAX);
scan = div64_u64(scan * fraction[file], denominator);
}
} else
scan = size;
nr[lru] = scan;
}
}
Expand Down

0 comments on commit a5aeb1e

Please sign in to comment.