diff options
| author | KOSAKI Motohiro <[email protected]> | 2010-05-24 14:31:48 -0700 |
|---|---|---|
| committer | Linus Torvalds <[email protected]> | 2010-05-25 08:06:56 -0700 |
| commit | e9d6c157385e4efa61cb8293e425c9d8beba70d3 (patch) | |
| tree | fca2452b46328c9005b8a4043a22b7b1b4d47d0c /tools/perf/scripts/python/Perf-Trace-Util/Context.c | |
| parent | 1f0a738868cbfe20ae53a00b7c302c04ef7ab8fc (diff) | |
tmpfs: insert tmpfs cache pages to inactive list at first
Shaohua Li reported parallel file copy on tmpfs can lead to OOM killer.
This is regression of caused by commit 9ff473b9a7 ("vmscan: evict
streaming IO first"). Wow, It is 2 years old patch!
Currently, tmpfs file cache is inserted active list at first. This means
that the insertion doesn't only increase numbers of pages in anon LRU, but
it also reduces anon scanning ratio. Therefore, vmscan will get totally
confused. It scans almost only file LRU even though the system has plenty
unused tmpfs pages.
Historically, lru_cache_add_active_anon() was used for two reasons.
1) Intend to priotize shmem page rather than regular file cache.
2) Intend to avoid reclaim priority inversion of used once pages.
But we've lost both motivation because (1) Now we have separate anon and
file LRU list. then, to insert active list doesn't help such priotize.
(2) In past, one pte access bit will cause page activation. then to
insert inactive list with pte access bit mean higher priority than to
insert active list. Its priority inversion may lead to uninteded lru
chun. but it was already solved by commit 645747462 (vmscan: detect
mapped file pages used only once). (Thanks Hannes, you are great!)
Thus, now we can use lru_cache_add_anon() instead.
Signed-off-by: KOSAKI Motohiro <[email protected]>
Reported-by: Shaohua Li <[email protected]>
Reviewed-by: Wu Fengguang <[email protected]>
Reviewed-by: Johannes Weiner <[email protected]>
Reviewed-by: Rik van Riel <[email protected]>
Reviewed-by: Minchan Kim <[email protected]>
Acked-by: Hugh Dickins <[email protected]>
Cc: Henrique de Moraes Holschuh <[email protected]>
Cc: <[email protected]>
Signed-off-by: Andrew Morton <[email protected]>
Signed-off-by: Linus Torvalds <[email protected]>
Diffstat (limited to 'tools/perf/scripts/python/Perf-Trace-Util/Context.c')
0 files changed, 0 insertions, 0 deletions