* [PATCH] mm/migrate: remove the -EEXIST conversion for move_pages()
@ 2025-07-07 6:57 Wei Yang
2025-07-07 7:25 ` David Hildenbrand
` (2 more replies)
0 siblings, 3 replies; 7+ messages in thread
From: Wei Yang @ 2025-07-07 6:57 UTC (permalink / raw)
To: akpm
Cc: linux-mm, Wei Yang, John Hubbard, David Hildenbrand, Zi Yan,
Matthew Brost, Joshua Hahn, Rakie Kim, Byungchul Park,
Gregory Price, Ying Huang, Alistair Popple
The -EEXIST conversion is introduced in commit 65462462ffb2 ("mm/gup:
follow_pfn_pte(): -EEXIST cleanup"), since follow_page() may call
follow_pfn_pte() which may return -EEXIST.
But after commit 7dff875c9436 ("mm/migrate: convert
add_page_for_migration() from follow_page() to folio_walk"), it use
folio_walk instead. This limit the error code and won't return -EEXIST.
Remove the error code conversion here.
Signed-off-by: Wei Yang <richard.weiyang@gmail.com>
Cc: John Hubbard <jhubbard@nvidia.com>
Cc: David Hildenbrand <david@redhat.com>
Cc: Zi Yan <ziy@nvidia.com>
Cc: Matthew Brost <matthew.brost@intel.com>
Cc: Joshua Hahn <joshua.hahnjy@gmail.com>
Cc: Rakie Kim <rakie.kim@sk.com>
Cc: Byungchul Park <byungchul@sk.com>
Cc: Gregory Price <gourry@gourry.net>
Cc: Ying Huang <ying.huang@linux.alibaba.com>
Cc: Alistair Popple <apopple@nvidia.com>
---
mm/migrate.c | 7 -------
1 file changed, 7 deletions(-)
diff --git a/mm/migrate.c b/mm/migrate.c
index 9ececaf80ec1..629851e525e8 100644
--- a/mm/migrate.c
+++ b/mm/migrate.c
@@ -2321,13 +2321,6 @@ static int do_pages_move(struct mm_struct *mm, nodemask_t task_nodes,
continue;
}
- /*
- * The move_pages() man page does not have an -EEXIST choice, so
- * use -EFAULT instead.
- */
- if (err == -EEXIST)
- err = -EFAULT;
-
/*
* If the page is already on the target node (!err), store the
* node, otherwise, store the err.
--
2.34.1
^ permalink raw reply related [flat|nested] 7+ messages in thread
* Re: [PATCH] mm/migrate: remove the -EEXIST conversion for move_pages()
2025-07-07 6:57 [PATCH] mm/migrate: remove the -EEXIST conversion for move_pages() Wei Yang
@ 2025-07-07 7:25 ` David Hildenbrand
2025-07-07 13:57 ` Wei Yang
2025-07-07 14:10 ` Joshua Hahn
2025-07-07 17:44 ` Zi Yan
2 siblings, 1 reply; 7+ messages in thread
From: David Hildenbrand @ 2025-07-07 7:25 UTC (permalink / raw)
To: Wei Yang, akpm
Cc: linux-mm, John Hubbard, Zi Yan, Matthew Brost, Joshua Hahn,
Rakie Kim, Byungchul Park, Gregory Price, Ying Huang,
Alistair Popple
On 07.07.25 08:57, Wei Yang wrote:
> The -EEXIST conversion is introduced in commit 65462462ffb2 ("mm/gup:
> follow_pfn_pte(): -EEXIST cleanup"), since follow_page() may call
> follow_pfn_pte() which may return -EEXIST.
>
> But after commit 7dff875c9436 ("mm/migrate: convert
> add_page_for_migration() from follow_page() to folio_walk"), it use
> folio_walk instead. This limit the error code and won't return -EEXIST.
>
> Remove the error code conversion here.
>
> Signed-off-by: Wei Yang <richard.weiyang@gmail.com>
> Cc: John Hubbard <jhubbard@nvidia.com>
> Cc: David Hildenbrand <david@redhat.com>
> Cc: Zi Yan <ziy@nvidia.com>
> Cc: Matthew Brost <matthew.brost@intel.com>
> Cc: Joshua Hahn <joshua.hahnjy@gmail.com>
> Cc: Rakie Kim <rakie.kim@sk.com>
> Cc: Byungchul Park <byungchul@sk.com>
> Cc: Gregory Price <gourry@gourry.net>
> Cc: Ying Huang <ying.huang@linux.alibaba.com>
> Cc: Alistair Popple <apopple@nvidia.com>
> ---
Acked-by: David Hildenbrand <david@redhat.com>
--
Cheers,
David / dhildenb
^ permalink raw reply [flat|nested] 7+ messages in thread
* Re: [PATCH] mm/migrate: remove the -EEXIST conversion for move_pages()
2025-07-07 7:25 ` David Hildenbrand
@ 2025-07-07 13:57 ` Wei Yang
0 siblings, 0 replies; 7+ messages in thread
From: Wei Yang @ 2025-07-07 13:57 UTC (permalink / raw)
To: David Hildenbrand
Cc: Wei Yang, akpm, linux-mm, John Hubbard, Zi Yan, Matthew Brost,
Joshua Hahn, Rakie Kim, Byungchul Park, Gregory Price, Ying Huang,
Alistair Popple
On Mon, Jul 07, 2025 at 09:25:12AM +0200, David Hildenbrand wrote:
>On 07.07.25 08:57, Wei Yang wrote:
>> The -EEXIST conversion is introduced in commit 65462462ffb2 ("mm/gup:
>> follow_pfn_pte(): -EEXIST cleanup"), since follow_page() may call
>> follow_pfn_pte() which may return -EEXIST.
>>
>> But after commit 7dff875c9436 ("mm/migrate: convert
>> add_page_for_migration() from follow_page() to folio_walk"), it use
>> folio_walk instead. This limit the error code and won't return -EEXIST.
>>
>> Remove the error code conversion here.
>>
>> Signed-off-by: Wei Yang <richard.weiyang@gmail.com>
>> Cc: John Hubbard <jhubbard@nvidia.com>
>> Cc: David Hildenbrand <david@redhat.com>
>> Cc: Zi Yan <ziy@nvidia.com>
>> Cc: Matthew Brost <matthew.brost@intel.com>
>> Cc: Joshua Hahn <joshua.hahnjy@gmail.com>
>> Cc: Rakie Kim <rakie.kim@sk.com>
>> Cc: Byungchul Park <byungchul@sk.com>
>> Cc: Gregory Price <gourry@gourry.net>
>> Cc: Ying Huang <ying.huang@linux.alibaba.com>
>> Cc: Alistair Popple <apopple@nvidia.com>
>> ---
>
>Acked-by: David Hildenbrand <david@redhat.com>
>
Thanks
>--
>Cheers,
>
>David / dhildenb
--
Wei Yang
Help you, Help me
^ permalink raw reply [flat|nested] 7+ messages in thread
* Re: [PATCH] mm/migrate: remove the -EEXIST conversion for move_pages()
2025-07-07 6:57 [PATCH] mm/migrate: remove the -EEXIST conversion for move_pages() Wei Yang
2025-07-07 7:25 ` David Hildenbrand
@ 2025-07-07 14:10 ` Joshua Hahn
2025-07-09 0:57 ` Wei Yang
2025-07-07 17:44 ` Zi Yan
2 siblings, 1 reply; 7+ messages in thread
From: Joshua Hahn @ 2025-07-07 14:10 UTC (permalink / raw)
To: Wei Yang
Cc: akpm, linux-mm, John Hubbard, David Hildenbrand, Zi Yan,
Matthew Brost, Rakie Kim, Byungchul Park, Gregory Price,
Ying Huang, Alistair Popple
On Mon, Jul 7, 2025 at 2:57 AM Wei Yang <richard.weiyang@gmail.com> wrote:
>
> The -EEXIST conversion is introduced in commit 65462462ffb2 ("mm/gup:
> follow_pfn_pte(): -EEXIST cleanup"), since follow_page() may call
> follow_pfn_pte() which may return -EEXIST.
>
> But after commit 7dff875c9436 ("mm/migrate: convert
> add_page_for_migration() from follow_page() to folio_walk"), it use
> folio_walk instead. This limit the error code and won't return -EEXIST.
>
> Remove the error code conversion here.
>
> Signed-off-by: Wei Yang <richard.weiyang@gmail.com>
> Cc: John Hubbard <jhubbard@nvidia.com>
> Cc: David Hildenbrand <david@redhat.com>
> Cc: Zi Yan <ziy@nvidia.com>
> Cc: Matthew Brost <matthew.brost@intel.com>
> Cc: Joshua Hahn <joshua.hahnjy@gmail.com>
> Cc: Rakie Kim <rakie.kim@sk.com>
> Cc: Byungchul Park <byungchul@sk.com>
> Cc: Gregory Price <gourry@gourry.net>
> Cc: Ying Huang <ying.huang@linux.alibaba.com>
> Cc: Alistair Popple <apopple@nvidia.com>
Hello,
This makes sense, thank you for spotting this!
Reviewed-by: Joshua Hahn <joshua.hahnjy@gmail.com>
Have a great day!
Joshua
^ permalink raw reply [flat|nested] 7+ messages in thread
* Re: [PATCH] mm/migrate: remove the -EEXIST conversion for move_pages()
2025-07-07 6:57 [PATCH] mm/migrate: remove the -EEXIST conversion for move_pages() Wei Yang
2025-07-07 7:25 ` David Hildenbrand
2025-07-07 14:10 ` Joshua Hahn
@ 2025-07-07 17:44 ` Zi Yan
2025-07-09 0:57 ` Wei Yang
2 siblings, 1 reply; 7+ messages in thread
From: Zi Yan @ 2025-07-07 17:44 UTC (permalink / raw)
To: Wei Yang
Cc: akpm, linux-mm, John Hubbard, David Hildenbrand, Matthew Brost,
Joshua Hahn, Rakie Kim, Byungchul Park, Gregory Price, Ying Huang,
Alistair Popple
On 7 Jul 2025, at 2:57, Wei Yang wrote:
> The -EEXIST conversion is introduced in commit 65462462ffb2 ("mm/gup:
> follow_pfn_pte(): -EEXIST cleanup"), since follow_page() may call
> follow_pfn_pte() which may return -EEXIST.
>
> But after commit 7dff875c9436 ("mm/migrate: convert
> add_page_for_migration() from follow_page() to folio_walk"), it use
> folio_walk instead. This limit the error code and won't return -EEXIST.
>
> Remove the error code conversion here.
>
> Signed-off-by: Wei Yang <richard.weiyang@gmail.com>
> Cc: John Hubbard <jhubbard@nvidia.com>
> Cc: David Hildenbrand <david@redhat.com>
> Cc: Zi Yan <ziy@nvidia.com>
> Cc: Matthew Brost <matthew.brost@intel.com>
> Cc: Joshua Hahn <joshua.hahnjy@gmail.com>
> Cc: Rakie Kim <rakie.kim@sk.com>
> Cc: Byungchul Park <byungchul@sk.com>
> Cc: Gregory Price <gourry@gourry.net>
> Cc: Ying Huang <ying.huang@linux.alibaba.com>
> Cc: Alistair Popple <apopple@nvidia.com>
> ---
> mm/migrate.c | 7 -------
> 1 file changed, 7 deletions(-)
>
Reviewed-by: Zi Yan <ziy@nvidia.com>
Best Regards,
Yan, Zi
^ permalink raw reply [flat|nested] 7+ messages in thread
* Re: [PATCH] mm/migrate: remove the -EEXIST conversion for move_pages()
2025-07-07 14:10 ` Joshua Hahn
@ 2025-07-09 0:57 ` Wei Yang
0 siblings, 0 replies; 7+ messages in thread
From: Wei Yang @ 2025-07-09 0:57 UTC (permalink / raw)
To: Joshua Hahn
Cc: Wei Yang, akpm, linux-mm, John Hubbard, David Hildenbrand, Zi Yan,
Matthew Brost, Rakie Kim, Byungchul Park, Gregory Price,
Ying Huang, Alistair Popple
On Mon, Jul 07, 2025 at 10:10:58AM -0400, Joshua Hahn wrote:
>On Mon, Jul 7, 2025 at 2:57 AM Wei Yang <richard.weiyang@gmail.com> wrote:
>>
>> The -EEXIST conversion is introduced in commit 65462462ffb2 ("mm/gup:
>> follow_pfn_pte(): -EEXIST cleanup"), since follow_page() may call
>> follow_pfn_pte() which may return -EEXIST.
>>
>> But after commit 7dff875c9436 ("mm/migrate: convert
>> add_page_for_migration() from follow_page() to folio_walk"), it use
>> folio_walk instead. This limit the error code and won't return -EEXIST.
>>
>> Remove the error code conversion here.
>>
>> Signed-off-by: Wei Yang <richard.weiyang@gmail.com>
>> Cc: John Hubbard <jhubbard@nvidia.com>
>> Cc: David Hildenbrand <david@redhat.com>
>> Cc: Zi Yan <ziy@nvidia.com>
>> Cc: Matthew Brost <matthew.brost@intel.com>
>> Cc: Joshua Hahn <joshua.hahnjy@gmail.com>
>> Cc: Rakie Kim <rakie.kim@sk.com>
>> Cc: Byungchul Park <byungchul@sk.com>
>> Cc: Gregory Price <gourry@gourry.net>
>> Cc: Ying Huang <ying.huang@linux.alibaba.com>
>> Cc: Alistair Popple <apopple@nvidia.com>
>
>Hello,
>
>This makes sense, thank you for spotting this!
>Reviewed-by: Joshua Hahn <joshua.hahnjy@gmail.com>
>
Thanks :-)
>Have a great day!
>Joshua
--
Wei Yang
Help you, Help me
^ permalink raw reply [flat|nested] 7+ messages in thread
* Re: [PATCH] mm/migrate: remove the -EEXIST conversion for move_pages()
2025-07-07 17:44 ` Zi Yan
@ 2025-07-09 0:57 ` Wei Yang
0 siblings, 0 replies; 7+ messages in thread
From: Wei Yang @ 2025-07-09 0:57 UTC (permalink / raw)
To: Zi Yan
Cc: Wei Yang, akpm, linux-mm, John Hubbard, David Hildenbrand,
Matthew Brost, Joshua Hahn, Rakie Kim, Byungchul Park,
Gregory Price, Ying Huang, Alistair Popple
On Mon, Jul 07, 2025 at 01:44:48PM -0400, Zi Yan wrote:
>On 7 Jul 2025, at 2:57, Wei Yang wrote:
>
>> The -EEXIST conversion is introduced in commit 65462462ffb2 ("mm/gup:
>> follow_pfn_pte(): -EEXIST cleanup"), since follow_page() may call
>> follow_pfn_pte() which may return -EEXIST.
>>
>> But after commit 7dff875c9436 ("mm/migrate: convert
>> add_page_for_migration() from follow_page() to folio_walk"), it use
>> folio_walk instead. This limit the error code and won't return -EEXIST.
>>
>> Remove the error code conversion here.
>>
>> Signed-off-by: Wei Yang <richard.weiyang@gmail.com>
>> Cc: John Hubbard <jhubbard@nvidia.com>
>> Cc: David Hildenbrand <david@redhat.com>
>> Cc: Zi Yan <ziy@nvidia.com>
>> Cc: Matthew Brost <matthew.brost@intel.com>
>> Cc: Joshua Hahn <joshua.hahnjy@gmail.com>
>> Cc: Rakie Kim <rakie.kim@sk.com>
>> Cc: Byungchul Park <byungchul@sk.com>
>> Cc: Gregory Price <gourry@gourry.net>
>> Cc: Ying Huang <ying.huang@linux.alibaba.com>
>> Cc: Alistair Popple <apopple@nvidia.com>
>> ---
>> mm/migrate.c | 7 -------
>> 1 file changed, 7 deletions(-)
>>
>Reviewed-by: Zi Yan <ziy@nvidia.com>
>
Thanks
>Best Regards,
>Yan, Zi
--
Wei Yang
Help you, Help me
^ permalink raw reply [flat|nested] 7+ messages in thread
end of thread, other threads:[~2025-07-09 0:57 UTC | newest]
Thread overview: 7+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2025-07-07 6:57 [PATCH] mm/migrate: remove the -EEXIST conversion for move_pages() Wei Yang
2025-07-07 7:25 ` David Hildenbrand
2025-07-07 13:57 ` Wei Yang
2025-07-07 14:10 ` Joshua Hahn
2025-07-09 0:57 ` Wei Yang
2025-07-07 17:44 ` Zi Yan
2025-07-09 0:57 ` Wei Yang
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).