mm/memory_hotplug: avoid calling zone_intersects() for ZONE_NORMAL
authorMiaohe Lin <linmiaohe@huawei.com>
Mon, 28 Feb 2022 23:01:38 +0000 (10:01 +1100)
committerStephen Rothwell <sfr@canb.auug.org.au>
Mon, 28 Feb 2022 23:01:38 +0000 (10:01 +1100)
commit8194d1551c72918209611d1e27633317e05fdb89
treeee96ec0b78ed985d518468d2c55657a2e40a9951
parent4be6007ddb7b0185a1e331b54f4b3698b2739045
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