Received: by 2002:a25:e7d8:0:0:0:0:0 with SMTP id e207csp1141195ybh; Sat, 14 Mar 2020 19:11:05 -0700 (PDT) X-Google-Smtp-Source: ADFU+vv7X/AWIx7hCL7eRHOpOc6tD2zqWwLqT2vSZ+vRUfxDozqd5T+94fmY5V9RJgGxqBQp+Vws X-Received: by 2002:a9d:6aca:: with SMTP id m10mr3428773otq.116.1584238264853; Sat, 14 Mar 2020 19:11:04 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1584238264; cv=none; d=google.com; s=arc-20160816; b=eaMyeWwjLJhfQrUOI2sc/SoF4AGMEfqKUNRUJYn6nGAnODbmjQ4Os7AdwxzYGSvq/b TBNrD8uobwO8R1FEVN0fY4d3vEeyvT819gLPNKNExCZNFPhk1h6zn/6XGDFsDC01Qw3P lnXI/w3TcJ/Wl42p5xiv6aWG7j1pjbNaNBjhys6Esn+cRXQkor08Mbx99Dg7I+TC6ewW /Zb7ejHK07Sp2x93m3/apMRLkFaZgntpEdWGRu4oCVf5AmTTNGotDm+7jpimjKaxxWXv Btvv7hlphIjnAruzIGG80217INXwcdVEvuRGnzhN94egWhfLIfWYexjodpn/yK2FzzNU CSEA== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:sender:user-agent:in-reply-to :content-disposition:mime-version:references:reply-to:message-id :subject:cc:to:from:date:dkim-signature; bh=ccS1Io8/tHjBzzXmHi5hIITMhMP463waFk/FT4O6b9c=; b=L62x7bxbYYqlmc8uam0xFsJW85SiND8WzvxGuLkQnyZUvV+00Hi7Zbeeoy0utz0/JR 7VbVXOqy/+18tkKO01CXkMRQt1ERygwBorgu+qYYKhL2aju1DlrHbOTfFaC7iv3HNgDe vtDSHzStw4+CQ5pPYD/KvdS/zN2Qa4rlR3FcV0Rnpp4/Xg6OVCRzpoAlBP2EUFgPLQIb ToRfMoUqLlCN6UPiRoaDPuRJ1kZ0O8MjYPRkFuiT/Hy/xgnq9L8LGfim4FuGtO2sjMrK OlmoZWDZbjVPozUlgDGIl3VhXP5iy3hm83Numwp41AfYRABQN6UP1KzxFW6/p+YHW3ud R10w== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@gmail.com header.s=20161025 header.b=UB05glch; 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=pass (p=NONE sp=QUARANTINE dis=NONE) header.from=gmail.com Return-Path: Received: from vger.kernel.org (vger.kernel.org. [209.132.180.67]) by mx.google.com with ESMTP id h12si7410278otr.193.2020.03.14.19.10.52; Sat, 14 Mar 2020 19:11:04 -0700 (PDT) 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; dkim=pass header.i=@gmail.com header.s=20161025 header.b=UB05glch; 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=pass (p=NONE sp=QUARANTINE dis=NONE) header.from=gmail.com Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1727266AbgCOCJq (ORCPT + 99 others); Sat, 14 Mar 2020 22:09:46 -0400 Received: from mail-wm1-f66.google.com ([209.85.128.66]:37699 "EHLO mail-wm1-f66.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1726599AbgCOCJq (ORCPT ); Sat, 14 Mar 2020 22:09:46 -0400 Received: by mail-wm1-f66.google.com with SMTP id a141so14272951wme.2 for ; Sat, 14 Mar 2020 19:09:44 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20161025; h=date:from:to:cc:subject:message-id:reply-to:references:mime-version :content-disposition:in-reply-to:user-agent; bh=ccS1Io8/tHjBzzXmHi5hIITMhMP463waFk/FT4O6b9c=; b=UB05glchFZAl8zn/zEVTCAbaSZjJAoMX616sX7k12GQs0VQpsJ23m8fe05YmrSK4II h+EmU+omPYHmSXBFhkdYXLmd9F/2scxD+cOuVYS+Afi/ZsrYjWX96/922LspJ6cRyU1O SGJPq8h1/oB/zJ2KQMrbdORZEgem+cuz3tHUwfFz6OML+1dt0yXkUtIdwqEB2ZhdF/HT pltvYCSwsNMLqAnHPvI4u9ez4ktI1SULwImMlz2GC0Cyt7gCG7ay5Uo2R3Oj33gyDoTz ttV4ZlTieQaiTieNb5m4RcG/Nxs2b2C670tnZlsPkfNXezf58dJy5tExAEiWOLmg0LVa RoiQ== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:date:from:to:cc:subject:message-id:reply-to :references:mime-version:content-disposition:in-reply-to:user-agent; bh=ccS1Io8/tHjBzzXmHi5hIITMhMP463waFk/FT4O6b9c=; b=ABJBFbqMCnqj790/oBX5NH2mGwhZ6uwUOEHPLkuRAZ9ywXt+MrINaeZ8+OLVsrSPAv if3fOBQn09UG9W3kt+DrYx2XDwya9b9b1EAaMYwthSHnhjseOeNBZuxjp1ESAkf7Zmbb wb10aLkuU/EcYXaGAnz4W+PGew62O9C9IosbKXCD7iGKxTULv/uMIlFQUkYVduIfsR+S WLHY15pIBbJN8gb85yNDQ5W8Uc+s7A6f0vPEswljDYehuV3CcnQlXUSU1ckxA4pNHBUu O1VGa/NuPiuvlflMVznoMH8gd7y0JEFv8YkSgcSL1XgTfjVqfIGPD1KVswXqRWOiYhON lqNw== X-Gm-Message-State: ANhLgQ3Pb8W+8pDysmIWSRwYBmpRJIBi7oQNMYXOa86iNOL4QUroJ3jv Mvas9uIiY6FonpskHaJ/5JJ9kv4S X-Received: by 2002:a1c:6745:: with SMTP id b66mr16906246wmc.30.1584198608562; Sat, 14 Mar 2020 08:10:08 -0700 (PDT) Received: from localhost ([185.92.221.13]) by smtp.gmail.com with ESMTPSA id s22sm20213613wmc.16.2020.03.14.08.10.06 (version=TLS1_2 cipher=ECDHE-RSA-CHACHA20-POLY1305 bits=256/256); Sat, 14 Mar 2020 08:10:07 -0700 (PDT) Date: Sat, 14 Mar 2020 15:10:06 +0000 From: Wei Yang To: Baoquan He Cc: linux-kernel@vger.kernel.org, linux-mm@kvack.org, x86@kernel.org, mhocko@suse.com, akpm@linux-foundation.org Subject: Re: [PATCH v2] x86/mm: Remove the redundant conditional check Message-ID: <20200314151006.gnkyf4xpqve6b3wx@master> Reply-To: Wei Yang References: <20200311011823.27740-1-bhe@redhat.com> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <20200311011823.27740-1-bhe@redhat.com> User-Agent: NeoMutt/20170113 (1.7.2) Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On Wed, Mar 11, 2020 at 09:18:23AM +0800, Baoquan He wrote: >In commit f70029bbaacb ("mm, memory_hotplug: drop CONFIG_MOVABLE_NODE"), >the dependency on CONFIG_MOVABLE_NODE was removed for N_MEMORY. Before >commit f70029bbaacb, CONFIG_HIGHMEM && !CONFIG_MOVABLE_NODE could make >(N_MEMORY == N_NORMAL_MEMORY) be true. After commit f70029bbaacb, N_MEMORY >doesn't have any chance to be equal to N_NORMAL_MEMORY. So the conditional >check in paging_init() doesn't make sense any more. Let's remove it. > >Signed-off-by: Baoquan He The change looks good. While I have one question, we set default value for N_HIGH_MEMORY. Why we don't clear this too? Reviewed-by: Wei Yang >--- >v1->v2: > Update patch log to make the description clearer per Michal's > suggestion. > > arch/x86/mm/init_64.c | 3 +-- > 1 file changed, 1 insertion(+), 2 deletions(-) > >diff --git a/arch/x86/mm/init_64.c b/arch/x86/mm/init_64.c >index abbdecb75fad..0a14711d3a93 100644 >--- a/arch/x86/mm/init_64.c >+++ b/arch/x86/mm/init_64.c >@@ -818,8 +818,7 @@ void __init paging_init(void) > * will not set it back. > */ > node_clear_state(0, N_MEMORY); >- if (N_MEMORY != N_NORMAL_MEMORY) >- node_clear_state(0, N_NORMAL_MEMORY); >+ node_clear_state(0, N_NORMAL_MEMORY); > > zone_sizes_init(); > } >-- >2.17.2 -- Wei Yang Help you, Help me