Re: [PATCH] move_pages.2: not return ENOENT if the page are already on the target nodes

From
Yang Shi <hidden>
Date
2020-01-02 22:58:40
Also in
linux-man, linux-mm, lkml
Reply to
Eric W. Biederman, 2019-12-31

On 12/30/19 7:49 PM, Eric W. Biederman wrote:
Yang Shi [off-list ref] writes:
quoted
On 12/18/19 2:17 AM, Michal Hocko wrote:
quoted
On Tue 17-12-19 23:36:09, John Hubbard wrote:
[...]
quoted
diff --git a/man2/move_pages.2 b/man2/move_pages.2
index 2d96468fa..1bf1053f2 100644
--- a/man2/move_pages.2
+++ b/man2/move_pages.2
@@ -191,12 +191,6 @@ was specified or an attempt was made to migrate pages of a kernel thread.
   .B ENODEV
   One of the target nodes is not online.
   .TP
-.B ENOENT
-No pages were found that require moving.
-All pages are either already
-on the target node, not present, had an invalid address or could not be
-moved because they were mapped by multiple processes.
-.TP
   .B EPERM
   The caller specified
   .B MPOL_MF_MOVE_ALL
...But I'm not sure if we should change the implementation, instead, so
that it *can* return ENOENT. That's the main question to resolve before
creating any more patches, I think.
I would start by dropping any note about ENOENT first. I am not really
sure there is a reasonable usecase for it but maybe somebody comes up
with something and only then we should consider it.

Feel free to add
Acked-by: Michal Hocko <mhocko@suse.com>

ideally with a kernel commit which removed the ENOENT.
A quick audit doesn't show kernel code or comment notes about ENOENT
wrongly. The status could be set as ENOENT if the page is not present
(follow_page() returns NULL), and man page does match what kernel
does.
Doesn't the function one layer up then consume the ENOENT?
No, it doesn't. The return value would be reset unconditionally by store_status(). This is what the man page patch tries to correct.
Eric
Thread (2 messages) 2 messages, 2 authors, last reply 2020-01-02
Keyboard shortcuts
hback out one level
jnext message in thread / next series-diff position
kprevious message in thread / previous series-diff position
ldrill in
Escclose help / fold thread tree
?toggle this help