Received: by 2002:ac0:a5a7:0:0:0:0:0 with SMTP id m36-v6csp577028imm; Wed, 18 Jul 2018 07:14:03 -0700 (PDT) X-Google-Smtp-Source: AAOMgpdME5UBkKPTHb8PbToAdeh3AJoSqFALxAxyFN9tzWYU2hyXABLEiTgzU12FyVIgovAd/97s X-Received: by 2002:aa7:818b:: with SMTP id g11-v6mr5391034pfi.50.1531923243021; Wed, 18 Jul 2018 07:14:03 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1531923242; cv=none; d=google.com; s=arc-20160816; b=jfoyiMlrUsLsUt5qJLgIkSeKy3HIZ97F4eSgHS3E6cFPR3Czero0DM2CCShhzaNblI 0yRQdhwPb4Y6S+Sim4DcqqtnwDxnfDt13tD1BgnlLSQPbtccs2HcXb0dI7NtassvGx9o pAfgCxwloA9JuhtluN4d65VezX8v/1vv7TMFh3sPoT8B5+u1+QMdUJJhFDAK8I7L0d++ QhECMwOI2yTlHbktJHQ16M2hLvuL+C/MPy1BkeKS7YJu3KuUnNiQ18k5MTfRq9tPtYzM buEorVjqiKXcLcPp2QTu8SEFdS5dROnjAkyHALt+nox3H1vug+2xMEmkM2c5sujvbTO7 TNVg== 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=WwWfS3OLhTe4Ooer7DTxhXD/jdCVYwrZ/HMLBW+SlGI=; b=mn7YZICOrrIl80l87ljZb4quCpueFWO2KUke+emaN1OjJtNX5A7Y2+MrIl4m3TW2UT WOZyin09ORCgCleLyVetgct/wHfSm2lUT4lLM5HVpWR3oOsCE4rMWHytPA8cAAtscVZL y6mwgookSmtS3ff2pXnmDg+L0sOQRuTdfiLpGhdWB3pA6jWRtWW7oWp+gH8QEmmX6iGb ZI4C/3Pks/6PTLcP68vvE2/Glf2RTnql4KrtlMLkbGOq1Yjt2l2jxBpXmtV/LvS9lO4d N+nYZAlZ9HSOb7xFwR8J0g4LhddzqKCmEc2KWcO5vmtQr3tWh8NXt+jif4tLNDGJ2DOY 9lOQ== 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 i8-v6si3236031pfo.128.2018.07.18.07.13.48; Wed, 18 Jul 2018 07:14:02 -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 S1731059AbeGROug (ORCPT + 99 others); Wed, 18 Jul 2018 10:50:36 -0400 Received: from mail-wr1-f65.google.com ([209.85.221.65]:39459 "EHLO mail-wr1-f65.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1730172AbeGROuf (ORCPT ); Wed, 18 Jul 2018 10:50:35 -0400 Received: by mail-wr1-f65.google.com with SMTP id h10-v6so4842732wre.6 for ; Wed, 18 Jul 2018 07:12:28 -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=WwWfS3OLhTe4Ooer7DTxhXD/jdCVYwrZ/HMLBW+SlGI=; b=phTVu8caFiLm7e+y7PfvpNSEjGD1Ux8CkjjHbR+dg7Erokb2QI07GhAwDgZxJLOlpf C807QZaE1Y+636hTkJ91t2XAz+tC8UEgQB9EfEOZ/HolRz/vcJK6KIH55ZSsqqiPQYGF IqjCgUYMGq2VAlSKbPI+lwYDrrkHU2ldrkM7/u5iA678xdWcSDwkrKNDz/hoSgw5g/nL qNqA9oz2GUnELxYM74TECmJBqlt/rLYytMvkQTv5HArrCHnxBFYGpufJ9fZD+pQtJhju DmLqKmeCZfb+C2Sy5CbZoNXmW7BeVxPNj63TjdMi6xjSywoIS3/8leuFPq8BZZGWEHHR SRhw== X-Gm-Message-State: AOUpUlFNS+b/bZ7zx+CPNcafJXpad2EbkC4mJKhecf8EHQKkvFcJ4RGH qXTe83V8ITK6E+HHg1TW1YJUe7Dk X-Received: by 2002:a5d:48c7:: with SMTP id p7-v6mr4901555wrs.0.1531923148088; Wed, 18 Jul 2018 07:12:28 -0700 (PDT) Received: from techadventures.net (techadventures.net. [62.201.165.239]) by smtp.gmail.com with ESMTPSA id h2-v6sm1771151wmf.28.2018.07.18.07.12.27 (version=TLS1_2 cipher=ECDHE-RSA-AES128-GCM-SHA256 bits=128/128); Wed, 18 Jul 2018 07:12:27 -0700 (PDT) Received: by techadventures.net (Postfix, from userid 1000) id C6F6A1240E3; Wed, 18 Jul 2018 16:12:26 +0200 (CEST) Date: Wed, 18 Jul 2018 16:12:26 +0200 From: Oscar Salvador To: Michal Hocko Cc: akpm@linux-foundation.org, pasha.tatashin@oracle.com, vbabka@suse.cz, iamjoonsoo.kim@lge.com, aaron.lu@intel.com, linux-kernel@vger.kernel.org, linux-mm@kvack.org, Oscar Salvador Subject: Re: [PATCH 2/3] mm/page_alloc: Refactor free_area_init_core Message-ID: <20180718141226.GA2588@techadventures.net> References: <20180718124722.9872-1-osalvador@techadventures.net> <20180718124722.9872-3-osalvador@techadventures.net> <20180718133647.GD7193@dhcp22.suse.cz> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <20180718133647.GD7193@dhcp22.suse.cz> 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 Wed, Jul 18, 2018 at 03:36:47PM +0200, Michal Hocko wrote: > On Wed 18-07-18 14:47:21, osalvador@techadventures.net wrote: > > From: Oscar Salvador > > > > When free_area_init_core gets called from the memhotplug code, > > we only need to perform some of the operations in > > there. > > Which ones? Or other way around. Which we do not want to do and why? > > > Since memhotplug code is the only place where free_area_init_core > > gets called while node being still offline, we can better separate > > the context from where it is called. > > I really do not like this if node is offline than only perform half of > the function. This will generate more mess in the future. Why don't you > simply. If we can split out this code into logical units then let's do > that but no, please do not make random ifs for hotplug code paths. > Sooner or later somebody will simply don't know what is needed and what > is not. Yes, you are right. I gave it another thought and it was not a really good idea. Although I think the code from free_area_init_core can be simplified. I will try to come up with something that makes more sense. Thanks -- Oscar Salvador SUSE L3