[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <683f6cae-0e0c-d4e4-0929-7fd1a79a2266@nvidia.com>
Date: Thu, 5 Dec 2019 17:47:35 -0800
From: John Hubbard <jhubbard@...dia.com>
To: Yang Shi <yang.shi@...ux.alibaba.com>, <mtk.manpages@...il.com>,
<cl@...ux.com>, <mhocko@...e.com>, <cai@....pw>,
<akpm@...ux-foundation.org>
CC: <linux-man@...r.kernel.org>, <linux-api@...r.kernel.org>,
<linux-mm@...ck.org>, <linux-kernel@...r.kernel.org>
Subject: Re: [PATCH] move_pages.2: not return ENOENT if the page are already
on the target nodes
On 12/5/19 5:34 PM, Yang Shi wrote:
...
>
> diff --git a/man2/move_pages.2 b/man2/move_pages.2
> index 2d96468..2a2f3cd 100644
> --- a/man2/move_pages.2
> +++ b/man2/move_pages.2
> @@ -192,9 +192,8 @@ was specified or an attempt was made to migrate pages of a kernel thread.
> 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
> +No pages were found.
> +All pages are either not present, had an invalid address or could not be
> moved because they were mapped by multiple processes.
How about this wording (ignoring man formatting for the moment):
No pages were moved, because all requested pages fell into one or more of
the following cases:
* Page not present.
* Page has an invalid address.
* Page is mapped by multiple processes.
Reasoning: I don't like the "no pages were found" all by itself, because it
blindly rewords the meaning of ENOENT. ENOENT is merely the closest
symbol we have. So we use ENOENT and that's fine, but the descriptive text
should describe what really happened, which is "no pages were moved". If we had
an ENOPAGESMOVED then we'd use that. :)
thanks,
--
John Hubbard
NVIDIA
Powered by blists - more mailing lists