linux-mm.kvack.org archive mirror
 help / color / mirror / Atom feed
From: John Hubbard <jhubbard@nvidia.com>
To: Qian Cai <cai@lca.pw>, Yang Shi <yang.shi@linux.alibaba.com>
Cc: <fabecassis@nvidia.com>, <mhocko@suse.com>, <cl@linux.com>,
	<vbabka@suse.cz>, <mgorman@techsingularity.net>,
	<akpm@linux-foundation.org>, <linux-mm@kvack.org>,
	<linux-kernel@vger.kernel.org>, <stable@vger.kernel.org>
Subject: Re: [v3 PATCH] mm: move_pages: return valid node id in status if the page is already on the target node
Date: Thu, 5 Dec 2019 14:41:07 -0800	[thread overview]
Message-ID: <bd3f2ee5-9cbd-ed4f-9863-8859866da810@nvidia.com> (raw)
In-Reply-To: <D04891DC-0EE8-4EA0-8541-97E4AB4DED3C@lca.pw>

On 12/5/19 2:23 PM, Qian Cai wrote:
>> On Dec 5, 2019, at 5:09 PM, Yang Shi <yang.shi@linux.alibaba.com> wrote:
>>
>> As I said the status return value issue is a regression, but the -ENOENT issue has been there since the syscall was introduced (The visual inspection shows so I didn't actually run test against 2.6.x kernel, but it returns 0 for >= 3.10 at least). It does need further clarification (doc problem or code problem).
> 
> The question is why we should care about this change of behavior. It is arguably you are even trying to fix an ambiguous part of the manpage, but instead leave a more obviously one still broken. It is really difficult to understand the logical here.
> 

Please recall how this started: it was due to a report from a real end user, who was 
seeing a real problem. After a few emails, it was clear that there's not a good
work around available for cases like this:

* User space calls move_pages(), gets 0 (success) returned, and based on that,
proceeds to iterate through the status array.

* The status array remains untouched by the move_pages() call, so confusion and
wrong behavior ensues.

After some further discussion, we decided that the current behavior really is 
incorrect, and that it needs fixing in the kernel. Which this patch does.

>>
>> Michal also noticed several inconsistencies when he was reworking move_pages(), and I agree with him that we'd better not touch them without a clear usecase.
> 
> It could argue that there is no use case to restore the behavior either.
> 

So far, there are no reports from the field, and that's probably the key
difference between these two situations.

Hope that clears up the reasoning for you. I might add that, were you to study
all the emails in these threads, and the code and the man page, you would
probably agree with the conclusions above. You might disagree with the underlying
philosophies (such as "user space is really important and we fix it if it
breaks", etc), but that's a different conversation.


thanks,
-- 
John Hubbard
NVIDIA



  reply	other threads:[~2019-12-05 22:41 UTC|newest]

Thread overview: 18+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2019-12-05 18:54 Yang Shi
2019-12-05 19:19 ` Qian Cai
2019-12-05 19:27   ` Yang Shi
2019-12-05 19:34     ` Qian Cai
2019-12-05 22:09       ` Yang Shi
2019-12-05 22:23         ` Qian Cai
2019-12-05 22:41           ` John Hubbard [this message]
2019-12-05 23:16             ` Qian Cai
2019-12-05 23:24               ` John Hubbard
2019-12-05 23:58                 ` Qian Cai
2019-12-06  0:04                   ` John Hubbard
2019-12-06  0:19                     ` Qian Cai
2019-12-06  1:11                       ` Yang Shi
2019-12-05 19:45 ` Christopher Lameter
2019-12-05 21:59   ` Yang Shi
2019-12-06  7:35   ` Michal Hocko
2019-12-05 21:27 ` John Hubbard
2019-12-05 22:00   ` Yang Shi

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=bd3f2ee5-9cbd-ed4f-9863-8859866da810@nvidia.com \
    --to=jhubbard@nvidia.com \
    --cc=akpm@linux-foundation.org \
    --cc=cai@lca.pw \
    --cc=cl@linux.com \
    --cc=fabecassis@nvidia.com \
    --cc=linux-kernel@vger.kernel.org \
    --cc=linux-mm@kvack.org \
    --cc=mgorman@techsingularity.net \
    --cc=mhocko@suse.com \
    --cc=stable@vger.kernel.org \
    --cc=vbabka@suse.cz \
    --cc=yang.shi@linux.alibaba.com \
    /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