mirror of
https://github.com/BobTheBlinker/android_kernel_motorola_sm6375.git
synced 2026-10-31 04:01:48 -04:00
ksm: add cond_resched() to the rmap_walks
While at it add it to the file and anon walks too. Signed-off-by: Andrea Arcangeli <[email protected]> Acked-by: Hugh Dickins <[email protected]> Cc: Petr Holasek <[email protected]> Acked-by: Davidlohr Bueso <[email protected]> Signed-off-by: Andrew Morton <[email protected]> Signed-off-by: Linus Torvalds <[email protected]>
This commit is contained in:
parent
df4065516b
commit
ad12695f17
2 changed files with 6 additions and 0 deletions
2
mm/ksm.c
2
mm/ksm.c
|
|
@ -1914,9 +1914,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)
|
||||
|
|
|
|||
Loading…
Reference in a new issue