Received: by 2002:a25:8b91:0:0:0:0:0 with SMTP id j17csp1044430ybl; Wed, 29 Jan 2020 14:17:38 -0800 (PST) X-Google-Smtp-Source: APXvYqyHBlra1GEqgX8tyYKeDUizS1+9EuevX2LA7cztz3PqNlx/d46oWJMaj0OwC9TSZPLrQZp5 X-Received: by 2002:aca:1c1a:: with SMTP id c26mr816433oic.75.1580336257874; Wed, 29 Jan 2020 14:17:37 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1580336257; cv=none; d=google.com; s=arc-20160816; b=bSMxh5nPeJFlgpPuK7+qqeHTlVrGEo8cE/QZ8zsHktDEDJzs0hSk9yKzr3p6QbUU/C Bdj0XAv3wxyk8N8ryWsa4ttj+XrMSh+k24TpLd6U0O8zVlpwJ91BJJG5RysHCrXyhxaD SxJQHBCKM9NqfzeE7KHozyzLC99JT1Kj08XGf/ZqOBneiVUltOCMzVr4zFZ1xdcVpnp8 T0OJHhlk8JWNbCE7Qs2akBgqo40UqMfWTqKHKhe1yHZwTHJVjydfc1mWW3VOD3kCz1G0 Gf2Bq0oTPSfjMsVMV+35NBPk+i5zFizmuwMvwjHCJnQ0nPzebtpbHDcj4hs6QhkLTgDu 74qA== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:sender:message-id:date:subject:cc:to:from; bh=EE1YKdaXXmRy+OgRTXYHz3mOEPgOwjLsgQe1WDcsHqo=; b=kOyJDI+sblf0BoHQQK+BMxpLxATWPW1AOxthtpEEwhhbTFyCJuh9qVCjDQmi4rCKNx 4iGnhLB8ML+IqcIB+KXg4xSer3hsqwzfABGNLtUhbKuZcSVD0upY/26xViFmMq8lV2Ki VebatHY2X/GxTMZL15Kv5kyxx9MDWMW+UvmDnR39U/Wy5kLAGtFllhFIhuheD0Mpipfj 7M+Tc6KSk7iuaUGj/q6SIfZPJVLIY191W3o3MX1uh08eLi/iI47Gk0Z2p+2VM+wzRWOv LAu3q7tcKOH+u7Sm7TiOizwYcG7Jm9RHpLPghxsLMcxVRxwQwsZ9XS3h8R9u/6IX8O2T OHiw== 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 r82si1641640oie.116.2020.01.29.14.17.25; Wed, 29 Jan 2020 14:17:37 -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 S1726723AbgA2WQa (ORCPT + 99 others); Wed, 29 Jan 2020 17:16:30 -0500 Received: from mga14.intel.com ([192.55.52.115]:57539 "EHLO mga14.intel.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1726222AbgA2WQ3 (ORCPT ); Wed, 29 Jan 2020 17:16:29 -0500 X-Amp-Result: SKIPPED(no attachment in message) X-Amp-File-Uploaded: False Received: from orsmga008.jf.intel.com ([10.7.209.65]) by fmsmga103.fm.intel.com with ESMTP/TLS/DHE-RSA-AES256-GCM-SHA384; 29 Jan 2020 14:16:28 -0800 X-ExtLoop1: 1 X-IronPort-AV: E=Sophos;i="5.70,379,1574150400"; d="scan'208";a="222600055" Received: from richard.sh.intel.com (HELO localhost) ([10.239.159.54]) by orsmga008.jf.intel.com with ESMTP; 29 Jan 2020 14:16:26 -0800 From: Wei Yang To: akpm@linux-foundation.org Cc: linux-mm@kvack.org, linux-kernel@vger.kernel.org, mhocko@suse.com, yang.shi@linux.alibaba.com, rientjes@google.com, david@redhat.com, Wei Yang Subject: [Patch v4 0/4] cleanup on do_pages_move() Date: Thu, 30 Jan 2020 06:16:12 +0800 Message-Id: <20200129221616.25432-1-richardw.yang@linux.intel.com> X-Mailer: git-send-email 2.17.1 Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org The logic in do_pages_move() is a little mess for audience to read and has some potential error on handling the return value. Especially there are three calls on do_move_pages_to_node() and store_status() with almost the same form. This patch set tries to make the code a little friendly for audience by consolidate the calls. v4: * rephrase changelog based on suggestion from David Hildenbrand * trivial change on code style and comment v3: * rebase on top of Yang Shi's fix "mm: move_pages: report the number of non-attempted pages" v2: * remove some unnecessary cleanup Wei Yang (4): mm/migrate.c: no need to check for i > start in do_pages_move() mm/migrate.c: wrap do_move_pages_to_node() and store_status() mm/migrate.c: check pagelist in move_pages_and_store_status() mm/migrate.c: unify "not queued for migration" handling in do_pages_move() mm/migrate.c | 54 ++++++++++++++++++++++++++-------------------------- 1 file changed, 27 insertions(+), 27 deletions(-) -- 2.17.1