diff options
| author | KOSAKI Motohiro <[email protected]> | 2010-08-09 17:19:54 -0700 |
|---|---|---|
| committer | Linus Torvalds <[email protected]> | 2010-08-09 20:45:03 -0700 |
| commit | 4dc4b3d971b23e12d483ba9f3b93b648c54b298a (patch) | |
| tree | 845cc8debe146f683510841982323c338eb10000 /tools/perf/scripts/python/bin | |
| parent | 57250a5bf0f6ff68dc339572adbd881a11f366fa (diff) | |
vmscan: shrink_slab() requires the number of lru_pages, not the page order
Presently shrink_slab() has the following scanning equation.
lru_scanned max_pass
basic_scan_objects = 4 x ------------- x -----------------------------
lru_pages shrinker->seeks (default:2)
scan_objects = min(basic_scan_objects, max_pass * 2)
If we pass very small value as lru_pages instead real number of lru pages,
shrink_slab() drop much objects rather than necessary. And now,
__zone_reclaim() pass 'order' as lru_pages by mistake. That produces a
bad result.
For example, if we receive very low memory pressure (scan = 32, order =
0), shrink_slab() via zone_reclaim() always drop _all_ icache/dcache
objects. (see above equation, very small lru_pages make very big
scan_objects result).
This patch fixes it.
[[email protected]: fix layout, typos]
Signed-off-by: KOSAKI Motohiro <[email protected]>
Reviewed-by: Minchan Kim <[email protected]>
Acked-by: Christoph Lameter <[email protected]>
Acked-by: Rik van Riel <[email protected]>
Cc: Johannes Weiner <[email protected]>
Signed-off-by: Andrew Morton <[email protected]>
Signed-off-by: Linus Torvalds <[email protected]>
Diffstat (limited to 'tools/perf/scripts/python/bin')
0 files changed, 0 insertions, 0 deletions