replace-free-hugepage-folios-after-migration-fix

fix comments, 80-column tweak

Cc: Baolin Wang <baolin.wang@linux.alibaba.com>
Cc: David Hildenbrand <david@redhat.com>
Cc: Muchun Song <muchun.song@linux.dev>
Cc: yangge <yangge1116@126.com>
Signed-off-by: Andrew Morton <akpm@linux-foundation.org>
This commit is contained in:
Andrew Morton 2024-12-18 17:57:21 -08:00
parent 7e5670da45
commit 5555a83c82
2 changed files with 8 additions and 8 deletions

View File

@ -2978,7 +2978,7 @@ int isolate_or_dissolve_huge_page(struct page *page, struct list_head *list)
/*
* replace_free_hugepage_folios - Replace free hugepage folios in a given pfn
* range with new folios.
* @stat_pfn: start pfn of the given pfn range
* @start_pfn: start pfn of the given pfn range
* @end_pfn: end pfn of the given pfn range
* Returns 0 on success, otherwise negated error.
*/
@ -3000,7 +3000,8 @@ int replace_free_hugepage_folios(unsigned long start_pfn, unsigned long end_pfn)
}
if (!folio_ref_count(folio)) {
ret = alloc_and_dissolve_hugetlb_folio(h, folio, &isolate_list);
ret = alloc_and_dissolve_hugetlb_folio(h, folio,
&isolate_list);
if (ret)
break;

View File

@ -6506,12 +6506,11 @@ int alloc_contig_range_noprof(unsigned long start, unsigned long end,
goto done;
/*
* When in-use hugetlb pages are migrated, they may simply be
* released back into the free hugepage pool instead of being
* returned to the buddy system. After the migration of in-use
* huge pages is completed, we will invoke the
* replace_free_hugepage_folios() function to ensure that
* these hugepages are properly released to the buddy system.
* When in-use hugetlb pages are migrated, they may simply be released
* back into the free hugepage pool instead of being returned to the
* buddy system. After the migration of in-use huge pages is completed,
* we will invoke replace_free_hugepage_folios() to ensure that these
* hugepages are properly released to the buddy system.
*/
ret = replace_free_hugepage_folios(start, end);
if (ret)