aboutsummaryrefslogtreecommitdiff
path: root/include/linux/raid_class.h
diff options
context:
space:
mode:
authorAndrea Arcangeli <aarcange@redhat.com>2015-11-05 18:49:10 -0800
committerMister Oyster <oysterized@gmail.com>2017-04-11 10:57:17 +0200
commit90da749f224bec8b37810e160aa1b8eed5c4e0b2 (patch)
treecd17d35526dcea0ef1f33f694f9a58f563c19f17 /include/linux/raid_class.h
parentbc2dd250fe9d1b2034b66a3d9ead632946966503 (diff)
ksm: don't fail stable tree lookups if walking over stale stable_nodes
The stable_nodes can become stale at any time if the underlying pages gets freed. The stable_node gets collected and removed from the stable rbtree if that is detected during the rbtree lookups. Don't fail the lookup if running into stale stable_nodes, just restart the lookup after collecting the stale stable_nodes. Otherwise the CPU spent in the preparation stage is wasted and the lookup must be repeated at the next loop potentially failing a second time in a second stale stable_node. If we don't prune aggressively we delay the merging of the unstable node candidates and at the same time we delay the freeing of the stale stable_nodes. Keeping stale stable_nodes around wastes memory and it can't provide any benefit. Signed-off-by: Andrea Arcangeli <aarcange@redhat.com> Acked-by: Hugh Dickins <hughd@google.com> Cc: Petr Holasek <pholasek@redhat.com> Signed-off-by: Andrew Morton <akpm@linux-foundation.org> Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org> Signed-off-by: Joe Maples <joe@frap129.org>
Diffstat (limited to 'include/linux/raid_class.h')
0 files changed, 0 insertions, 0 deletions