lkml.org 
[lkml]   [2021]   [Sep]   [29]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
/
SubjectRe: [PATCH v2 4/4] hugetlb: add hugetlb demote page support
From
Date
On 9/24/21 2:44 AM, David Hildenbrand wrote:
> On 23.09.21 19:53, Mike Kravetz wrote:
>> +
>> + if (alloc_huge_page_vmemmap(h, page)) {
>> + /* Allocation of vmemmmap failed, we can not demote page */
>> + spin_lock_irq(&hugetlb_lock);
>> + set_page_refcounted(page);
>> + add_hugetlb_page(h, page, false);
>
> I dislike using 0/1 as return values as it will just hide the actual issue.
>
> This here would be -ENOMEM, right?
>

I will pass along the return value from alloc_huge_page_vmemmap(). You
are right, -ENOMEM is the only non-zero value.

Thanks,
--
Mike Kravetz

\
 
 \ /
  Last update: 2021-09-29 22:28    [W:0.767 / U:0.308 seconds]
©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site