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 DDE40C33CAF for ; Thu, 23 Jan 2020 22:40:53 +0000 (UTC) Received: from kanga.kvack.org (kanga.kvack.org [205.233.56.17]) by mail.kernel.org (Postfix) with ESMTP id 964D321D7D for ; Thu, 23 Jan 2020 22:40:53 +0000 (UTC) DMARC-Filter: OpenDMARC Filter v1.3.2 mail.kernel.org 964D321D7D 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 418156B028D; Thu, 23 Jan 2020 17:40:53 -0500 (EST) Received: by kanga.kvack.org (Postfix, from userid 40) id 3C80C6B028E; Thu, 23 Jan 2020 17:40:53 -0500 (EST) X-Delivered-To: int-list-linux-mm@kvack.org Received: by kanga.kvack.org (Postfix, from userid 63042) id 2DE286B028F; Thu, 23 Jan 2020 17:40:53 -0500 (EST) X-Delivered-To: linux-mm@kvack.org Received: from forelay.hostedemail.com (smtprelay0200.hostedemail.com [216.40.44.200]) by kanga.kvack.org (Postfix) with ESMTP id 1C43F6B028D for ; Thu, 23 Jan 2020 17:40:53 -0500 (EST) Received: from smtpin06.hostedemail.com (10.5.19.251.rfc1918.com [10.5.19.251]) by forelay03.hostedemail.com (Postfix) with SMTP id A84678248068 for ; Thu, 23 Jan 2020 22:40:52 +0000 (UTC) X-FDA: 76410370344.06.slave68_24af50522352d X-HE-Tag: slave68_24af50522352d X-Filterd-Recvd-Size: 2733 Received: from mga06.intel.com (mga06.intel.com [134.134.136.31]) by imf05.hostedemail.com (Postfix) with ESMTP for ; Thu, 23 Jan 2020 22:40:51 +0000 (UTC) X-Amp-Result: UNKNOWN X-Amp-Original-Verdict: FILE UNKNOWN X-Amp-File-Uploaded: False Received: from fmsmga008.fm.intel.com ([10.253.24.58]) by orsmga104.jf.intel.com with ESMTP/TLS/DHE-RSA-AES256-GCM-SHA384; 23 Jan 2020 14:40:25 -0800 X-ExtLoop1: 1 X-IronPort-AV: E=Sophos;i="5.70,355,1574150400"; d="scan'208";a="222474270" Received: from richard.sh.intel.com (HELO localhost) ([10.239.159.54]) by fmsmga008.fm.intel.com with ESMTP; 23 Jan 2020 14:40:24 -0800 Date: Fri, 24 Jan 2020 06:40:35 +0800 From: Wei Yang To: Yang Shi Cc: Wei Yang , mhocko@suse.com, akpm@linux-foundation.org, linux-mm@kvack.org, linux-kernel@vger.kernel.org, stable@vger.kernel.org Subject: Re: [v2 PATCH] mm: move_pages: report the number of non-attempted pages Message-ID: <20200123224035.GA29851@richard> Reply-To: Wei Yang References: <1579736331-85494-1-git-send-email-yang.shi@linux.alibaba.com> <20200123032736.GA22196@richard> <01fc1c6b-1cab-7f7e-7879-4fc7b0e4a231@linux.alibaba.com> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <01fc1c6b-1cab-7f7e-7879-4fc7b0e4a231@linux.alibaba.com> 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 Wed, Jan 22, 2020 at 07:56:50PM -0800, Yang Shi wrote: > > >On 1/22/20 7:27 PM, Wei Yang wrote: >> On Thu, Jan 23, 2020 at 07:38:51AM +0800, Yang Shi wrote: >> > Since commit a49bd4d71637 ("mm, numa: rework do_pages_move"), >> > the semantic of move_pages() was changed to return the number of >> > non-migrated pages (failed to migration) and the call would be aborted >> > immediately if migrate_pages() returns positive value. But it didn't >> > report the number of pages that we even haven't attempted to migrate. >> > So, fix it by including non-attempted pages in the return value. >> > >> First, we want to change the semantic of move_pages(2). The return value >> indicates the number of pages we didn't managed to migrate? > >This is my understanding. > >> >> Second, the return value from migrate_pages() doesn't mean the number of pages >> we failed to migrate. For example, one -ENOMEM is returned on the first page, >> migrate_pages() would return 1. But actually, no page successfully migrated. > >This would not happen at all since migrate_pages() would just return -ENOMEM >instead of a positive value, right? > Oh, you are right. -- Wei Yang Help you, Help me