diff options
author | Miaohe Lin <linmiaohe@huawei.com> | 2021-02-25 17:18:03 -0800 |
---|---|---|
committer | Linus Torvalds <torvalds@linux-foundation.org> | 2021-02-26 09:41:01 -0800 |
commit | b7e188ec98b1644ff70a6d3624ea16aadc39f5e0 (patch) | |
tree | 9748f1bbea91d5de3e7bfd83c3788e9dcca786f5 /mm/truncate.c | |
parent | 90aaca852ca13a6c962b25964fb6678120f266b1 (diff) |
mm/rmap: use page_not_mapped in try_to_unmap()
page_mapcount_is_zero() calculates accurately how many mappings a hugepage
has in order to check against 0 only. This is a waste of cpu time. We
can do this via page_not_mapped() to save some possible atomic_read
cycles. Remove the function page_mapcount_is_zero() as it's not used
anymore and move page_not_mapped() above try_to_unmap() to avoid
identifier undeclared compilation error.
Link: https://lkml.kernel.org/r/20210130084904.35307-1-linmiaohe@huawei.com
Signed-off-by: Miaohe Lin <linmiaohe@huawei.com>
Signed-off-by: Andrew Morton <akpm@linux-foundation.org>
Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
Diffstat (limited to 'mm/truncate.c')
0 files changed, 0 insertions, 0 deletions