Received: by 2002:a25:e7d8:0:0:0:0:0 with SMTP id e207csp358752ybh; Wed, 11 Mar 2020 02:29:11 -0700 (PDT) X-Google-Smtp-Source: ADFU+vtioH6yVPivSyEHV8FSmfACRYMxw8wiQZgW9pMs5KvFjtfOVlaSWKoCWf/NuK8hjffimqdn X-Received: by 2002:a9d:7359:: with SMTP id l25mr1620236otk.18.1583918951132; Wed, 11 Mar 2020 02:29:11 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1583918951; cv=none; d=google.com; s=arc-20160816; b=VSu13ELdG8yJR3AnuRANg65mKpZ7XPd/n9qadfpgT9EDx4cy/Q7/MstIEWGjTy5Ihc Mmouh7RPFAAulDONiiF7ywz7/oX/g9sYBRZxnFsa0aLG6paZptHssLUXCqGznfY9V6WA m7aQrJ10AJRUb7XV4A6pKd8lJahIfvu+Ed4q2FgSTwSzHNCmhR73+/ndQKvYO3EXVBnw 16azzkmUuH7Y+LPrQzpLdFDMrWGP4spA1l+T/TzE2BMEOrPV7e214/2wmClCL4NMbtEo 9yArP1bb1el0gfg+5mM0jdi8gNbVmhkHiWqfl8P0ds4ePG5i7kBzUCtsPc+SRpYfq2Nf QQNQ== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:sender:in-reply-to:content-disposition :mime-version:references:message-id:subject:cc:to:from:date; bh=6HDgqWtxzx0YdOe7/T+nmkFIQiMnqZT0BKBTXUpjOCU=; b=r4RC2NEE/ruDWEZKf1h+aiYYGhn/wSuU42f9eA9D9OBZtZcn/KN3sCBfOIkuzrIbsL rs+C5ELFJf8PvPAo9lB4CEyyDUGTu5YXUG8O/cPL/lyVSs5BHSfrLMA91ZPAv9814u0g 09LYbTvRLWrkxif8hrnZFqeKrDGdl+/1YKK4QWI5s20CM+GHrJnhYcMuz7nrRZM9s9jR KyIrGPh266q2/1KJ7S8WNHgAaF3CWCG8BcJiSF5cjtuqDxbGrFcTVgLk4+COVMsCxA4h GltcY0Q8Q+NNXc6w72egYM+8VFEdnD84LTBBghxOR3eqBb1lsOZzss1UYeXccadiYhDS ezoQ== 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=kernel.org Return-Path: Received: from vger.kernel.org (vger.kernel.org. [209.132.180.67]) by mx.google.com with ESMTP id u199si898992oif.110.2020.03.11.02.28.59; Wed, 11 Mar 2020 02:29:11 -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; 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=kernel.org Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1728649AbgCKJ1W (ORCPT + 99 others); Wed, 11 Mar 2020 05:27:22 -0400 Received: from mail-wr1-f67.google.com ([209.85.221.67]:33895 "EHLO mail-wr1-f67.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1726934AbgCKJ1V (ORCPT ); Wed, 11 Mar 2020 05:27:21 -0400 Received: by mail-wr1-f67.google.com with SMTP id z15so1633003wrl.1 for ; Wed, 11 Mar 2020 02:27:21 -0700 (PDT) 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:references :mime-version:content-disposition:in-reply-to; bh=6HDgqWtxzx0YdOe7/T+nmkFIQiMnqZT0BKBTXUpjOCU=; b=t3o3bihLjTYyXZ20mRbEGlENjOhtmJyxiDOo9WdTmmSHoqmxNw3aC6xA/32HsnoZBi zFYEFcS7oI8HNA8Bnhd3P7qAGM6HMbAc8LcceeQU2jHxTagogLuOrnNzsfMT06TSnG3e /jDe8pbCy02Xw/Xlroe3rYCbncP1LZer236D7KBAyxcoUqRn7z0ozV86kYiqfwUwKkrH K+LAXRqX2U1Z48pgIOafxdWhl0k0MOHRiuuKuOwtYT03hZT2Gp3Hn0QHYkPA/eyq3RAA qEYWrYIgv92RBXdCk0IJWCAe0HRt9PacDlJu2k7dkFHR6osWFK+QhuPnFx5ZULdX6YAz X8Ag== X-Gm-Message-State: ANhLgQ3UB1AKot7bmTuoGg8wDzmDayQWIOi+aQfmjglSy+n4ZvhQuoRY FFHaNBJLb8DiR7/f/+FT9qI= X-Received: by 2002:adf:e98f:: with SMTP id h15mr3475093wrm.263.1583918839739; Wed, 11 Mar 2020 02:27:19 -0700 (PDT) Received: from localhost (prg-ext-pat.suse.com. [213.151.95.130]) by smtp.gmail.com with ESMTPSA id a26sm7815970wmm.18.2020.03.11.02.27.18 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Wed, 11 Mar 2020 02:27:19 -0700 (PDT) Date: Wed, 11 Mar 2020 10:27:18 +0100 From: Michal Hocko To: Baoquan He Cc: linux-kernel@vger.kernel.org, linux-mm@kvack.org, x86@kernel.org, akpm@linux-foundation.org Subject: Re: [PATCH v2] x86/mm: Remove the redundant conditional check Message-ID: <20200311092718.GG23944@dhcp22.suse.cz> 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> Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On Wed 11-03-20 09:18:23, 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 Acked-by: Michal Hocko Thanks! > --- > 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 -- Michal Hocko SUSE Labs