Received: by 2002:ac0:a5a7:0:0:0:0:0 with SMTP id m36-v6csp928692imm; Fri, 27 Jul 2018 08:25:56 -0700 (PDT) X-Google-Smtp-Source: AAOMgpc3TgqAevkwafEGaJfmDl32THNaFLMTevpbiFwaAivlIaHYZ9iCCnEBSlZTXcYjae2dBUdh X-Received: by 2002:a63:dd09:: with SMTP id t9-v6mr6644937pgg.370.1532705156716; Fri, 27 Jul 2018 08:25:56 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1532705156; cv=none; d=google.com; s=arc-20160816; b=JquNUGg5ktamKn8vooSmmCTM+YuqR0JRRnHLV70c4oTXsUpLVgkqIrLsgyMkA9ftz0 j5b/7C2LqQOqRZwejDgyvaX9mpSvsCk7W5egkerZyYYtJ1MQUyCrEcqu3MlowjLKN0Pl uD7sDApGJ2nCoPOLU7U1I6Cy2Xya5zsIt0oYKQRyr3myxHLJ460S2sfSbm4R0uJAyLdj y7ILYRl0c+rNvVkqaGyY0/v6joTZdikFsbTQdd7Qg3Ih412G25FhdoGuJTD+zrXD/Eaj 5FLKN13ognVZhj68o5TeTQPRt/3PnE50TrgltNjeI56k8HoJD4jwKr7VSqLtWs4V1Wlw 4EzA== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:sender:cc:to:subject:message-id:date:from :in-reply-to:references:mime-version:dkim-signature :arc-authentication-results; bh=skjkf7aBTKKGznsfdEOfw+7smWCmmo9dqnyYpDI2CGE=; b=vK0TPA4VTr2hrDRMPVv2578tbxTrsdP98oIXAw8DAfYtIRRS8ODfOWF0COwwuKtQxY zF6U1sir9f1Mwfe79mibIJqrfgWXBDHYL2GdhWtlGeU/Rp1ocCRHcLORB2iZk9id6FA8 6kLSObsDfg9bt8nMx5MV5BXPMPGyzx4Ce3NROp3eKu9a7dClbViPpNLpmnWXiqbdrDsN g5LHBN5Grz3A7Vtyw16nbZ/X3IgnZdueiiTs+AUuGhcBC6w2Y1db8RCgDxiPSdIVnHNX NFZievH13seSm1a+nx2rvO+yHuqXkjnCHNBkMgZwpg2pUDwaRU4mkURwVMWVKrIXUcRQ gogA== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@oracle.com header.s=corp-2018-07-02 header.b=HbITagNg; 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=pass (p=NONE sp=NONE dis=NONE) header.from=oracle.com Return-Path: Received: from vger.kernel.org (vger.kernel.org. [209.132.180.67]) by mx.google.com with ESMTP id t1-v6si4305119pfb.208.2018.07.27.08.25.41; Fri, 27 Jul 2018 08:25:56 -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; dkim=pass header.i=@oracle.com header.s=corp-2018-07-02 header.b=HbITagNg; 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=pass (p=NONE sp=NONE dis=NONE) header.from=oracle.com Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S2388571AbeG0QrT (ORCPT + 99 others); Fri, 27 Jul 2018 12:47:19 -0400 Received: from aserp2130.oracle.com ([141.146.126.79]:42366 "EHLO aserp2130.oracle.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1732059AbeG0QrS (ORCPT ); Fri, 27 Jul 2018 12:47:18 -0400 Received: from pps.filterd (aserp2130.oracle.com [127.0.0.1]) by aserp2130.oracle.com (8.16.0.22/8.16.0.22) with SMTP id w6RFNmVs189449 for ; Fri, 27 Jul 2018 15:24:53 GMT DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=oracle.com; h=mime-version : references : in-reply-to : from : date : message-id : subject : to : cc : content-type; s=corp-2018-07-02; bh=skjkf7aBTKKGznsfdEOfw+7smWCmmo9dqnyYpDI2CGE=; b=HbITagNgR+Lnlrhr1QhSBkOzhVyOkA9nhAYYpqyk0P9BqT0pNotQpzfdWvoZdhBAjsxq 75+6J1c+JNMsfVYUtpYFfKY3+GqIOkhX60W0zm4ltRNJfTZqbUVGM/67GpwCQgQxeGsZ KL2D8QVpz0Mo4dkaBxbf8iDx7lyZyYiwj2kjnTNQcY72/nmk6pY5Ve7bw+0sNe9KhINO /qVgbiArd3uJU3+1elrHFaA4nRX3gROVADU9DpFI8pPk4Dg+Y6HM3e0xVSL1b6Js5M2+ zVc3IJw4AlOaOGk8fdUcIkwuowwb1ERyZQVXBaHk6o9MPlrpYKjo+yWkfzLjHlDV6jGL /w== Received: from aserv0021.oracle.com (aserv0021.oracle.com [141.146.126.233]) by aserp2130.oracle.com with ESMTP id 2kbtbd7tu0-1 (version=TLSv1.2 cipher=ECDHE-RSA-AES256-GCM-SHA384 bits=256 verify=OK) for ; Fri, 27 Jul 2018 15:24:53 +0000 Received: from aserv0122.oracle.com (aserv0122.oracle.com [141.146.126.236]) by aserv0021.oracle.com (8.14.4/8.14.4) with ESMTP id w6RFOqNT017390 (version=TLSv1/SSLv3 cipher=DHE-RSA-AES256-GCM-SHA384 bits=256 verify=OK) for ; Fri, 27 Jul 2018 15:24:52 GMT Received: from abhmp0005.oracle.com (abhmp0005.oracle.com [141.146.116.11]) by aserv0122.oracle.com (8.14.4/8.14.4) with ESMTP id w6RFOqMc019146 for ; Fri, 27 Jul 2018 15:24:52 GMT Received: from mail-oi0-f44.google.com (/209.85.218.44) by default (Oracle Beehive Gateway v4.0) with ESMTP ; Fri, 27 Jul 2018 08:24:52 -0700 Received: by mail-oi0-f44.google.com with SMTP id n21-v6so9727589oig.3 for ; Fri, 27 Jul 2018 08:24:51 -0700 (PDT) X-Gm-Message-State: AOUpUlENUnjxiE4KC8sXs9kyrPFnjuOZR2laA4czV5PC7Tc1x1uO1rXd Y0qYhXXuJG10R0mDhUM8NvELtovbvvc5iMGUSkQ= X-Received: by 2002:a54:4f88:: with SMTP id g8-v6mr7352457oiy.191.1532705091387; Fri, 27 Jul 2018 08:24:51 -0700 (PDT) MIME-Version: 1.0 References: <20180727140325.11881-1-osalvador@techadventures.net> <20180727140325.11881-5-osalvador@techadventures.net> In-Reply-To: <20180727140325.11881-5-osalvador@techadventures.net> From: Pavel Tatashin Date: Fri, 27 Jul 2018 11:24:15 -0400 X-Gmail-Original-Message-ID: Message-ID: Subject: Re: [PATCH v4 4/4] mm/page_alloc: Introduce free_area_init_core_hotplug To: osalvador@techadventures.net Cc: Andrew Morton , Michal Hocko , Vlastimil Babka , mgorman@techsingularity.net, aaron.lu@intel.com, iamjoonsoo.kim@lge.com, Linux Memory Management List , LKML , dan.j.williams@intel.com, osalvador@suse.de Content-Type: text/plain; charset="UTF-8" X-Proofpoint-Virus-Version: vendor=nai engine=5900 definitions=8966 signatures=668706 X-Proofpoint-Spam-Details: rule=notspam policy=default score=0 suspectscore=10 malwarescore=0 phishscore=0 bulkscore=0 spamscore=0 mlxscore=0 mlxlogscore=999 adultscore=0 classifier=spam adjust=0 reason=mlx scancount=1 engine=8.0.1-1806210000 definitions=main-1807270157 Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org Hi Oscar, > static pg_data_t __ref *hotadd_new_pgdat(int nid, u64 start) Remove __ref from this function and add it to free_area_init_core_hotplug() instead, as that is the only function from a different section. This will reduce the scope of ref, and no need to place reset_node_managed_pages() into a different section as it is compiled only when CONFIG_MEMORY_HOTPLUG=y > +#ifdef CONFIG_MEMORY_HOTPLUG > +void __paginginit free_area_init_core_hotplug(int nid) > +{ > + enum zone_type j; > + pg_data_t *pgdat = NODE_DATA(nid); > + > + pgdat_init_internals(pgdat); > + for (j = 0; j < MAX_NR_ZONES; j++) { > + struct zone *zone = pgdat->node_zones + j; > + zone_init_internals(zone, j, nid, 0); > + } > +} Style: I would write the for() loop above like this: for (i = 0; i < MAX_NR_ZONES; i++) zone_init_internals(&pgdat->node_zones[i], i, nid, 0); Other than this all good: Reviewed-by: Pavel Tatashin Thank you, Pavel