diff options
author | Andrea Arcangeli <aarcange@redhat.com> | 2015-11-05 18:49:07 -0800 |
---|---|---|
committer | Ben Hutchings <ben@decadent.org.uk> | 2018-11-20 18:05:14 +0000 |
commit | b7715f434f46bcc36517d89d0fc9f4c8f80b57ef (patch) | |
tree | b0a0eb5407eff3bd2ace4887648cf9ad967de37d /mm/ksm.c | |
parent | a58e2a7a577dad00014fc9e4427a4d0e7997c81a (diff) | |
download | linux-stable-b7715f434f46bcc36517d89d0fc9f4c8f80b57ef.tar.gz linux-stable-b7715f434f46bcc36517d89d0fc9f4c8f80b57ef.tar.bz2 linux-stable-b7715f434f46bcc36517d89d0fc9f4c8f80b57ef.zip |
ksm: add cond_resched() to the rmap_walks
commit ad12695f177c3403a64348b42718faf9727fe358 upstream.
While at it add it to the file and anon walks too.
Signed-off-by: Andrea Arcangeli <aarcange@redhat.com>
Acked-by: Hugh Dickins <hughd@google.com>
Cc: Petr Holasek <pholasek@redhat.com>
Acked-by: Davidlohr Bueso <dbueso@suse.de>
Signed-off-by: Andrew Morton <akpm@linux-foundation.org>
Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
Signed-off-by: Ben Hutchings <ben@decadent.org.uk>
Diffstat (limited to 'mm/ksm.c')
-rw-r--r-- | mm/ksm.c | 2 |
1 files changed, 2 insertions, 0 deletions
@@ -1915,9 +1915,11 @@ again: struct anon_vma_chain *vmac; struct vm_area_struct *vma; + cond_resched(); anon_vma_lock_read(anon_vma); anon_vma_interval_tree_foreach(vmac, &anon_vma->rb_root, 0, ULONG_MAX) { + cond_resched(); vma = vmac->vma; if (rmap_item->address < vma->vm_start || rmap_item->address >= vma->vm_end) |