[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <f5964806-992c-d8e1-45f0-2181ee10a83f@oracle.com>
Date: Wed, 24 Nov 2021 10:46:44 -0800
From: Mike Kravetz <mike.kravetz@...cle.com>
To: Baolin Wang <baolin.wang@...ux.alibaba.com>,
akpm@...ux-foundation.org
Cc: ziy@...dia.com, shy828301@...il.com, linux-mm@...ck.org,
linux-kernel@...r.kernel.org
Subject: Re: [PATCH 1/3] mm: migrate: Fix the return value of migrate_pages()
On 11/24/21 02:30, Baolin Wang wrote:
>
>
> On 2021/11/24 2:46, Mike Kravetz wrote:
>> On 11/7/21 01:57, Baolin Wang wrote:
>>> @@ -1511,18 +1517,20 @@ int migrate_pages(struct list_head *from, new_page_t get_new_page,
>>> case -ENOSYS:
>>> /* THP migration is unsupported */
>>> if (is_thp) {
>>> - if (!try_split_thp(page, &page2, from)) {
>>> + nr_thp_failed++;
>>> + if (!try_split_thp(page, &page2, &thp_split_pages)) {
>>
>> Does thp_split_pages need to be initialized before this call?
>
> The declaration "LIST_HEAD(thp_split_pages);" already did list initialization, right?
Correct. My bad! I keep forgetting,
#define LIST_HEAD(name) \
struct list_head name = LIST_HEAD_INIT(name)
--
Mike Kravetz
Powered by blists - more mailing lists