]> git.baikalelectronics.ru Git - kernel.git/commit
mm/huge_memory: minor cleanup for split_huge_pages_all
authorMiaohe Lin <linmiaohe@huawei.com>
Mon, 4 Jul 2022 13:21:57 +0000 (21:21 +0800)
committerakpm <akpm@linux-foundation.org>
Mon, 18 Jul 2022 00:14:46 +0000 (17:14 -0700)
commit8f3c2de3561de95423bf9ffba02d1a16d10644d3
treee9c97c453a0739493ec2b12bc91bb657514144ff
parent66c8745d12615d46e4bc5a597cdb79cdf83b813e
mm/huge_memory: minor cleanup for split_huge_pages_all

There is nothing to do if a zone doesn't have any pages managed by the
buddy allocator. So we should check managed_zone instead. Also if a thp
is found, there's no need to traverse the subpages again.

Link: https://lkml.kernel.org/r/20220704132201.14611-13-linmiaohe@huawei.com
Signed-off-by: Miaohe Lin <linmiaohe@huawei.com>
Cc: Matthew Wilcox <willy@infradead.org>
Cc: Muchun Song <songmuchun@bytedance.com>
Cc: Yang Shi <shy828301@gmail.com>
Cc: Zach O'Keefe <zokeefe@google.com>
Signed-off-by: Andrew Morton <akpm@linux-foundation.org>
mm/huge_memory.c