From patchwork Wed Jul 25 22:01:39 2018 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Oscar Salvador X-Patchwork-Id: 10544857 Return-Path: Received: from mail.wl.linuxfoundation.org (pdx-wl-mail.web.codeaurora.org [172.30.200.125]) by pdx-korg-patchwork-2.web.codeaurora.org (Postfix) with ESMTP id 70DCB1805 for ; Wed, 25 Jul 2018 22:01:55 +0000 (UTC) Received: from mail.wl.linuxfoundation.org (localhost [127.0.0.1]) by mail.wl.linuxfoundation.org (Postfix) with ESMTP id 5DC522A88B for ; Wed, 25 Jul 2018 22:01:55 +0000 (UTC) Received: by mail.wl.linuxfoundation.org (Postfix, from userid 486) id 51AB72A8A0; Wed, 25 Jul 2018 22:01:55 +0000 (UTC) X-Spam-Checker-Version: SpamAssassin 3.3.1 (2010-03-16) on pdx-wl-mail.web.codeaurora.org X-Spam-Level: X-Spam-Status: No, score=-2.9 required=2.0 tests=BAYES_00,MAILING_LIST_MULTI, RCVD_IN_DNSWL_NONE autolearn=ham version=3.3.1 Received: from kanga.kvack.org (kanga.kvack.org [205.233.56.17]) by mail.wl.linuxfoundation.org (Postfix) with ESMTP id E2F2B2A88B for ; Wed, 25 Jul 2018 22:01:54 +0000 (UTC) Received: by kanga.kvack.org (Postfix) id 8B8D36B0003; Wed, 25 Jul 2018 18:01:53 -0400 (EDT) Delivered-To: linux-mm-outgoing@kvack.org Received: by kanga.kvack.org (Postfix, from userid 40) id 8698E6B0005; Wed, 25 Jul 2018 18:01:53 -0400 (EDT) X-Original-To: int-list-linux-mm@kvack.org X-Delivered-To: int-list-linux-mm@kvack.org Received: by kanga.kvack.org (Postfix, from userid 63042) id 77ED36B0006; Wed, 25 Jul 2018 18:01:53 -0400 (EDT) X-Original-To: linux-mm@kvack.org X-Delivered-To: linux-mm@kvack.org Received: from mail-wm0-f70.google.com (mail-wm0-f70.google.com [74.125.82.70]) by kanga.kvack.org (Postfix) with ESMTP id 1C14A6B0005 for ; Wed, 25 Jul 2018 18:01:53 -0400 (EDT) Received: by mail-wm0-f70.google.com with SMTP id p3-v6so3640856wmc.7 for ; Wed, 25 Jul 2018 15:01:53 -0700 (PDT) X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-original-authentication-results:x-gm-message-state:from:to:cc :subject:date:message-id; bh=Bl/81BSqMfqMAozlJA/17n7uO5ZVtEHZYbOG3yyuBlo=; b=NaXQCymiNfEBfnvCFB6oblIE5jnK3cVOFN/y/jEW++aMP1hzCWQESd4D+4vUTlbP3d 8J8hIzXr8wH2UO/41mfX519qgyNKSY7+NXRytoQC/mhMHL25PgJ+VRiV77lgnyERH7qX Fg5FD84i8qV6Bxqp6GU0Azu942Cp2aB9YqUBDw69gIOed4THwpgt+c19u+GRkPJ4F4Us SC3sOFSLCnVTADd5wSJmmhnDJHtRrYwlg3JVa8OsShwbpMZPIcdYAN+hd3WKbB/5drsn hL1UlEqdRbck9w2mU/sk/xsIvcgaEJLncraqMXnWXmx+MJsbW07LU42sAMZEvVG2zWCr mXiw== X-Original-Authentication-Results: mx.google.com; spf=pass (google.com: domain of osalvador.vilardaga@gmail.com designates 209.85.220.65 as permitted sender) smtp.mailfrom=osalvador.vilardaga@gmail.com X-Gm-Message-State: AOUpUlGzHQpqHhPCzbC1oHviOUthhxA1hl1tN3fwBZd2Ucx4/hAvId1J 2xryPpzJGoQ+1X6UnjYIqf29syIAO1blgR9WsablUACNzHjlMeNjrppYUn3FeaRV0WkYBBEPIw5 9dF/IhRp9YF6lZio5z4nssaRLIgImd7412ZwfLED4+mV5H5Cp0+p8Os2Iw+kkWMGTfP+75uf3Uu WwpcyrVpQqbhcyeI8DOifxVjndDR1IZCbscsSOdDmkjIFuMCfYhWDk4bC97F3hZNqT8aFfVqJQ8 gzA3ggdHK4+0yeiW/LOtXfnakrC/M5Gm/N+WX1LIDnxH/uXs34TrC5vPwbTfjxeEfiq344yWgMu 6PEcxDVvzqdVn1iq2zFLPfuuDJiI3fdjqipAC6Bpzg/k7tSvfIpFnNP2gPutK/WDoagHfwJPRw= = X-Received: by 2002:a1c:9e4d:: with SMTP id h74-v6mr6006405wme.70.1532556112593; Wed, 25 Jul 2018 15:01:52 -0700 (PDT) X-Received: by 2002:a1c:9e4d:: with SMTP id h74-v6mr6006380wme.70.1532556111768; Wed, 25 Jul 2018 15:01:51 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1532556111; cv=none; d=google.com; s=arc-20160816; b=ldacAwwAPW+DT5Pdobd9BLr1Wq4dK0DLa7HTjDYAKrr/WbFU6/YFYDmhhxS+HB2Xyc uDvX01CribzWI1DIzRyAwOX/2u4M0cPqziRLapkhChjkVKzk08GEX7PGr3uO4MolpNNU O4AcyMHkWW3G5hTSZ1JW2tqXC/mdy9PumxH8AOfp8dB5ruqXSXUoDDFOKBCo/vWvjhnR QWc443xydDc6m4KcRJFv3l9e47ckEMSlkxNOWfi0ZjXqJcpUt8LWJFqhHmlCEABObPVr s3/2y29Ka/65dFXmxxz/MEvK+0X73lYsZJRsELK8iidOOBGaadZYg9hld/fcTxwinWa4 BmaA== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=message-id:date:subject:cc:to:from:arc-authentication-results; bh=Bl/81BSqMfqMAozlJA/17n7uO5ZVtEHZYbOG3yyuBlo=; b=Iuin9zVid5mYWD69DxAT+UTDDUI3wUS9fsN06iR8D3Y69mMMlWTyNB0/nmasaUnpvq SBlzlErHJCQZC3UdtBFrKOSg5XFmFT597Ug0gI4qoWTYcakpP7t7Zs8+04hfAS9VPvH/ SFkTyeFqCf1L2Boq2ZELK3zS+OXOB8yDfvnAJRimkCrt1lGHUhcqdbZbp31kGrwm4yHx yHal0YloOeGE66zGRn8OM8VxhKgZGHoIfxb4mHC/IcRBXhIvtF05ZLsNheFfR0EaY3l9 +x+8q/XHDBuCueWZAKaoRetwjmYv+9yv4uU9BpPOoyAIJAqZr3eoaoPWDMzMsp8pKmzS 6C0w== ARC-Authentication-Results: i=1; mx.google.com; spf=pass (google.com: domain of osalvador.vilardaga@gmail.com designates 209.85.220.65 as permitted sender) smtp.mailfrom=osalvador.vilardaga@gmail.com Received: from mail-sor-f65.google.com (mail-sor-f65.google.com. [209.85.220.65]) by mx.google.com with SMTPS id l14-v6sor1104119wrw.79.2018.07.25.15.01.51 for (Google Transport Security); Wed, 25 Jul 2018 15:01:51 -0700 (PDT) Received-SPF: pass (google.com: domain of osalvador.vilardaga@gmail.com designates 209.85.220.65 as permitted sender) client-ip=209.85.220.65; Authentication-Results: mx.google.com; spf=pass (google.com: domain of osalvador.vilardaga@gmail.com designates 209.85.220.65 as permitted sender) smtp.mailfrom=osalvador.vilardaga@gmail.com X-Google-Smtp-Source: AAOMgpdcdIQQgUdhYdbA5YN732by20J2ilmf3XGw0ODQiEl34sJDPZyd9pt+9KP6fUy+ziKUINpjxQ== X-Received: by 2002:adf:eb87:: with SMTP id t7-v6mr6045327wrn.123.1532556111483; Wed, 25 Jul 2018 15:01:51 -0700 (PDT) Received: from techadventures.net (techadventures.net. [62.201.165.239]) by smtp.gmail.com with ESMTPSA id t69-v6sm82367wmt.40.2018.07.25.15.01.50 (version=TLS1_2 cipher=ECDHE-RSA-AES128-GCM-SHA256 bits=128/128); Wed, 25 Jul 2018 15:01:50 -0700 (PDT) Received: from d104.suse.de (charybdis-ext.suse.de [195.135.221.2]) by techadventures.net (Postfix) with ESMTPA id 07FF11241AD; Thu, 26 Jul 2018 00:01:50 +0200 (CEST) From: osalvador@techadventures.net To: akpm@linux-foundation.org Cc: mhocko@suse.com, vbabka@suse.cz, pasha.tatashin@oracle.com, mgorman@techsingularity.net, aaron.lu@intel.com, iamjoonsoo.kim@lge.com, linux-mm@kvack.org, linux-kernel@vger.kernel.org, dan.j.williams@intel.com, Oscar Salvador Subject: [PATCH v3 0/5] Refactor free_area_init_core and add free_area_init_core_hotplug Date: Thu, 26 Jul 2018 00:01:39 +0200 Message-Id: <20180725220144.11531-1-osalvador@techadventures.net> X-Mailer: git-send-email 2.13.6 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: X-Virus-Scanned: ClamAV using ClamSMTP From: Oscar Salvador This patchset does three things: 1) Clean ups/refactor free_area_init_core/free_area_init_node by moving the ifdefery out of the functions. 2) Move the pgdat/zone initialization in free_area_init_core to its own function. 3) Introduce free_area_init_core_hotplug, a small subset of free_area_init_core, which is only called from memhotlug code path. In this way, we have: free_area_init_core: called during early initialization free_area_init_core_hotplug: called whenever a new node was allocated (memhotplug path) Oscar Salvador (4): mm/page_alloc: Move ifdefery out of free_area_init_core mm/page_alloc: Inline function to handle CONFIG_DEFERRED_STRUCT_PAGE_INIT mm/page_alloc: Move initialization of node and zones to an own function mm/page_alloc: Introduce memhotplug version of free_area_init_core Pavel Tatashin (1): mm: access zone->node via zone_to_nid() and zone_set_nid() include/linux/mm.h | 10 +--- include/linux/mmzone.h | 26 +++++++--- mm/memory_hotplug.c | 23 ++++----- mm/mempolicy.c | 4 +- mm/mm_init.c | 9 +--- mm/page_alloc.c | 132 +++++++++++++++++++++++++++++++++++-------------- 6 files changed, 129 insertions(+), 75 deletions(-)