From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org X-Spam-Level: X-Spam-Status: No, score=-2.2 required=3.0 tests=HEADER_FROM_DIFFERENT_DOMAINS, MAILING_LIST_MULTI,SPF_HELO_NONE,SPF_PASS,USER_AGENT_SANE_1 autolearn=no autolearn_force=no version=3.4.0 Received: from mail.kernel.org (mail.kernel.org [198.145.29.99]) by smtp.lore.kernel.org (Postfix) with ESMTP id 3D47BC47409 for ; Thu, 5 Dec 2019 18:17:31 +0000 (UTC) Received: from vger.kernel.org (vger.kernel.org [209.132.180.67]) by mail.kernel.org (Postfix) with ESMTP id 221A924651 for ; Thu, 5 Dec 2019 18:17:31 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1729690AbfLESRa (ORCPT ); Thu, 5 Dec 2019 13:17:30 -0500 Received: from gentwo.org ([3.19.106.255]:47082 "EHLO gentwo.org" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1726028AbfLESR3 (ORCPT ); Thu, 5 Dec 2019 13:17:29 -0500 Received: by gentwo.org (Postfix, from userid 1002) id 013E93EA37; Thu, 5 Dec 2019 18:17:28 +0000 (UTC) Received: from localhost (localhost [127.0.0.1]) by gentwo.org (Postfix) with ESMTP id F0A2E3E951; Thu, 5 Dec 2019 18:17:28 +0000 (UTC) Date: Thu, 5 Dec 2019 18:17:28 +0000 (UTC) From: Christopher Lameter X-X-Sender: cl@www.lameter.com To: Qian Cai cc: Yang Shi , fabecassis@nvidia.com, jhubbard@nvidia.com, mhocko@suse.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: [v2 PATCH] mm: move_pages: return valid node id in status if the page is already on the target node In-Reply-To: <1707CDD0-E05E-411A-A093-35E8E50ACA4B@lca.pw> Message-ID: References: <1707CDD0-E05E-411A-A093-35E8E50ACA4B@lca.pw> User-Agent: Alpine 2.21 (DEB 202 2017-01-01) MIME-Version: 1.0 Content-Type: multipart/mixed; boundary="531401748-729306102-1575569848=:9722" Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org This message is in MIME format. The first part should be readable text, while the remaining parts are likely unreadable without MIME-aware tools. --531401748-729306102-1575569848=:9722 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8BIT On Thu, 5 Dec 2019, Qian Cai wrote: > > On Dec 5, 2019, at 12:39 PM, Yang Shi wrote: > > > > There are definitely a few inconsistencies, but I think the manpage is quite clear for this specific case, which says "status is an array of integers that return the status of each page. The array contains valid values only if move_pages() did not return an error." And, it looks kernel just misbehaved since 4.17 due to the fixes commit, so it sounds like a regression too. > > “Only if” in strictly logical term does not necessarily mean it must contain valid values if move_pages() succeed. The intended meaning is that valid values in the status array are provided when the syscall succeeds and not otherwise. In the error case there may be some valid values but since the operation may have aborted not all values may have a value. --531401748-729306102-1575569848=:9722--