From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org X-Spam-Level: X-Spam-Status: No, score=-5.3 required=3.0 tests=HEADER_FROM_DIFFERENT_DOMAINS, INCLUDES_PATCH,MAILING_LIST_MULTI,SPF_HELO_NONE,SPF_PASS,USER_AGENT_SANE_1 autolearn=ham autolearn_force=no version=3.4.0 Received: from mail.kernel.org (mail.kernel.org [198.145.29.99]) by smtp.lore.kernel.org (Postfix) with ESMTP id B43DEC33CAF for ; Mon, 20 Jan 2020 00:31:26 +0000 (UTC) Received: from kanga.kvack.org (kanga.kvack.org [205.233.56.17]) by mail.kernel.org (Postfix) with ESMTP id 527C020678 for ; Mon, 20 Jan 2020 00:31:26 +0000 (UTC) DMARC-Filter: OpenDMARC Filter v1.3.2 mail.kernel.org 527C020678 Authentication-Results: mail.kernel.org; dmarc=fail (p=none dis=none) header.from=linux.intel.com Authentication-Results: mail.kernel.org; spf=pass smtp.mailfrom=owner-linux-mm@kvack.org Received: by kanga.kvack.org (Postfix) id ABD396B0590; Sun, 19 Jan 2020 19:31:25 -0500 (EST) Received: by kanga.kvack.org (Postfix, from userid 40) id A6EA26B0591; Sun, 19 Jan 2020 19:31:25 -0500 (EST) X-Delivered-To: int-list-linux-mm@kvack.org Received: by kanga.kvack.org (Postfix, from userid 63042) id 983276B0592; Sun, 19 Jan 2020 19:31:25 -0500 (EST) X-Delivered-To: linux-mm@kvack.org Received: from forelay.hostedemail.com (smtprelay0187.hostedemail.com [216.40.44.187]) by kanga.kvack.org (Postfix) with ESMTP id 818596B0590 for ; Sun, 19 Jan 2020 19:31:25 -0500 (EST) Received: from smtpin14.hostedemail.com (10.5.19.251.rfc1918.com [10.5.19.251]) by forelay05.hostedemail.com (Postfix) with SMTP id 3E657181AC9CB for ; Mon, 20 Jan 2020 00:31:25 +0000 (UTC) X-FDA: 76396133730.14.sheep54_296e66689d925 X-HE-Tag: sheep54_296e66689d925 X-Filterd-Recvd-Size: 2693 Received: from mga02.intel.com (mga02.intel.com [134.134.136.20]) by imf14.hostedemail.com (Postfix) with ESMTP for ; Mon, 20 Jan 2020 00:31:24 +0000 (UTC) X-Amp-Result: UNKNOWN X-Amp-Original-Verdict: FILE UNKNOWN X-Amp-File-Uploaded: False Received: from orsmga006.jf.intel.com ([10.7.209.51]) by orsmga101.jf.intel.com with ESMTP/TLS/DHE-RSA-AES256-GCM-SHA384; 19 Jan 2020 16:31:22 -0800 X-ExtLoop1: 1 X-IronPort-AV: E=Sophos;i="5.70,340,1574150400"; d="scan'208";a="228167572" Received: from richard.sh.intel.com (HELO localhost) ([10.239.159.54]) by orsmga006.jf.intel.com with ESMTP; 19 Jan 2020 16:31:20 -0800 Date: Mon, 20 Jan 2020 08:31:31 +0800 From: Wei Yang To: David Rientjes Cc: Wei Yang , akpm@linux-foundation.org, linux-mm@kvack.org, linux-kernel@vger.kernel.org, mhocko@suse.com, yang.shi@linux.alibaba.com Subject: Re: [PATCH 2/8] mm/migrate.c: not necessary to check start and i Message-ID: <20200120003131.GA26292@richard> Reply-To: Wei Yang References: <20200119030636.11899-1-richardw.yang@linux.intel.com> <20200119030636.11899-3-richardw.yang@linux.intel.com> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: User-Agent: Mutt/1.9.4 (2018-02-28) X-Bogosity: Ham, tests=bogofilter, spamicity=0.000006, version=1.2.4 Sender: owner-linux-mm@kvack.org Precedence: bulk X-Loop: owner-majordomo@kvack.org List-ID: On Sun, Jan 19, 2020 at 02:14:28PM -0800, David Rientjes wrote: >On Sun, 19 Jan 2020, Wei Yang wrote: > >> diff --git a/mm/migrate.c b/mm/migrate.c >> index ba7cf4fa43a0..c3ef70de5876 100644 >> --- a/mm/migrate.c >> +++ b/mm/migrate.c >> @@ -1664,11 +1664,9 @@ static int do_pages_move(struct mm_struct *mm, nodemask_t task_nodes, >> err = do_move_pages_to_node(mm, &pagelist, current_node); >> if (err) >> goto out; >> - if (i > start) { >> - err = store_status(status, start, current_node, i - start); >> - if (err) >> - goto out; >> - } >> + err = store_status(status, start, current_node, i - start); >> + if (err) >> + goto out; >> current_node = NUMA_NO_NODE; >> } >> out_flush: > >Not sure this is useful, it relies on the implementation of store_status() >when i == start and the overhead of the function call should actually be >slower than the simple conditional to avoid it in that case? Not sure about this. While this patch is a transient state for the following cleanup. The purpose of this is to make the consolidation a little easy to review. -- Wei Yang Help you, Help me