lkml.org 
[lkml]   [2021]   [Apr]   [15]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
/
SubjectRe: [PATCH v8 5/7] mm: Make alloc_contig_range handle free hugetlb pages
From
Date
> +		if (PageHuge(page) && cc->alloc_contig) {
> + ret = isolate_or_dissolve_huge_page(page);
> +
> + /*
> + * Fail isolation in case isolate_or_dissolve_huge_page()
> + * reports an error. In case of -ENOMEM, abort right away.
> + */
> + if (ret < 0) {
> + /*
> + * Do not report -EBUSY down the chain.
> + */

Nit: can fit this into a single line.

> + if (ret != -ENOMEM)
> + ret = 0;

Nit: I wonder if ret == -EBUSY would be clearer.

> + low_pfn += (1UL << compound_order(page)) - 1;
> + goto isolate_fail;
> + }
> +
> + /*
> + * Ok, the hugepage was dissolved. Now these pages are
> + * Buddy and cannot be re-allocated because they are
> + * isolated. Fall-through as the check below handles
> + * Buddy pages.
> + */
> + }
> +

[...]

> +/*
> + * alloc_and_dissolve_huge_page - Allocate a new page and dissolve the old one
> + * @h: struct hstate old page belongs to
> + * @old_page: Old page to dissolve
> + * Returns 0 on success, otherwise negated error.
> + */
> +

nit: remove that line

Acked-by: David Hildenbrand <david@redhat.com>

--
Thanks,

David / dhildenb

\
 
 \ /
  Last update: 2021-04-15 14:46    [W:0.086 / U:0.416 seconds]
©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site