Received: by 2002:a25:8b91:0:0:0:0:0 with SMTP id j17csp1200664ybl; Thu, 23 Jan 2020 15:45:52 -0800 (PST) X-Google-Smtp-Source: APXvYqwUHxeIBZW4et21I1gwy5qFcRbbFPUMJxtkgC5mBQXTLtsYfVrEQ2xIvsVTYTTdC37AaVfP X-Received: by 2002:a9d:3c6:: with SMTP id f64mr720523otf.334.1579823152132; Thu, 23 Jan 2020 15:45:52 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1579823152; cv=none; d=google.com; s=arc-20160816; b=UmDk6UAxexLPjWSJ7CB48POAtaFyze/eDNv2+HryZqiQn91TwxyVEpJyUOWCsdF3aE 8c407j8hdbjxOqlFv1hfjv+GGZZOmDiOiVgc5NpoxtRsBOadjrRi/51WUvKxlxXaMIfn NLHWXB5OIszdr4rsZXCaoNgZJTRTbmsnTQSFAbbf4N5uS9Vle9DpdBw1yV5rroiy4EHc OHt3Q57eNQdKFFTFYkoQH70Ncrq+wdyH4448O3Cmp18iPiGYwcXMQY5x0YfJqPAYzrK3 1nws0PfpMXzjgi/mPBadNrgY6h+K8mgAg5+ZKcZFhhk9dvCJ2b64DDQ8yAjw/1IlOehx nWNA== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:sender:user-agent:in-reply-to :content-disposition:mime-version:references:reply-to:message-id :subject:cc:to:from:date; bh=9AlveSFSWpMDJJR/mEaLr2yHmIXR+8UdNbw9CPNLFss=; b=TmNWlQ1trFumjmJLgeM7xHtD5sAXERYcDdnWykxo1paDuzLiAr3r++5A6QNAriQdwz NyoR8Kren9fYWQ/DXLm+gg89VwlFzfIZWMZUZwik4Z6gICCJR/xYBpTUBN345pJFBCGP KSQ82KD7q0RCN3YkaJnPkTQQqE4/9E4iIdmV3W3k0P/Hb2cJ6T/dAiM1yabuLddO/mOd 86rkCoBJbgZzbKNh1FhjbaqioyUxrf86OXPlBDSVfyCw2/yHcyNDbwgTEpdUzEEt6FIh ORQvVzZ96/MPkIEVw9POBQQR6v3OrbU03aoDdU+awToEqBU4LisXr/sGpahqPiRYnozv u9Qw== 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=intel.com Return-Path: Received: from vger.kernel.org (vger.kernel.org. [209.132.180.67]) by mx.google.com with ESMTP id q124si1612134oig.228.2020.01.23.15.45.36; Thu, 23 Jan 2020 15:45:52 -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=intel.com Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1729456AbgAWWkw (ORCPT + 99 others); Thu, 23 Jan 2020 17:40:52 -0500 Received: from mga07.intel.com ([134.134.136.100]:24202 "EHLO mga07.intel.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1729263AbgAWWkw (ORCPT ); Thu, 23 Jan 2020 17:40:52 -0500 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 orsmga105.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) Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org 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