Donate to e Foundation | Murena handsets with /e/OS | Own a part of Murena! Learn more

Commit 6f7c2e42 authored by Vinayak Menon's avatar Vinayak Menon
Browse files

mm: ksm: avoid trageted reclaim of ksm pages



Per Process Reclaim tries to avoid reclaiming of
shared pages by passing the target VMA. For anon and
file pages this works, but not for KSM. This is because
vma_address(page) will not return the intended value
resulting in crashes like this

[From 3.10 kernel]
kernel BUG at kernel/mm/rmap.c:534!
(vma_address+0x28/0x2c) from [<c01eff94>] (try_to_unmap_ksm+0x4c/0x170)
(try_to_unmap_ksm+0x4c/0x170) from [<c01e4834>] (try_to_unmap+0x34/0xa4)
(try_to_unmap+0x34/0xa4) from [<c01c8e64>] (shrink_page_list+0x3f0/0xa34)
(shrink_page_list+0x3f0/0xa34) from [<c01c9688>] (reclaim_pages_from_list+0xb0/0x100)
(reclaim_pages_from_list+0xb0/0x100) from [<c0240ed0>] (reclaim_pte_range+0xf0/0x164)
(reclaim_pte_range+0xf0/0x164) from [<c01e79a4>] (walk_page_range+0x1d0/0x260)
(walk_page_range+0x1d0/0x260) from [<c0241ccc>] (reclaim_task_anon+0xb0/0x114)
(reclaim_task_anon+0xb0/0x114) from [<c01f8d98>] (swap_fn+0x220/0x460)
(swap_fn+0x220/0x460) from [<c0133a38>] (process_one_work+0x294/0x430)
(process_one_work+0x294/0x430) from [<c0134720>] (worker_thread+0x224/0x358)
(worker_thread+0x224/0x358) from [<c01390d4>] (kthread+0xa0/0xac)
(kthread+0xa0/0xac) from [<c0105f38>] (ret_from_fork+0x14/0x3c)

CRs-Fixed: 984947
Change-Id: I5208fb68372f7af72868e39399bf545fb7b774f3
Signed-off-by: default avatarVinayak Menon <vinmenon@codeaurora.org>
parent 99d7b718
Loading
Loading
Loading
Loading
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment