Received: by 2002:a05:6a10:206:0:0:0:0 with SMTP id 6csp1221045pxj; Fri, 18 Jun 2021 02:15:30 -0700 (PDT) X-Google-Smtp-Source: ABdhPJw0dvakEj9kCJDGzbrnnVIerv6/dsGTYQ+zLKms5ESU6lId13cCMDjNpTxyXfkhgBpgTiAK X-Received: by 2002:a17:906:3c56:: with SMTP id i22mr10082890ejg.369.1624007729833; Fri, 18 Jun 2021 02:15:29 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1624007729; cv=none; d=google.com; s=arc-20160816; b=zO6byTxTNdbWqVPYW0Wwf1weJUJCpCAr2qsCZrj8Y+d44TscTTs0lcs9d0lb0vIPjV O4OtmeJ9VqZcvye5rUFTIPY+PBPk3+w81YXDUGkec2UzlfJ4NDtBkFVKHQcbMt9+uTjM GMrd/yP0OBfXn37OqXStvNtGE8Nhs0LmYovhUbeuz2H0KG+6JEI4tAF3OEGICpEJUmQT geXNseqKQVq+bwpLNYFrZyDvcOtV5CzhfAJSuyuMUeCfIZJL2IQ0AB1/1fwSknA1dIBa v5s6Y+l88FWa7vtzprg1OPHIjvd+sT5VxvRikm3w3e6PF2Ndnujd9cQ6ipzAtANJsTAk 59Kg== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:user-agent:in-reply-to:content-disposition :mime-version:references:message-id:subject:cc:to:from:date :dkim-signature:dkim-signature:dkim-signature:dkim-signature; bh=nvivQRnbw0lq6DwS0bzrS7/TCENjmTPFP8+H7Q1VDjM=; b=ffUbRcRrZH3uFiGPKMt9/E6sMCD6vSaoiRmwoMlZC1mj4YWBVhHnob+pmHFPld5zjJ HRBIEGwbiNc0hC8m65kxDeWgsvjGkF2kfZvATQnYWGAaqx+mnMTJa10pZl0lj+oE1Dds /fHlb0LErNO2wDL185yOvstjWNmsL/sc64YzjUiWNQFyo0etNk6bHun57+p/rxTKh1/b FScoNiKB+tG7bgvCOu2Q4vu7HUXWYjJB+yIiMlXv9ihSjbdLWvWPia5I5BfK+OLkqVah KlY3QmUeUaSwSeTu55vF7ayGgnlULHkyVfTO+GyWwxotE367v3s8g2aMTC/o6O2JbK5z Z9ow== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@suse.de header.s=susede2_rsa header.b=RylMVhSJ; dkim=neutral (no key) header.i=@suse.de header.s=susede2_ed25519; dkim=pass header.i=@suse.de header.s=susede2_rsa header.b=RylMVhSJ; dkim=neutral (no key) header.i=@suse.de header.s=susede2_ed25519; 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 Return-Path: Received: from vger.kernel.org (vger.kernel.org. [23.128.96.18]) by mx.google.com with ESMTP id l20si1773462edr.191.2021.06.18.02.15.07; Fri, 18 Jun 2021 02:15:29 -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; dkim=pass header.i=@suse.de header.s=susede2_rsa header.b=RylMVhSJ; dkim=neutral (no key) header.i=@suse.de header.s=susede2_ed25519; dkim=pass header.i=@suse.de header.s=susede2_rsa header.b=RylMVhSJ; dkim=neutral (no key) header.i=@suse.de header.s=susede2_ed25519; 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 Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S233526AbhFRHzv (ORCPT + 99 others); Fri, 18 Jun 2021 03:55:51 -0400 Received: from smtp-out1.suse.de ([195.135.220.28]:37194 "EHLO smtp-out1.suse.de" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S233521AbhFRHzp (ORCPT ); Fri, 18 Jun 2021 03:55:45 -0400 Received: from imap.suse.de (imap-alt.suse-dmz.suse.de [192.168.254.47]) (using TLSv1.2 with cipher ECDHE-ECDSA-AES128-GCM-SHA256 (128/128 bits)) (No client certificate requested) by smtp-out1.suse.de (Postfix) with ESMTPS id CDDED21AF1; Fri, 18 Jun 2021 07:53:35 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=suse.de; s=susede2_rsa; t=1624002815; h=from:from:reply-to:date:date:message-id:message-id:to:to:cc:cc: mime-version:mime-version:content-type:content-type: in-reply-to:in-reply-to:references:references; bh=nvivQRnbw0lq6DwS0bzrS7/TCENjmTPFP8+H7Q1VDjM=; b=RylMVhSJDCZ4vYAKct7MP45fy/0v8eXlt6fJ9GyAOWM8TtTkVm9ikFHwe8B7TZOPAu4jhr bEiZE2C0eHuh5zIYsfzy+Bl9CQYH2qWLWGLaVnLQFtI1mF/DpX2dS/8yeYLCx31RDjf+Mv J0R2uux6U559FszYSQSUsuVQ1hlF2AY= DKIM-Signature: v=1; a=ed25519-sha256; c=relaxed/relaxed; d=suse.de; s=susede2_ed25519; t=1624002815; h=from:from:reply-to:date:date:message-id:message-id:to:to:cc:cc: mime-version:mime-version:content-type:content-type: in-reply-to:in-reply-to:references:references; bh=nvivQRnbw0lq6DwS0bzrS7/TCENjmTPFP8+H7Q1VDjM=; b=gNbjBM021OmwoYdiVo8jhqJECQU7QIsvLkKaS1cS7dmi9EqM2DaD8d2OkKMPEhDUNap8bo EcNSVqbUct3OYaBA== Received: from imap3-int (imap-alt.suse-dmz.suse.de [192.168.254.47]) by imap.suse.de (Postfix) with ESMTP id 20034118DD; Fri, 18 Jun 2021 07:53:35 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=suse.de; s=susede2_rsa; t=1624002815; h=from:from:reply-to:date:date:message-id:message-id:to:to:cc:cc: mime-version:mime-version:content-type:content-type: in-reply-to:in-reply-to:references:references; bh=nvivQRnbw0lq6DwS0bzrS7/TCENjmTPFP8+H7Q1VDjM=; b=RylMVhSJDCZ4vYAKct7MP45fy/0v8eXlt6fJ9GyAOWM8TtTkVm9ikFHwe8B7TZOPAu4jhr bEiZE2C0eHuh5zIYsfzy+Bl9CQYH2qWLWGLaVnLQFtI1mF/DpX2dS/8yeYLCx31RDjf+Mv J0R2uux6U559FszYSQSUsuVQ1hlF2AY= DKIM-Signature: v=1; a=ed25519-sha256; c=relaxed/relaxed; d=suse.de; s=susede2_ed25519; t=1624002815; h=from:from:reply-to:date:date:message-id:message-id:to:to:cc:cc: mime-version:mime-version:content-type:content-type: in-reply-to:in-reply-to:references:references; bh=nvivQRnbw0lq6DwS0bzrS7/TCENjmTPFP8+H7Q1VDjM=; b=gNbjBM021OmwoYdiVo8jhqJECQU7QIsvLkKaS1cS7dmi9EqM2DaD8d2OkKMPEhDUNap8bo EcNSVqbUct3OYaBA== Received: from director2.suse.de ([192.168.254.72]) by imap3-int with ESMTPSA id xR5rBP9QzGD2TgAALh3uQQ (envelope-from ); Fri, 18 Jun 2021 07:53:35 +0000 Date: Fri, 18 Jun 2021 09:53:33 +0200 From: Oscar Salvador To: Huang Ying 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 Message-ID: <20210618075328.GA23470@linux> References: <20210618061537.434999-1-ying.huang@intel.com> <20210618061537.434999-5-ying.huang@intel.com> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <20210618061537.434999-5-ying.huang@intel.com> User-Agent: Mutt/1.10.1 (2018-07-13) Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org 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/ -- Oscar Salvador SUSE L3