Received: by 2002:a25:1506:0:0:0:0:0 with SMTP id 6csp1129838ybv; Thu, 13 Feb 2020 16:30:36 -0800 (PST) X-Google-Smtp-Source: APXvYqypIRe4bx1K4bOOtpwy8wTNWHkMKIs+IQgKHZbbZubvJweMP/ORpDX1NjIMFAZZi5yXt4Wz X-Received: by 2002:aca:4c11:: with SMTP id z17mr169098oia.104.1581640236747; Thu, 13 Feb 2020 16:30:36 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1581640236; cv=none; d=google.com; s=arc-20160816; b=njglbW/RvogI2iMJ1SoFFxXg3yvaSZ9uuE4FygJlrEJF8qZp4YjtnCFL0O9mh1jZM0 uRxNLyusR9GmU6PQklp9JgBW3TjEnjx8vvpXoYbW3FkMoROMGYtfMCLxWhWZraTSRxog nHZQFaC8WVmQR5Tm9nHqGvOtocMiKbrjHlzlHehxGTZ+f9OAwSqYR0bGoFFLfg0gMGCf 0zWI3T4+wru95XFLRrlmo2rcmZJLPmj3abHwevCtSOoS3wdMApSZQ2C5EffqR9iTg4dU +xcBK7de+aXjuh8vkcola7PXhLAFDwDwDpLQQHO/2LFIlOID1P658BbV/niju3nztIpZ bpAg== 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=opeTvzA07mBeing/qyW1EPPScELMnEUhezJP6jQI9kA=; b=zJ+WWwP3T0YqOJppGhv8g4VfMvm042MoRzIV1ylK4hhFYVEp698r/GU8UPSYX+GOU0 acHv5chhZ+gAKAWtXAM/Wcg6a766T9Ph62YHumap00E1XYO5alRcW55AhRoEH8r+0AHP 6h/jpqrrSJZxmVrITpLgpRyG25Re/TdoODgn27V5xJgBn+8HdZ/LnYBun96c8+gRpRE6 LUx8wV25RVGH9vdi7ze39SKdXciI0gV+RyiA+GsBRTaTi2kKpQW0JXWKUcKGVj27H5GQ rGRHpe0S+4meUzuZvxRhNU7N8f4iJAUUqnYuWks5oCxPrwXKvjAw9dEb2y3MV9RmZqj2 FkQA== 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 f5si1894269otp.129.2020.02.13.16.30.23; Thu, 13 Feb 2020 16:30:36 -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 S1728003AbgBNAaO (ORCPT + 99 others); Thu, 13 Feb 2020 19:30:14 -0500 Received: from mga06.intel.com ([134.134.136.31]:24000 "EHLO mga06.intel.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1727594AbgBNAaO (ORCPT ); Thu, 13 Feb 2020 19:30:14 -0500 X-Amp-Result: SKIPPED(no attachment in message) X-Amp-File-Uploaded: False Received: from orsmga001.jf.intel.com ([10.7.209.18]) by orsmga104.jf.intel.com with ESMTP/TLS/DHE-RSA-AES256-GCM-SHA384; 13 Feb 2020 16:30:14 -0800 X-ExtLoop1: 1 X-IronPort-AV: E=Sophos;i="5.70,438,1574150400"; d="scan'208";a="313906917" Received: from richard.sh.intel.com (HELO localhost) ([10.239.159.54]) by orsmga001.jf.intel.com with ESMTP; 13 Feb 2020 16:30:11 -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 v5 0/4] cleanup on do_pages_move() Date: Fri, 14 Feb 2020 08:30:13 +0800 Message-Id: <20200214003017.25558-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. v5: : rebase on top of latest upstream, "linux/pipe_fs_i.h: fix kernel-doc warnings after @wait was split" 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 | 88 +++++++++++++++++++++++----------------------------- 1 file changed, 39 insertions(+), 49 deletions(-) -- 2.17.1