Received: by 2002:a25:8b91:0:0:0:0:0 with SMTP id j17csp14854176ybl; Mon, 30 Dec 2019 19:01:54 -0800 (PST) X-Google-Smtp-Source: APXvYqysBQ3ZoXXhH5QM2lMbyDA16KJajgQ1h4L6oWVUbvuU7XWPZ15Fb1hz28+eySAoeMG4Zr5Z X-Received: by 2002:a9d:10b:: with SMTP id 11mr72028873otu.222.1577761314859; Mon, 30 Dec 2019 19:01:54 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1577761314; cv=none; d=google.com; s=arc-20160816; b=tUI04E8wEq7c95tiuyRhdEWkv3rOHz0t8XpuK7AqUVJaSprZwb8rWkmjIZu/Wtn2yx /ihQkynUyZvd3It+f4anBk+/wZxfQbbKHq4iUWZ0CoBKgWdndoUQ6WT872059qkcTNxl 6aVfFOQtwBAuGog89r0eDUcwsdCEY6HN0H77Visq0ASrtsVdlA0kPucHKNoAwTnDtuvO yE7npBMs9ECmU64iJQifyQ7fk30ZxY7mwISxjrfCeRKP71OydILGwOnz91uaVJ1YckGt TCaHkaEws7Sa+C1bmDsAgzAiqhBWhXH3amrRgFH1iXsV6PB74ffGBfCiV6sCYsAMR8LB 8pUg== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:sender:content-language :content-transfer-encoding:in-reply-to:mime-version:user-agent:date :message-id:from:references:cc:to:subject; bh=iVVHnEBDaHffACXQ3z65scwxoPYA2gGiWMBFu/iwK68=; b=meF02lVZiaGBmetRY68WX5lK5mEXRWxirMk6PZJ1MyAg6PUc2Frwso+Ik34DqucSFy BQhwSdLx6pJiAM7OKhJdinMI4WMLUO3JmrXZUjoEXjQOMHg9t5Sqq0GqiDkRp9uHIwUo aiXJ22JM13T5NmhMTSZStap38azCkXva4WAtbBPV2Eq1qe9jZrSIKYCG23JVtyEbfCaQ 5tWWD4mJ9hCXRQjXR7kY0D9yOKlIHE25Hh4fsHZacB6aCeAMEL0VLI3znB3Jgk+PMjGg NgO8gbmJQ4PKvTTnrPivkpuCmGwa47G0TjoF2PlVx8ssPg4OSPzr+oTNzMZqNhq+EFx3 C/kg== ARC-Authentication-Results: i=1; mx.google.com; spf=pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=fail (p=NONE sp=NONE dis=NONE) header.from=alibaba.com Return-Path: Received: from vger.kernel.org (vger.kernel.org. [209.132.180.67]) by mx.google.com with ESMTP id s18si3810840otr.172.2019.12.30.19.01.40; Mon, 30 Dec 2019 19:01:54 -0800 (PST) Received-SPF: pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) client-ip=209.132.180.67; Authentication-Results: mx.google.com; spf=pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=fail (p=NONE sp=NONE dis=NONE) header.from=alibaba.com Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1726479AbfLaDAw (ORCPT + 99 others); Mon, 30 Dec 2019 22:00:52 -0500 Received: from out30-56.freemail.mail.aliyun.com ([115.124.30.56]:40123 "EHLO out30-56.freemail.mail.aliyun.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1725536AbfLaDAv (ORCPT ); Mon, 30 Dec 2019 22:00:51 -0500 X-Alimail-AntiSpam: AC=PASS;BC=-1|-1;BR=01201311R191e4;CH=green;DM=||false|;DS=||;FP=0|-1|-1|-1|0|-1|-1|-1;HT=e01e07487;MF=yang.shi@linux.alibaba.com;NM=1;PH=DS;RN=10;SR=0;TI=SMTPD_---0TmNRedc_1577761244; Received: from US-143344MP.local(mailfrom:yang.shi@linux.alibaba.com fp:SMTPD_---0TmNRedc_1577761244) by smtp.aliyun-inc.com(127.0.0.1); Tue, 31 Dec 2019 11:00:47 +0800 Subject: Re: [PATCH] move_pages.2: not return ENOENT if the page are already on the target nodes To: Michal Hocko , John Hubbard Cc: "Michael Kerrisk (man-pages)" , cl@linux.com, cai@lca.pw, akpm@linux-foundation.org, linux-man@vger.kernel.org, linux-api@vger.kernel.org, linux-mm@kvack.org, linux-kernel@vger.kernel.org References: <1575596090-115377-1-git-send-email-yang.shi@linux.alibaba.com> <0dc96e40-5f2b-a2fe-6e5f-b6f3d5e9ebde@nvidia.com> <95170ea5-5b62-9168-fcd9-93b43330a1b4@linux.alibaba.com> <092adc11-7039-9343-7067-0e0199c9dc13@gmail.com> <51dd767a-221f-882d-c7f6-45bd0c217a67@nvidia.com> <20191218101711.GB21485@dhcp22.suse.cz> From: Yang Shi Message-ID: <0059a598-5726-2488-cd37-b4b7f9b3353e@linux.alibaba.com> Date: Mon, 30 Dec 2019 19:00:43 -0800 User-Agent: Mozilla/5.0 (Macintosh; Intel Mac OS X 10.12; rv:52.0) Gecko/20100101 Thunderbird/52.7.0 MIME-Version: 1.0 In-Reply-To: <20191218101711.GB21485@dhcp22.suse.cz> Content-Type: text/plain; charset=utf-8; format=flowed Content-Transfer-Encoding: 7bit Content-Language: en-US Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On 12/18/19 2:17 AM, Michal Hocko wrote: > On Tue 17-12-19 23:36:09, John Hubbard wrote: > [...] >> 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 > > 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.