Received: by 2002:ac0:a5a7:0:0:0:0:0 with SMTP id m36-v6csp700033imm; Wed, 25 Jul 2018 04:49:53 -0700 (PDT) X-Google-Smtp-Source: AAOMgpcwZHN1WDMf0+kWRcLuzMFzaCKWlMDiKbgWLpJZeVj2x6fcckBbLbW+A7d0mW7w55cMtS+u X-Received: by 2002:a17:902:24a5:: with SMTP id w34-v6mr20455653pla.52.1532519393561; Wed, 25 Jul 2018 04:49:53 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1532519393; cv=none; d=google.com; s=arc-20160816; b=VBx1VWFmEm/2dOA9aDyekknBeGUryjdiB1nfO2CFPmPAn9a7iU+/diW/R2qI8V9RvO 7YTmJuMPmm3LxxtheHUbaJth/2cmjrmye+Xqb98WRbp9j34nam8vqnFKL8tPQz1OnQ9U aJK99aaj8sNh1vgkhLpwmhYSkCcKCcPOGpuabuc5Dt/Xt3RtODyC9eOBV1h0q38y+iLc VC/N4fhWKprBUxPyjZj5zLwBxhJifoKnhw0gSA0VoKIBTse+KfuJ9voTP32rq1W3ryoz 9AHv7MHl2//oiYr+2F2RtXqul2LtcjlNjGubSsVwg70f0vvy6HA99GVVM84pWvovgbf+ 1bAA== 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:arc-authentication-results; bh=5L93+pQgfYZ+C/LkhZnPcSvpUl/eQ9wn+UtyslWdvY8=; b=YTTfQVVtI2cxJMeZHfTic6m+1I/xBLvWguKKrEUgASIalmPMN4LBFehfT0tzspBLjx Z+Tz5lKLvS6BDSrBsb9pU+kD1SHL9Wa2E6YUmsgXxyD/avIBxJqoasSImDVw+dA7R9cp dFPQuw6zjEWezAmg4h/ah39M/1o0niiF6DPHkJ0tQtx5DNEZHBCyxI7NhNYtNL+EUSuW vFcQoGmkVsL+T+ZJTR+xO+UYL6bxpi2Q0OlrC0IM6NCE6O6nwJU9ZpMkPk8+VGQCOD4h iQ+1IM30BC9J5QcNegRHpKiZCloZnsnJ5GGTvs2glZsptiL83XyFSViUZxz0DJ9YgKPl GOWw== 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 Return-Path: Received: from vger.kernel.org (vger.kernel.org. [209.132.180.67]) by mx.google.com with ESMTP id z3-v6si13082644plb.246.2018.07.25.04.49.38; Wed, 25 Jul 2018 04:49:53 -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 Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1728897AbeGYNAJ (ORCPT + 99 others); Wed, 25 Jul 2018 09:00:09 -0400 Received: from mail-wm0-f67.google.com ([74.125.82.67]:38552 "EHLO mail-wm0-f67.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1728681AbeGYNAJ (ORCPT ); Wed, 25 Jul 2018 09:00:09 -0400 Received: by mail-wm0-f67.google.com with SMTP id t25-v6so5678728wmi.3 for ; Wed, 25 Jul 2018 04:48:49 -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:user-agent; bh=5L93+pQgfYZ+C/LkhZnPcSvpUl/eQ9wn+UtyslWdvY8=; b=REITq3P7oblKiWkLAHhuTiR0eh+HN2vAcdmZs2sEKBvOtmWLFuWaXyRF4//N+rwg2P 7IIcsC6ssFEEPwAgOel1A6bsHbXfWTIPs0WXRXSRT5Xd8uapD+84Mk2H+A41fpsGeYJn lLMBDlgV5pFVFKU9us8HiF8Xf7WkuhcXVzyhBuZnIyBFW64AcOi0R9ECfb24JYkJVtme GZJkC7ysIjBPIKPTgbkrDBoYVYcshP2qr6B7SLJuDhMrJ+IOUfA+QevcK2WYBYH8Yhal ApTrTxHnKKjUmnEZd9hr4dMSE44L99k/oRdLtljih++6jpoNMu1Srt/EGMXV0AkucAKx QVHA== X-Gm-Message-State: AOUpUlEP8doDmAQzciL2HIJ/h1vLh1dapyw0vRA+ENJLxArdmR+vD8WT EwUA7w0230YrN4beJMzJCuA= X-Received: by 2002:a1c:1745:: with SMTP id 66-v6mr4292752wmx.38.1532519328759; Wed, 25 Jul 2018 04:48:48 -0700 (PDT) Received: from techadventures.net (techadventures.net. [62.201.165.239]) by smtp.gmail.com with ESMTPSA id 185-v6sm5214089wmh.22.2018.07.25.04.48.47 (version=TLS1_2 cipher=ECDHE-RSA-AES128-GCM-SHA256 bits=128/128); Wed, 25 Jul 2018 04:48:48 -0700 (PDT) Received: by techadventures.net (Postfix, from userid 1000) id 6F0AA124329; Wed, 25 Jul 2018 13:48:47 +0200 (CEST) Date: Wed, 25 Jul 2018 13:48:47 +0200 From: Oscar Salvador To: Pavel Tatashin Cc: steven.sistare@oracle.com, daniel.m.jordan@oracle.com, linux-kernel@vger.kernel.org, akpm@linux-foundation.org, kirill.shutemov@linux.intel.com, mhocko@suse.com, linux-mm@kvack.org, dan.j.williams@intel.com, jack@suse.cz, jglisse@redhat.com, jrdr.linux@gmail.com, bhe@redhat.com, gregkh@linuxfoundation.org, vbabka@suse.cz, richard.weiyang@gmail.com, dave.hansen@intel.com, rientjes@google.com, mingo@kernel.org, abdhalee@linux.vnet.ibm.com, mpe@ellerman.id.au Subject: Re: [PATCH 3/3] mm: move mirrored memory specific code outside of memmap_init_zone Message-ID: <20180725114847.GA16691@techadventures.net> References: <20180724235520.10200-1-pasha.tatashin@oracle.com> <20180724235520.10200-4-pasha.tatashin@oracle.com> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <20180724235520.10200-4-pasha.tatashin@oracle.com> User-Agent: Mutt/1.5.23 (2014-03-12) Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On Tue, Jul 24, 2018 at 07:55:20PM -0400, Pavel Tatashin wrote: > memmap_init_zone, is getting complex, because it is called from different > contexts: hotplug, and during boot, and also because it must handle some > architecture quirks. One of them is mirroed memory. > > Move the code that decides whether to skip mirrored memory outside of > memmap_init_zone, into a separate function. > > Signed-off-by: Pavel Tatashin Hi Pavel, this looks good to me. Over the past days I thought if it would make sense to have two memmap_init_zone functions, one for hotplug and another one for early init, so we could get rid of the altmap stuff in the early init, and also the MEMMAP_EARLY/HOTPLUG context thing could be gone. But I think that they would just share too much of the code, so I do not think it is worth. I am working to do that for free_area_init_core, let us see what I come up with. Anyway, this looks nicer, so thanks for that. I also gave it a try, and early init and memhotplug code seems to work fine. Reviewed-by: Oscar Salvador Thanks -- Oscar Salvador SUSE L3