[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <84268789-379e-2b45-1637-1877652cd6c9@redhat.com>
Date: Thu, 15 Apr 2021 14:45:11 +0200
From: David Hildenbrand <david@...hat.com>
To: Oscar Salvador <osalvador@...e.de>,
Andrew Morton <akpm@...ux-foundation.org>
Cc: Mike Kravetz <mike.kravetz@...cle.com>,
Vlastimil Babka <vbabka@...e.cz>,
Michal Hocko <mhocko@...nel.org>,
Muchun Song <songmuchun@...edance.com>, linux-mm@...ck.org,
linux-kernel@...r.kernel.org, Michal Hocko <mhocko@...e.com>
Subject: Re: [PATCH v8 5/7] mm: Make alloc_contig_range handle free hugetlb
pages
> + 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@...hat.com>
--
Thanks,
David / dhildenb
Powered by blists - more mailing lists