Received: by 2002:a25:e7d8:0:0:0:0:0 with SMTP id e207csp1560718ybh; Sun, 15 Mar 2020 05:51:01 -0700 (PDT) X-Google-Smtp-Source: ADFU+vsE3moBauWYjdFcEYTQsIMKmZ2M4kNWrzZgKTp6wuHM21gQ35bDx1Pe8IBOGgrkMwrK2GVF X-Received: by 2002:aca:61d4:: with SMTP id v203mr7110014oib.72.1584276661762; Sun, 15 Mar 2020 05:51:01 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1584276661; cv=none; d=google.com; s=arc-20160816; b=o4yTRbxmRH/U5O/LgaN9UohtJQSSwYusZtGdSE0prbsGKIhBLEBZzIEwHfUcqvCuIH qi3O4s8QZfQVsmhL2inOQjMG41z9JW6OPxKyGRrCyiVmOhCzQR4MU6Db8JsTv9caNkBI YR3aaSoeQ1+hvqojWnnMVnxCDxLY+vtOO6oAlH58igd+bfKF26lNq9g8xfAx953JfvI1 +D9oZDsbU5LjJp0tlnWtFhbYHMb1/QOnUCVpLqxeuBZ4qP6snhy4zmzUMV+nncXoaUaF k/2TaiFjwhrEOidJQNXXYljtkp0oxCMDR33qXhTbbtdh5mOXaD0X9AAt9Jwssj5+N3hI aCDQ== 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:message-id:subject:cc :to:from:date:dkim-signature; bh=OSsonxsOiZNbFiJ3BbqH+iAht9WuD/N0Mu4OYGtQOMg=; b=xka9wKQLwxPvasemF2gcQnTjqu1Ksw2S4rJXgOZqfJSOwaDx3RCNHXvnHzYzUitjre DMvGlwPCLy3+zeFDUzTSQ4s0WfD8FodsCbDrjk4gEuU2tb1HX1L+HbczX5R1Ex4NPN7k t1SwafkllyRTKBhp4Py6kdgLD+D5rYald7Xlit/8NNp8902+FIke9b7GDwUDJSidZObY P7XTYYYoXsTnVC4sQ3J/f6+LiTsA00Kj6/WTCgzuAkv8FDKc0rfUDV1K5vfgwlPXRK+p 5us3WwMr4PxLGpAFskXeFawTRNzxSkVKpYMxqVqunt10S+bXbfosdrp94IJySIQIuojU FPDg== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@redhat.com header.s=mimecast20190719 header.b=QntT3aAg; 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=NONE dis=NONE) header.from=redhat.com Return-Path: Received: from vger.kernel.org (vger.kernel.org. [209.132.180.67]) by mx.google.com with ESMTP id u9si3934677oib.109.2020.03.15.05.50.38; Sun, 15 Mar 2020 05:51:01 -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=@redhat.com header.s=mimecast20190719 header.b=QntT3aAg; 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=NONE dis=NONE) header.from=redhat.com Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1728523AbgCOMtW (ORCPT + 99 others); Sun, 15 Mar 2020 08:49:22 -0400 Received: from us-smtp-1.mimecast.com ([205.139.110.61]:29908 "EHLO us-smtp-delivery-1.mimecast.com" rhost-flags-OK-OK-OK-FAIL) by vger.kernel.org with ESMTP id S1728410AbgCOMtW (ORCPT ); Sun, 15 Mar 2020 08:49:22 -0400 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=redhat.com; s=mimecast20190719; t=1584276560; h=from:from:reply-to:subject:subject: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=OSsonxsOiZNbFiJ3BbqH+iAht9WuD/N0Mu4OYGtQOMg=; b=QntT3aAgS0M1p9V7aTj/GTjXQdCO3EcNSmlJywNDUKvl17mR4ggOfa2F2f7Y1SyS293OpR NMPzlDp2n/ThdIU4ZXbPF1lyY8YcbOCAdTPzbWqoG7noDzSUHSa+fq532VtL5aApCmu0tp 0bo2Qw76p55MNEIPHyso28eqcgXc+9g= Received: from mimecast-mx01.redhat.com (mimecast-mx01.redhat.com [209.132.183.4]) (Using TLS) by relay.mimecast.com with ESMTP id us-mta-262-RWYnoOrwMrql9SyLyLw4MQ-1; Sun, 15 Mar 2020 08:49:18 -0400 X-MC-Unique: RWYnoOrwMrql9SyLyLw4MQ-1 Received: from smtp.corp.redhat.com (int-mx07.intmail.prod.int.phx2.redhat.com [10.5.11.22]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by mimecast-mx01.redhat.com (Postfix) with ESMTPS id 328D9107ACC7; Sun, 15 Mar 2020 12:49:17 +0000 (UTC) Received: from localhost (ovpn-12-79.pek2.redhat.com [10.72.12.79]) by smtp.corp.redhat.com (Postfix) with ESMTPS id 5735C10027AF; Sun, 15 Mar 2020 12:49:16 +0000 (UTC) Date: Sun, 15 Mar 2020 20:49:13 +0800 From: Baoquan He To: Wei Yang 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: <20200315124913.GA3486@MiWiFi-R3L-srv> References: <20200311011823.27740-1-bhe@redhat.com> <20200314151006.gnkyf4xpqve6b3wx@master> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <20200314151006.gnkyf4xpqve6b3wx@master> User-Agent: Mutt/1.10.1 (2018-07-13) X-Scanned-By: MIMEDefang 2.84 on 10.5.11.22 Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On 03/14/20 at 03:10pm, Wei Yang wrote: > 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? This is for x86_64 only, there's no node_state for N_HIGH_MEMORY. > > 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 >