dhugetlb: skip unexpected migration
hulk inclusion category: bugfix bugzilla: https://gitee.com/openeuler/kernel/issues/I8YWPT CVE: NA -------------------------------- With dynamic hugetlb feature, some memory is isolated in the dynamic pool. When try to compact memory, the kcompactd thread will scan all memory, althougt some memory is belonging to dynamic pool, kcompactd still try to migrate them. After migration, these memory will free to dynamic pool rather than buddy system, which results the free pages in buddy system decreased. Since it is unnecessary to compact the memory in the dynamic pool, skip migrate them to fix the problem. The same problem also existed in alloc_contig_range(), offline_pages() and numa balancing. Skip it again in these three scenarios. In addition to this, we have to consider the migration of hugepage, if a hugepage is from dynamic pool, we should not allow to migrate it. Fixes: 0bc0d0d5 ("dhugetlb: backport dynamic hugetlb feature") Signed-off-by:Liu Shixin <liushixin2@huawei.com>
Loading
Please sign in to comment