mirror of
https://git.kernel.org/pub/scm/linux/kernel/git/next/linux-next.git
synced 2024-12-28 00:32:00 +00:00
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:
parent
7e5670da45
commit
5555a83c82
@ -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;
|
||||
|
||||
|
@ -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)
|
||||
|
Loading…
Reference in New Issue
Block a user