]> git.baikalelectronics.ru Git - kernel.git/commit
mm/memory_hotplug: avoid calling zone_intersects() for ZONE_NORMAL
authorMiaohe Lin <linmiaohe@huawei.com>
Tue, 22 Mar 2022 21:47:19 +0000 (14:47 -0700)
committerLinus Torvalds <torvalds@linux-foundation.org>
Tue, 22 Mar 2022 22:57:10 +0000 (15:57 -0700)
commit8d0233c320b16b8737d0c48a544d18b91052a026
treed96c7f53b13a46c6d288c057d0608b24a3b0da32
parent7dc991c9e3ccb70390aaa7563f77544245af585c
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: Linus Torvalds <torvalds@linux-foundation.org>
mm/memory_hotplug.c