[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <f79900b4-f924-48cd-bea5-e65989618f10@linux.dev>
Date: Thu, 11 Jan 2024 11:34:32 +0800
From: Gang Li <gang.li@...ux.dev>
To: Tim Chen <tim.c.chen@...ux.intel.com>
Cc: linux-mm@...ck.org, Mike Kravetz <mike.kravetz@...cle.com>,
David Rientjes <rientjes@...gle.com>, linux-kernel@...r.kernel.org,
David Hildenbrand <david@...hat.com>, ligang.bdlg@...edance.com,
Muchun Song <muchun.song@...ux.dev>,
Andrew Morton <akpm@...ux-foundation.org>
Subject: Re: [PATCH v3 1/7] hugetlb: code clean for hugetlb_hstate_alloc_pages
On 2024/1/11 05:55, Tim Chen wrote:
> On Tue, 2024-01-02 at 21:12 +0800, Gang Li wrote:
>> The readability of `hugetlb_hstate_alloc_pages` is poor. By cleaning the
>> code, its readability can be improved, facilitating future modifications.
>>
>> This patch extracts two functions to reduce the complexity of
>> `hugetlb_hstate_alloc_pages` and has no functional changes.
>>
>> - hugetlb_hstate_alloc_pages_node_specific() to handle iterates through
>> each online node and performs allocation if necessary.
>> - hugetlb_hstate_alloc_pages_report() report error during allocation.
>> And the value of h->max_huge_pages is updated accordingly.
>
> Minor nit, I think hugetlb_hstate_alloc_pages_errcheck() is more
> descriptive than hugetlb_hstate_alloc_pages_report().
Thanks! This looks more intuitive.
>
> Otherwise
>
> Reviewed-by: Tim Chen <tim.c.chen@...ux.intel.com>
>
Powered by blists - more mailing lists