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=-2.4 required=3.0 tests=DKIMWL_WL_HIGH,DKIM_SIGNED, DKIM_VALID,DKIM_VALID_AU,HEADER_FROM_DIFFERENT_DOMAINS,MAILING_LIST_MULTI, SPF_HELO_NONE,SPF_PASS,USER_AGENT_SANE_1 autolearn=no 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 562DFC18E5B for ; Tue, 10 Mar 2020 14:23:53 +0000 (UTC) Received: from kanga.kvack.org (kanga.kvack.org [205.233.56.17]) by mail.kernel.org (Postfix) with ESMTP id 0078121D56 for ; Tue, 10 Mar 2020 14:23:52 +0000 (UTC) Authentication-Results: mail.kernel.org; dkim=pass (1024-bit key) header.d=redhat.com header.i=@redhat.com header.b="e2R9D0K6" DMARC-Filter: OpenDMARC Filter v1.3.2 mail.kernel.org 0078121D56 Authentication-Results: mail.kernel.org; dmarc=fail (p=none dis=none) header.from=redhat.com Authentication-Results: mail.kernel.org; spf=pass smtp.mailfrom=owner-linux-mm@kvack.org Received: by kanga.kvack.org (Postfix) id 552EF6B0005; Tue, 10 Mar 2020 10:23:52 -0400 (EDT) Received: by kanga.kvack.org (Postfix, from userid 40) id 4DCED6B0006; Tue, 10 Mar 2020 10:23:52 -0400 (EDT) X-Delivered-To: int-list-linux-mm@kvack.org Received: by kanga.kvack.org (Postfix, from userid 63042) id 3CAC26B0007; Tue, 10 Mar 2020 10:23:52 -0400 (EDT) X-Delivered-To: linux-mm@kvack.org Received: from forelay.hostedemail.com (smtprelay0028.hostedemail.com [216.40.44.28]) by kanga.kvack.org (Postfix) with ESMTP id 1E8366B0005 for ; Tue, 10 Mar 2020 10:23:52 -0400 (EDT) Received: from smtpin08.hostedemail.com (10.5.19.251.rfc1918.com [10.5.19.251]) by forelay04.hostedemail.com (Postfix) with ESMTP id EC3BD2C06 for ; Tue, 10 Mar 2020 14:23:51 +0000 (UTC) X-FDA: 76579671462.08.truck20_21b1ce20f095b X-HE-Tag: truck20_21b1ce20f095b X-Filterd-Recvd-Size: 3353 Received: from us-smtp-1.mimecast.com (us-smtp-delivery-1.mimecast.com [207.211.31.120]) by imf46.hostedemail.com (Postfix) with ESMTP for ; Tue, 10 Mar 2020 14:23:51 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=redhat.com; s=mimecast20190719; t=1583850230; 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=05PIOiFb78HsL2N8Fu5QTXsjc0scQVZNt+rybP6Bu5M=; b=e2R9D0K6i0Gw7JjdmCSZOAEUDq1vREXmRGO+6deRdAP28h2KhqUHAZbm/y9YwLh6LWahXL hyH4u9Mn0nBzIcG1g6Mi3Oi52ZPkPSPe82INL2trcSTWO5X+fxroa/hvgLUZwXuohKEL1R dOwZJKrL/ZB8OKnaYIFfT0MXN9Lbk3g= 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-469-BpZmEdNTPWa396AMN9XpVw-1; Tue, 10 Mar 2020 10:23:47 -0400 X-MC-Unique: BpZmEdNTPWa396AMN9XpVw-1 Received: from smtp.corp.redhat.com (int-mx03.intmail.prod.int.phx2.redhat.com [10.5.11.13]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by mimecast-mx01.redhat.com (Postfix) with ESMTPS id 84A0C108C30F; Tue, 10 Mar 2020 14:23:45 +0000 (UTC) Received: from localhost (ovpn-12-154.pek2.redhat.com [10.72.12.154]) by smtp.corp.redhat.com (Postfix) with ESMTPS id CB8D060BEE; Tue, 10 Mar 2020 14:23:44 +0000 (UTC) Date: Tue, 10 Mar 2020 22:23:41 +0800 From: Baoquan He To: Michal Hocko Cc: linux-kernel@vger.kernel.org, linux-mm@kvack.org, akpm@linux-foundation.org, x86@kernel.org Subject: Re: [PATCH] x86/mm: Remove the redundant conditional check Message-ID: <20200310142341.GG27711@MiWiFi-R3L-srv> References: <20200308013511.12792-1-bhe@redhat.com> <20200310101044.GE8447@dhcp22.suse.cz> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <20200310101044.GE8447@dhcp22.suse.cz> User-Agent: Mutt/1.10.1 (2018-07-13) X-Scanned-By: MIMEDefang 2.79 on 10.5.11.13 X-Bogosity: Ham, tests=bogofilter, spamicity=0.000000, version=1.2.4 Sender: owner-linux-mm@kvack.org Precedence: bulk X-Loop: owner-majordomo@kvack.org List-ID: On 03/10/20 at 11:10am, Michal Hocko wrote: > On Sun 08-03-20 09:35:11, Baoquan He wrote: > > In commit f70029bbaacbfa8f0 ("mm, memory_hotplug: drop CONFIG_MOVABLE_NODE"), > > the dependency on CONFIG_MOVABLE_NODE was removed for N_MEMORY, so the > > conditional check in paging_init() doesn't make any sense any more. > > Remove it. > > Please expand more. I would really have to refresh the intention of the > code but from a quick look at the code CONFIG_HIGHMEM still makes > N_MEMORY != N_NORMAL_MEMORY. So what what does this change mean for that > config? Thanks for looking into this. I was trying to explain that CONFIG_MOVABLE_NODE made N_MEMORY have chance to take different enum value. Do you think the below saying is OK to you? ~~~ 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 any sense any more. Let's remove it. ~~~ Thanks Baoquan