From: "Huang, Ying" <ying.huang@intel.com>
To: Zhenneng Li <lizhenneng@kylinos.cn>
Cc: Andrew Morton <akpm@linux-foundation.org>,
linux-mm@kvack.org, linux-kernel@vger.kernel.org
Subject: Re: [PATCH] migrate_pages: modify max number of pages to migrate in batch
Date: Tue, 25 Jun 2024 09:17:40 +0800 [thread overview]
Message-ID: <87o77pzuq3.fsf@yhuang6-desk2.ccr.corp.intel.com> (raw)
In-Reply-To: <20240624045120.121261-1-lizhenneng@kylinos.cn> (Zhenneng Li's message of "Mon, 24 Jun 2024 12:51:20 +0800")
Hi, Zhenneng,
Zhenneng Li <lizhenneng@kylinos.cn> writes:
> We restrict the number of pages to be migrated to no more than
> HPAGE_PMD_NR or NR_MAX_BATCHED_MIGRATION, but in fact, the
> number of pages to be migrated may reach 2*HPAGE_PMD_NR-1 or 2
> *NR_MAX_BATCHED_MIGRATION-1, it's not in inconsistent with the context.
Yes. It's not HPAGE_PMD_NR exactly.
> Please refer to the patch: 42012e0436d4(migrate_pages: restrict number
> of pages to migrate in batch)
>
> Signed-off-by: Zhenneng Li <lizhenneng@kylinos.cn>
> ---
> mm/migrate.c | 2 +-
> 1 file changed, 1 insertion(+), 1 deletion(-)
>
> diff --git a/mm/migrate.c b/mm/migrate.c
> index 781979567f64..7a4b37aac9e8 100644
> --- a/mm/migrate.c
> +++ b/mm/migrate.c
> @@ -1961,7 +1961,7 @@ int migrate_pages(struct list_head *from, new_folio_t get_new_folio,
> break;
> }
> if (nr_pages >= NR_MAX_BATCHED_MIGRATION)
> - list_cut_before(&folios, from, &folio2->lru);
> + list_cut_before(&folios, from, &folio->lru);
If the first entry of the list "from" is a THP with size HPAGE_PMD_NR,
"folio" will be the first entry of from, so that "folios" will be empty.
Right?
> else
> list_splice_init(from, &folios);
> if (mode == MIGRATE_ASYNC)
--
Best Regards,
Huang, Ying
next prev parent reply other threads:[~2024-06-25 1:19 UTC|newest]
Thread overview: 4+ messages / expand[flat|nested] mbox.gz Atom feed top
2024-06-24 4:51 Zhenneng Li
2024-06-25 1:17 ` Huang, Ying [this message]
2024-06-26 7:56 ` Miaohe Lin
-- strict thread matches above, loose matches on Subject: below --
2024-06-24 4:41 Zhenneng Li
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=87o77pzuq3.fsf@yhuang6-desk2.ccr.corp.intel.com \
--to=ying.huang@intel.com \
--cc=akpm@linux-foundation.org \
--cc=linux-kernel@vger.kernel.org \
--cc=linux-mm@kvack.org \
--cc=lizhenneng@kylinos.cn \
/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