diff options
author | Hugh Dickins <hugh.dickins@tiscali.co.uk> | 2009-11-09 16:58:23 +0100 |
---|---|---|
committer | Linus Torvalds <torvalds@linux-foundation.org> | 2009-11-09 18:55:44 +0100 |
commit | d178f27fc5150d680d9df865ea9dfe3269cf00a6 (patch) | |
tree | c2e87a755ce78765a8dd7752d7608c57ace29bec /mm/ksm.c | |
parent | Merge branch 'for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/ryu... (diff) | |
download | linux-d178f27fc5150d680d9df865ea9dfe3269cf00a6.tar.xz linux-d178f27fc5150d680d9df865ea9dfe3269cf00a6.zip |
ksm: cond_resched in unstable tree
KSM needs a cond_resched() for CONFIG_PREEMPT_NONE, in its unbounded
search of the unstable tree. The stable tree cases already have one,
and originally there was one down inside get_user_pages();
but I missed it when I converted to follow_page() instead.
Signed-off-by: Hugh Dickins <hugh.dickins@tiscali.co.uk>
Acked-by: Izik Eidus <ieidus@redhat.com>
Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
Diffstat (limited to 'mm/ksm.c')
-rw-r--r-- | mm/ksm.c | 1 |
1 files changed, 1 insertions, 0 deletions
@@ -1012,6 +1012,7 @@ static struct rmap_item *unstable_tree_search_insert(struct page *page, struct rmap_item *tree_rmap_item; int ret; + cond_resched(); tree_rmap_item = rb_entry(*new, struct rmap_item, node); page2[0] = get_mergeable_page(tree_rmap_item); if (!page2[0]) |