mm/memory_hotplug: avoid calling zone_intersects() for ZONE_NORMAL
authorMiaohe Lin <linmiaohe@huawei.com>
Wed, 16 Feb 2022 04:31:32 +0000 (15:31 +1100)
committerStephen Rothwell <sfr@canb.auug.org.au>
Thu, 17 Feb 2022 03:46:37 +0000 (14:46 +1100)
commit8eeb155213950af4a52ad3e1011d40ac8da2e0dc
treeb6b061be82d595a4d657db5797d495474c11bb46
parentcb8f416b647065ee5b048a9a01363f87cee9c252
mm/memory_hotplug: avoid calling zone_intersects() for ZONE_NORMAL

If zid reaches ZONE_NORMAL, the caller will always get the NORMAL zone no
matter what zone_intersects() returns.  So we can save some possible cpu
cycles by avoid calling zone_intersects() for ZONE_NORMAL.

Link: https://lkml.kernel.org/r/20220207133643.23427-3-linmiaohe@huawei.com
Signed-off-by: Miaohe Lin <linmiaohe@huawei.com>
Reviewed-by: David Hildenbrand <david@redhat.com>
Reviewed-by: Oscar Salvador <osalvador@suse.de>
Signed-off-by: Andrew Morton <akpm@linux-foundation.org>
Signed-off-by: Stephen Rothwell <sfr@canb.auug.org.au>
mm/memory_hotplug.c