From: "Huang, Ying" <ying.huang@intel.com>
To: Chen Wandun <chenwandun@huawei.com>
Cc: <akpm@linux-foundation.org>, <linux-mm@kvack.org>,
<linux-kernel@vger.kernel.org>
Subject: Re: [PATCH v2] mm/migrate: Continue to migrate for non-hugetlb folios
Date: Sun, 29 Jan 2023 13:23:38 +0800 [thread overview]
Message-ID: <871qnddicl.fsf@yhuang6-desk2.ccr.corp.intel.com> (raw)
In-Reply-To: <20230129033910.1327277-1-chenwandun@huawei.com> (Chen Wandun's message of "Sun, 29 Jan 2023 11:39:10 +0800")
Chen Wandun <chenwandun@huawei.com> writes:
> migrate_hugetlbs returns -ENOMEM when no enough hugetlb,
> however there may be free non-hugetlb folios available,
> so continue to migrate for non-hugetlb folios.
>
> Nowdays the only negtive return value of migrate_hugetlbs
> is -ENOMEM, keep compatible for coming negtive return value
> instead of ignore return value.
>
> Signed-off-by: Chen Wandun <chenwandun@huawei.com>
LGTM, Thanks!
Reviewed-by: "Huang, Ying" <ying.huang@intel.com>
>
> ---
> v1 --> v2: modify changelog and comment. thanks Huang Ying.
> ---
> mm/migrate.c | 3 ++-
> 1 file changed, 2 insertions(+), 1 deletion(-)
>
> diff --git a/mm/migrate.c b/mm/migrate.c
> index b971edbf32fc..68927aa06f9b 100644
> --- a/mm/migrate.c
> +++ b/mm/migrate.c
> @@ -1939,7 +1939,8 @@ int migrate_pages(struct list_head *from, new_page_t get_new_page,
>
> rc_gather = migrate_hugetlbs(from, get_new_page, put_new_page, private,
> mode, reason, &stats, &ret_folios);
> - if (rc_gather < 0)
> + /* There may be free non-hugetlb folios available, continue to migrate. */
> + if (rc_gather < 0 && rc_gather != -ENOMEM)
> goto out;
> again:
> nr_pages = 0;
prev parent reply other threads:[~2023-01-29 5:24 UTC|newest]
Thread overview: 2+ messages / expand[flat|nested] mbox.gz Atom feed top
2023-01-29 3:39 Chen Wandun
2023-01-29 5:23 ` Huang, Ying [this message]
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=871qnddicl.fsf@yhuang6-desk2.ccr.corp.intel.com \
--to=ying.huang@intel.com \
--cc=akpm@linux-foundation.org \
--cc=chenwandun@huawei.com \
--cc=linux-kernel@vger.kernel.org \
--cc=linux-mm@kvack.org \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox