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.3 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 F2367C33CB6 for ; Sun, 19 Jan 2020 02:17:08 +0000 (UTC) Received: from kanga.kvack.org (kanga.kvack.org [205.233.56.17]) by mail.kernel.org (Postfix) with ESMTP id C26A42468C for ; Sun, 19 Jan 2020 02:17:08 +0000 (UTC) DMARC-Filter: OpenDMARC Filter v1.3.2 mail.kernel.org C26A42468C Authentication-Results: mail.kernel.org; dmarc=fail (p=none dis=none) header.from=linux.intel.com Authentication-Results: mail.kernel.org; spf=pass smtp.mailfrom=owner-linux-mm@kvack.org Received: by kanga.kvack.org (Postfix) id 5A2E46B0546; Sat, 18 Jan 2020 21:17:08 -0500 (EST) Received: by kanga.kvack.org (Postfix, from userid 40) id 5524B6B0547; Sat, 18 Jan 2020 21:17:08 -0500 (EST) X-Delivered-To: int-list-linux-mm@kvack.org Received: by kanga.kvack.org (Postfix, from userid 63042) id 467816B0548; Sat, 18 Jan 2020 21:17:08 -0500 (EST) X-Delivered-To: linux-mm@kvack.org Received: from forelay.hostedemail.com (smtprelay0179.hostedemail.com [216.40.44.179]) by kanga.kvack.org (Postfix) with ESMTP id 30C2D6B0546 for ; Sat, 18 Jan 2020 21:17:08 -0500 (EST) Received: from smtpin16.hostedemail.com (10.5.19.251.rfc1918.com [10.5.19.251]) by forelay04.hostedemail.com (Postfix) with SMTP id B9B294405 for ; Sun, 19 Jan 2020 02:17:07 +0000 (UTC) X-FDA: 76392771294.16.bell35_210f6e6737d58 X-HE-Tag: bell35_210f6e6737d58 X-Filterd-Recvd-Size: 2615 Received: from mga05.intel.com (mga05.intel.com [192.55.52.43]) by imf26.hostedemail.com (Postfix) with ESMTP for ; Sun, 19 Jan 2020 02:17:07 +0000 (UTC) X-Amp-Result: UNKNOWN X-Amp-Original-Verdict: FILE UNKNOWN X-Amp-File-Uploaded: False Received: from orsmga008.jf.intel.com ([10.7.209.65]) by fmsmga105.fm.intel.com with ESMTP/TLS/DHE-RSA-AES256-GCM-SHA384; 18 Jan 2020 18:17:05 -0800 X-ExtLoop1: 1 X-IronPort-AV: E=Sophos;i="5.70,336,1574150400"; d="scan'208";a="219304997" Received: from richard.sh.intel.com (HELO localhost) ([10.239.159.54]) by orsmga008.jf.intel.com with ESMTP; 18 Jan 2020 18:17:04 -0800 Date: Sun, 19 Jan 2020 10:17:15 +0800 From: Wei Yang To: Mike Kravetz Cc: Wei Yang , Yang Shi , Andrew Morton , Linux MM , Linux Kernel Mailing List Subject: Re: [PATCH] mm/migrate.c: also overwrite error when it is bigger than zero Message-ID: <20200119021715.GB9745@richard> Reply-To: Wei Yang References: <20200117074534.25324-1-richardw.yang@linux.intel.com> <20200117222740.GB29229@richard> <20200117234829.GA2844@richard> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: User-Agent: Mutt/1.9.4 (2018-02-28) X-Bogosity: Ham, tests=bogofilter, spamicity=0.000000, version=1.2.4 Sender: owner-linux-mm@kvack.org Precedence: bulk X-Loop: owner-majordomo@kvack.org List-ID: On Fri, Jan 17, 2020 at 05:38:10PM -0800, Mike Kravetz wrote: >On 1/17/20 3:48 PM, Wei Yang wrote: >> This is another point I think current code is not working well. And actually, >> the behavior is not well defined or our kernel is broken for a while. >> >> When you look at the man page, it says: >> >> RETURN VALUE >> On success move_pages() returns zero. On error, it returns -1, and sets errno to indicate the error >> > >Is this from your migrate_pages(2) man page? > It is from my move_pages(2) man page. >The latest version of the migrate_pages(2) man page in the git repo has this >for RETURN VALUE. > >RETURN VALUE > On success migrate_pages() returns the number of pages that could not > be moved (i.e., a return of zero means that all pages were successfully > moved). On error, it returns -1, and sets errno to indicate the error. > >-- >Mike Kravetz -- Wei Yang Help you, Help me