Received: by 2002:ac0:a5a7:0:0:0:0:0 with SMTP id m36-v6csp2577324imm; Thu, 16 Aug 2018 11:48:29 -0700 (PDT) X-Google-Smtp-Source: AA+uWPwngg1RKdpATt7tqpusLVEvfBIbgnd3a9SEpcT/xqUyvGiEiphG/gxjs5Gj9rRRzhUH4Rew X-Received: by 2002:a17:902:1c8:: with SMTP id b66-v6mr30320652plb.273.1534445309542; Thu, 16 Aug 2018 11:48:29 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1534445309; cv=none; d=google.com; s=arc-20160816; b=ihdTt60x2SpP62f+FJLVVOUeu01X7t7JFlCV2yyeFsxH2AP607atdqu9NIasi0NAfY vFdFfiQj01g6hxHP8lfET8Hwofrb3Y1gu0Z7FuwGP/zcUfLM3P6LvrDqucfb+hMfIH1/ EDOUagj4Qx9jsOwfIOwQ+L558CQv1zjvON9Py0leHZa+x1RYnCx09um18aIaru8ZsuBa LNixrgNyryAG5J729kQLbcSqDza1e+W7FBd4+KzCa1KYMPtEzEH2Bq/pXhPZ+L81T7dl kixwf8TNGBi2QZ9uc9w9CnD1L+NNHTppDGA4c1Pt6E98QWvsg3xGTayT7iEw8s+dqIf2 reBA== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:sender:mime-version:content-transfer-encoding :content-id:spamdiagnosticmetadata:spamdiagnosticoutput :content-language:accept-language:in-reply-to:references:message-id :date:thread-index:thread-topic:subject:cc:to:from:dkim-signature :arc-authentication-results; bh=GNinEDqNk4CO9nDs4Ubo/Ev1TCEgIk5u50TKpHcV+GM=; b=e07U2kH+tEanCb1ObOMZq0z00ZOP4ky+X0vwB3sDSa8dubAvoFOk02x6OpSMBTag1Q fSxcDYn8VcC1ChCnLkEeiyuuWP5UV0tie9+Gg01ZJyjbIc+KGYoan8OGMCdJhO542NqP I2w78wuEJQv6uytKR/vvdiEgo3lm0TfU8PD7YFmXu3UR15F0bOv4Tg97e9lYgkaTw+80 LPOSZwcuRPK3FQZMriG3Ng3KzyeU0pwscDZMJ8cjUwPC/8+8Cjzu5B5It+N1BkRTut+Y HQCvlHBjtFCF1YavtU9bGJ3XJ2xbrDCQWp+hOpWrkbrfgl4QLPu2xCaz9T1Q8iMMzk61 aT3Q== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@microsoft.com header.s=selector1 header.b=DK41Tl2h; 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=REJECT sp=REJECT dis=NONE) header.from=microsoft.com Return-Path: Received: from vger.kernel.org (vger.kernel.org. [209.132.180.67]) by mx.google.com with ESMTP id k18-v6si42148pgl.364.2018.08.16.11.48.13; Thu, 16 Aug 2018 11:48:29 -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=@microsoft.com header.s=selector1 header.b=DK41Tl2h; 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=REJECT sp=REJECT dis=NONE) header.from=microsoft.com Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1728599AbeHPUUP (ORCPT + 99 others); Thu, 16 Aug 2018 16:20:15 -0400 Received: from mail-eopbgr720124.outbound.protection.outlook.com ([40.107.72.124]:45375 "EHLO NAM05-CO1-obe.outbound.protection.outlook.com" rhost-flags-OK-OK-OK-FAIL) by vger.kernel.org with ESMTP id S1726987AbeHPUUP (ORCPT ); Thu, 16 Aug 2018 16:20:15 -0400 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=microsoft.com; s=selector1; h=From:Date:Subject:Message-ID:Content-Type:MIME-Version:X-MS-Exchange-SenderADCheck; bh=GNinEDqNk4CO9nDs4Ubo/Ev1TCEgIk5u50TKpHcV+GM=; b=DK41Tl2hJZeA6PXFYD+1eKJt6VnFp7AvCvKfIw5xKDAK1zyPnE01nXYbAE2hKockESOt/ytEc4h5d7gl3SXBtpYiALQVvzycIlcFf1s5BMWhR7uYnyUnliBvunLsyPt69kdX9rf2mXmsborxdVEtS0tKbBRGzHr6VP8aVB7al0o= Received: from DM5PR21MB0508.namprd21.prod.outlook.com (10.172.91.142) by DM5PR21MB0796.namprd21.prod.outlook.com (10.175.112.16) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.1080.6; Thu, 16 Aug 2018 17:20:27 +0000 Received: from DM5PR21MB0508.namprd21.prod.outlook.com ([fe80::65dd:b17f:eb0d:2eee]) by DM5PR21MB0508.namprd21.prod.outlook.com ([fe80::65dd:b17f:eb0d:2eee%8]) with mapi id 15.20.1080.009; Thu, 16 Aug 2018 17:20:27 +0000 From: Pasha Tatashin To: "osalvador@techadventures.net" CC: "akpm@linux-foundation.org" , "mhocko@suse.com" , "vbabka@suse.cz" , Pasha Tatashin , "Jonathan.Cameron@huawei.com" , "arbab@linux.vnet.ibm.com" , "linux-mm@kvack.org" , "linux-kernel@vger.kernel.org" , Oscar Salvador Subject: Re: [PATCH v2 3/4] mm/memory_hotplug: Make register_mem_sect_under_node a cb of walk_memory_range Thread-Topic: [PATCH v2 3/4] mm/memory_hotplug: Make register_mem_sect_under_node a cb of walk_memory_range Thread-Index: AQHUNYVstIujEBIhdUCepLheGkxdWw== Date: Thu, 16 Aug 2018 17:20:27 +0000 Message-ID: <20180816172026.s2v3ytqnkiboo72s@xakep.localdomain> References: <20180622111839.10071-1-osalvador@techadventures.net> <20180622111839.10071-4-osalvador@techadventures.net> In-Reply-To: <20180622111839.10071-4-osalvador@techadventures.net> Accept-Language: en-US Content-Language: en-US X-MS-Has-Attach: X-MS-TNEF-Correlator: x-originating-ip: [73.69.118.222] x-ms-publictraffictype: Email x-microsoft-exchange-diagnostics: 1;DM5PR21MB0796;6:TxzEjBOLJ2CN65VpLV0jH1XsImO7yv8U4opgWWJS+JvvVhHwWRhbE8Zrm341GqFFmY05WCIkdUyu+PggZKo4gGxlCDX2G0t3GHwkzI7l+KfixEG97zqlTFJxrhm3NkR9FObqgB3N5wOAXvjIm9qjxIYXELfpZ2KXkg+c7nXP9kvCa9RljS1noS3G94ujt/Q9VXQ+FhIjwpHRuH8tVIme84LhZ8brno3jjPjeD6WN54ML7ohngte9uXvPxdW6hLGiNnQ3HsRYW51X4UjdOQu8OvORoTZFmgwaCwyHQity5tQW/VaSctKde7qAyLGesjWAthq4vUWsqja5J6BOwN6j4G2fYLx5ilAyqFs5DevQZtBRkkO4YNM0q00QCzXXAJgOVH01qWjojkHM1DpDBWA7hcIRTnyXL9UOHJfmpHtf+VKpkXUEEsb4s+zUNSBZgQSvmD+69oi+yLjUJy1viPQyHA==;5:PuRk/mJiDo1CN56EdFVVm9ZnOwDtPRRsmecF9Wh011/w83AQqx2VTTsL0B+ykz6iCayQk/FxoAm8KxkRfT7CMDMc5Q9Ho2mTJbZXhbV3XmmOXpDEIh9tRdpnsOlAgLuxjMvAyMm1FM0tgEIK7SzhyZj2tFMXUkn3xFrZmMhRq4k=;7:y4SVKYIcBTtkdZhcu2dowTIKLc+dTXMxT18zTkvVnha3IbJ0slNk4XHMYkdRx63PNz8dtC6CDznFF3un36SCSiDKqYSI+I9Ofc4ot4a3EWZ32DoLmL59PIdq0u0GTkPRHfMU02csjjXp1EGLZjUMd6WcBV/2lSIhVO1PecXMbYro9kqQ0bmV9YKxivA8Ds12XKnWIpk3vLxjViLnJKGAhKnbMJB2aPd2CSrIYPInYAsczn3ABdgFnJtwAm61qCrI x-ms-exchange-antispam-srfa-diagnostics: SOS; x-ms-office365-filtering-correlation-id: 913f5fea-4a38-4fb6-ff61-08d6039c8f85 x-ms-office365-filtering-ht: Tenant x-microsoft-antispam: BCL:0;PCL:0;RULEID:(7020095)(4652040)(8989137)(4534165)(4627221)(201703031133081)(201702281549075)(8990107)(5600074)(711020)(4618075)(2017052603328)(7193020);SRVR:DM5PR21MB0796; x-ms-traffictypediagnostic: DM5PR21MB0796: x-microsoft-antispam-prvs: x-exchange-antispam-report-test: UriScan:(28532068793085)(89211679590171)(146099531331640); x-ms-exchange-senderadcheck: 1 x-exchange-antispam-report-cfa-test: BCL:0;PCL:0;RULEID:(8211001083)(20180801012)(6040522)(2401047)(8121501046)(5005006)(10201501046)(3002001)(93006095)(93001095)(3231336)(8210008)(944501410)(52105095)(2018427008)(6055026)(149027)(150027)(6041310)(201703131423095)(201702281528075)(20161123555045)(201703061421075)(201703061406153)(20161123558120)(20161123564045)(20161123560045)(20161123562045)(201708071742011)(7699016);SRVR:DM5PR21MB0796;BCL:0;PCL:0;RULEID:;SRVR:DM5PR21MB0796; x-forefront-prvs: 07665BE9D1 x-forefront-antispam-report: SFV:NSPM;SFS:(10019020)(346002)(376002)(366004)(396003)(39860400002)(136003)(189003)(199004)(10090500001)(316002)(14454004)(6246003)(25786009)(2906002)(5250100002)(8676002)(81156014)(81166006)(1730700003)(8936002)(54906003)(53936002)(72206003)(2900100001)(3846002)(105586002)(106356001)(486006)(97736004)(6436002)(6116002)(22452003)(2501003)(9686003)(6512007)(5640700003)(478600001)(68736007)(10290500003)(2351001)(6486002)(476003)(229853002)(186003)(33896004)(14444005)(53546011)(446003)(86362001)(5660300001)(6346003)(11346002)(6506007)(76176011)(256004)(1076002)(99286004)(66066001)(6916009)(305945005)(26005)(7736002)(102836004)(86612001)(4326008);DIR:OUT;SFP:1102;SCL:1;SRVR:DM5PR21MB0796;H:DM5PR21MB0508.namprd21.prod.outlook.com;FPR:;SPF:None;LANG:en;PTR:InfoNoRecords;MX:1;A:1; received-spf: None (protection.outlook.com: microsoft.com does not designate permitted sender hosts) authentication-results: spf=none (sender IP is ) smtp.mailfrom=Pavel.Tatashin@microsoft.com; x-microsoft-antispam-message-info: 6G+lMbC5b0EZTBPYdufwOlN4scV4eq2RLoxMN7FbA4DEXfNk8awz2mY01uJ2Fa+BiIiblKqvtV3Ije5FGY7E1coSYOksmdwcmKN6k+tXJZL9l4h5ZR9kAA20v6QKYtVI0fuGvO0VUXT/zO3bhpRbxHtywIJVkp6Yxy9ocx7lL6uyLrtlwCgfiRVfBF8P9tzfbzA+2W6DHUsquKFy0PDnjSr7FGfOXA0uV1FH7z+xpnUaJIFb42pBs9Y3mLOJhS0QN/h7aA0Ot1aBifUKaSlHmEvJFhn4OlGIsJhc0Qu9+98cCrXr9xZNk+TVOWs0w8aZjj+bsPfP7bDrk7ZPARNk7xwRQXWn7q9MnHG2AI4aMP4= spamdiagnosticoutput: 1:99 spamdiagnosticmetadata: NSPM Content-Type: text/plain; charset="us-ascii" Content-ID: Content-Transfer-Encoding: quoted-printable MIME-Version: 1.0 X-OriginatorOrg: microsoft.com X-MS-Exchange-CrossTenant-Network-Message-Id: 913f5fea-4a38-4fb6-ff61-08d6039c8f85 X-MS-Exchange-CrossTenant-originalarrivaltime: 16 Aug 2018 17:20:27.5207 (UTC) X-MS-Exchange-CrossTenant-fromentityheader: Hosted X-MS-Exchange-CrossTenant-id: 72f988bf-86f1-41af-91ab-2d7cd011db47 X-MS-Exchange-Transport-CrossTenantHeadersStamped: DM5PR21MB0796 Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On 18-06-22 13:18:38, osalvador@techadventures.net wrote: > From: Oscar Salvador >=20 > link_mem_sections() and walk_memory_range() share most of the code, > so we can use convert link_mem_sections() into a dummy function that call= s > walk_memory_range() with a callback to register_mem_sect_under_node(). >=20 > This patch converts register_mem_sect_under_node() in order to > match a walk_memory_range's callback, getting rid of the > check_nid argument and checking instead if the system is still > boothing, since we only have to check for the nid if the system > is in such state. >=20 > Signed-off-by: Oscar Salvador > Suggested-by: Pavel Tatashin Reviewed-by: Pavel Tatashin =