]> git.ipfire.org Git - thirdparty/linux.git/commit
mm, hwpoison: avoid unneeded page_mapped_in_vma() overhead in collect_procs_anon()
authorMiaohe Lin <linmiaohe@huawei.com>
Tue, 30 Aug 2022 12:36:02 +0000 (20:36 +0800)
committerAndrew Morton <akpm@linux-foundation.org>
Tue, 27 Sep 2022 02:46:04 +0000 (19:46 -0700)
commit36537a67d3561bfe2b3654161d6c9008fff84d43
treee934fba765591216b9d95fbde6f99f2d9e728488
parent21c9e90ab9a4c991d21dd15cc5163c99a885d4a8
mm, hwpoison: avoid unneeded page_mapped_in_vma() overhead in collect_procs_anon()

If vma->vm_mm != t->mm, there's no need to call page_mapped_in_vma() as
add_to_kill() won't be called in this case. Move up the mm check to avoid
possible unneeded calling to page_mapped_in_vma().

Link: https://lkml.kernel.org/r/20220830123604.25763-5-linmiaohe@huawei.com
Signed-off-by: Miaohe Lin <linmiaohe@huawei.com>
Acked-by: Naoya Horiguchi <naoya.horiguchi@nec.com>
Signed-off-by: Andrew Morton <akpm@linux-foundation.org>
mm/memory-failure.c