aboutsummaryrefslogtreecommitdiff
path: root/tools/perf/util/trace-event-scripting.c
diff options
context:
space:
mode:
authorJan Kara <[email protected]>2012-11-26 16:29:51 -0800
committerLinus Torvalds <[email protected]>2012-11-26 17:41:24 -0800
commit4eff96dd5283a102e0c1cac95247090be74a38ed (patch)
treef874a34c9048a35639c1597150d7984bd0f5c152 /tools/perf/util/trace-event-scripting.c
parent50694c28f1e1dbea18272980d265742a5027fb63 (diff)
writeback: put unused inodes to LRU after writeback completion
Commit 169ebd90131b ("writeback: Avoid iput() from flusher thread") removed iget-iput pair from inode writeback. As a side effect, inodes that are dirty during iput_final() call won't be ever added to inode LRU (iput_final() doesn't add dirty inodes to LRU and later when the inode is cleaned there's noone to add the inode there). Thus inodes are effectively unreclaimable until someone looks them up again. The practical effect of this bug is limited by the fact that inodes are pinned by a dentry for long enough that the inode gets cleaned. But still the bug can have nasty consequences leading up to OOM conditions under certain circumstances. Following can easily reproduce the problem: for (( i = 0; i < 1000; i++ )); do mkdir $i for (( j = 0; j < 1000; j++ )); do touch $i/$j echo 2 > /proc/sys/vm/drop_caches done done then one needs to run 'sync; ls -lR' to make inodes reclaimable again. We fix the issue by inserting unused clean inodes into the LRU after writeback finishes in inode_sync_complete(). Signed-off-by: Jan Kara <[email protected]> Reported-by: OGAWA Hirofumi <[email protected]> Cc: Al Viro <[email protected]> Cc: OGAWA Hirofumi <[email protected]> Cc: Wu Fengguang <[email protected]> Cc: Dave Chinner <[email protected]> Cc: <[email protected]> [3.5+] Signed-off-by: Andrew Morton <[email protected]> Signed-off-by: Linus Torvalds <[email protected]>
Diffstat (limited to 'tools/perf/util/trace-event-scripting.c')
0 files changed, 0 insertions, 0 deletions