Received: by 2002:a05:6a10:206:0:0:0:0 with SMTP id 6csp1224482pxj; Fri, 18 Jun 2021 02:21:19 -0700 (PDT) X-Google-Smtp-Source: ABdhPJx74veQmkVabC+fVitUbpIpr/QU7a8hxFLjsphmQingdgeO/DJO25GB0HTUHNLzUfwSKgeZ X-Received: by 2002:aa7:c84a:: with SMTP id g10mr3629154edt.326.1624008079061; Fri, 18 Jun 2021 02:21:19 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1624008079; cv=none; d=google.com; s=arc-20160816; b=RsFC2BQyHmrJosRoC9dk33ldooCrb6yIKTtAJtb6HILAtaUG/unghondMfnzuuAi7F T2UmZrRIpwrqkLy3YpSO3B3sxH5QqyO1s1dOHlWaSTJO3+QJupcKfPOek/a/EZXFr+ge 1Zwp7O0zRV9sB/Kye/ZYKs+pZGCMF7vifDuvaIQiXGsx2HIx3uERvYlQ74rxJqBbI/5H anxoGKATG/U3lH3fPvflmsrQ0NDEaka8iUVOt4hw5QV9qomp1Zg0pIDNGYZpppVU+8+4 nD0Je5soBjkHVVoB5JuKUJ65K60wDsPXKkKxiyAUBJ9aES10g9gAt57VdHciOwUIoOoi nV5w== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:mime-version:user-agent:message-id:in-reply-to :date:references:subject:cc:to:from:ironport-sdr:ironport-sdr; bh=rPE+MqXDqkmnf8uiPDIVw/okrIdV7cjNbIdG9/HIiyM=; b=IbAJnXTsVE7DJDa+mQ2Cm87SqQsq5hGWG5VZ2DKz8+Q9xF0egkIOCPhgdohYwSu6Sr gIDXKhBQ4F1tuxbD6xLx/u6cyILFr/co/AMfHHrF6fzTByZPD3yDH71C6ZAhcUIbzr7v s5onvXO2V6NrrDMWLObQrmIZiOZF1o1FXcqC5W6c4v/ENn2cfEfHi/QwhW6n96OKYihK NN9oHAFAX79r3mPxL9+lO3kPK0yb3jPT0XRDPjDzPJlMHGFEPpAnnK/KQhOeGr5WKQCH N0C/4d0jeYJNKd7RTcu3sbOXYieNGAQQwve2FOzhmoTHNcnGvLFk4BOk+Guh5pCnGuWG eYTw== ARC-Authentication-Results: i=1; mx.google.com; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.18 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. [23.128.96.18]) by mx.google.com with ESMTP id y11si8640735eda.140.2021.06.18.02.20.56; Fri, 18 Jun 2021 02:21:19 -0700 (PDT) Received-SPF: pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) client-ip=23.128.96.18; Authentication-Results: mx.google.com; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.18 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 S232767AbhFRIRo (ORCPT + 99 others); Fri, 18 Jun 2021 04:17:44 -0400 Received: from mga01.intel.com ([192.55.52.88]:42471 "EHLO mga01.intel.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S232163AbhFRIRn (ORCPT ); Fri, 18 Jun 2021 04:17:43 -0400 IronPort-SDR: wxHc2b2PbL2Z3eIn58pDmNasBlryz180HKPk0P5aBvqDZE8mpi3xENinUQ/Yl64w0Gz4pJ7ESd Xd5qEo+F+WVQ== X-IronPort-AV: E=McAfee;i="6200,9189,10018"; a="228041669" X-IronPort-AV: E=Sophos;i="5.83,283,1616482800"; d="scan'208";a="228041669" Received: from orsmga001.jf.intel.com ([10.7.209.18]) by fmsmga101.fm.intel.com with ESMTP/TLS/ECDHE-RSA-AES256-GCM-SHA384; 18 Jun 2021 01:15:20 -0700 IronPort-SDR: GhhtatfQ/voVXHKGuquDYJLyX5JoHfQQrL+zgp2nFsMIwuz0GWe1zyAUngtEuR/E2o8Vvl/Pzj yoY4Gispk+Nw== X-IronPort-AV: E=Sophos;i="5.83,283,1616482800"; d="scan'208";a="485604188" Received: from yhuang6-desk2.sh.intel.com (HELO yhuang6-desk2.ccr.corp.intel.com) ([10.239.159.119]) by orsmga001-auth.jf.intel.com with ESMTP/TLS/ECDHE-RSA-AES256-GCM-SHA384; 18 Jun 2021 01:15:18 -0700 From: "Huang, Ying" To: Oscar Salvador Cc: linux-mm@kvack.org, linux-kernel@vger.kernel.org, Yang Shi , Dave Hansen , Yang Shi , Michal Hocko , Wei Xu , Dan Williams , David Hildenbrand Subject: Re: [PATCH -V8 04/10] mm/migrate: make migrate_pages() return nr_succeeded References: <20210618061537.434999-1-ying.huang@intel.com> <20210618061537.434999-5-ying.huang@intel.com> <20210618075328.GA23470@linux> Date: Fri, 18 Jun 2021 16:15:15 +0800 In-Reply-To: <20210618075328.GA23470@linux> (Oscar Salvador's message of "Fri, 18 Jun 2021 09:53:33 +0200") Message-ID: <87pmwjpp0s.fsf@yhuang6-desk2.ccr.corp.intel.com> User-Agent: Gnus/5.13 (Gnus v5.13) Emacs/27.1 (gnu/linux) MIME-Version: 1.0 Content-Type: text/plain; charset=ascii Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org Oscar Salvador writes: > On Fri, Jun 18, 2021 at 02:15:31PM +0800, Huang Ying wrote: >> From: Yang Shi >> >> The migrate_pages() returns the number of pages that were not migrated, >> or an error code. When returning an error code, there is no way to know >> how many pages were migrated or not migrated. >> >> In the following patch, migrate_pages() is used to demote pages to PMEM >> node, we need account how many pages are reclaimed (demoted) since page >> reclaim behavior depends on this. Add *nr_succeeded parameter to make >> migrate_pages() return how many pages are demoted successfully for all >> cases. >> >> Signed-off-by: Yang Shi >> Signed-off-by: Dave Hansen >> Signed-off-by: "Huang, Ying" >> Reviewed-by: Yang Shi >> Cc: Michal Hocko >> Cc: Wei Xu >> Cc: Dan Williams >> Cc: David Hildenbrand >> Cc: osalvador > > I thought we all agreed on making nr_succeed an optional argument [1]. > It reduced the churn quite a lot. > > [1] https://patchwork.kernel.org/comment/24104453/ Sorry. Forget changing this. Will change it in the next version. Best Regards, Huang, Ying