Received: by 2002:a25:f815:0:0:0:0:0 with SMTP id u21csp481698ybd; Wed, 26 Jun 2019 01:19:09 -0700 (PDT) X-Google-Smtp-Source: APXvYqxGMA2L8bpqqVU12szYTCdAXGcOjliwFrMWVVFot1c6WVZDq5VX9EDL7YlLBnm9VXFkHn3N X-Received: by 2002:a17:90a:5887:: with SMTP id j7mr3199488pji.136.1561537149908; Wed, 26 Jun 2019 01:19:09 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1561537149; cv=none; d=google.com; s=arc-20160816; b=qaemrNpcjlNISe0MujLYqpRE2+EG2TWJ7LG50vupJjcK6BRwEj1OYuS1XYX/RSmUdI DUuxCOOlnzPAlzTC+tYMw5Xix45TDQZ7yDTk3WC0BhLB7lUlNcwMVDa8quv7lvJKkjOm RzuYvaTbotGtbMiaQwbHkMEihnmn0od3hfcxyYAncmbIq9wMoVLJU9yEHbM5FPYSYJd4 7uGNw4fw8DW2nogxHSRZLUJmFasQy3VTwYxUHnPf/uVBUWtbtpbljqSBvZTHVb1/ukBp vjctMSBBLWQNJGqmVF0cjxMlh7bDYuH5ZzDez7s4o3fsPXOPxi+dx72zGiPncMb+gyhd oLPw== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:sender:content-transfer-encoding :content-language:in-reply-to:mime-version:user-agent:date :message-id:from:references:cc:to:subject; bh=Crc3JYCat1na4haY4XsuFJ/g4+/vtbKUcMy3E+sx+3U=; b=ZvO8S/hlZIcIPy5rSmOQZQE/a7MTCDMQ2NtltwXBYrJem2E/M4I/wIdBuRWZcDrBI/ 2mNi86UWj4LsiruGusr2VjcvlFI1NN+Rs54z8uP7LfhfJlEqDvDuEnIxKTy/6FjqY28u bPyS3xGWsGXBNx5kJRYmgA9aYHNPx01PVKhboxpd6vGvtV56t5BvLIzyLXVkWNTPRTzv iHjkrOW2wHWqRd4KNutCkoZo5qIFCyFwAZ0c7sGWJPIOsK8hSpIalS4bwvHPGbXcwLxh FVyDcL7/B/L0hth+jFyFIoxP44RLvYB7yIsGvbG9eK+2gjWiu/iXRPssBwFpzj1gnzU5 zLPQ== 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 k29si15759128pgl.157.2019.06.26.01.18.53; Wed, 26 Jun 2019 01:19:09 -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 S1726905AbfFZIRM (ORCPT + 99 others); Wed, 26 Jun 2019 04:17:12 -0400 Received: from foss.arm.com ([217.140.110.172]:56062 "EHLO foss.arm.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1725379AbfFZIRK (ORCPT ); Wed, 26 Jun 2019 04:17:10 -0400 Received: from usa-sjc-imap-foss1.foss.arm.com (unknown [10.121.207.14]) by usa-sjc-mx-foss1.foss.arm.com (Postfix) with ESMTP id EE1232B; Wed, 26 Jun 2019 01:17:09 -0700 (PDT) Received: from [10.162.40.140] (p8cg001049571a15.blr.arm.com [10.162.40.140]) by usa-sjc-imap-foss1.foss.arm.com (Postfix) with ESMTPSA id A38793F246; Wed, 26 Jun 2019 01:17:06 -0700 (PDT) Subject: Re: [PATCH v2 4/5] mm,memory_hotplug: allocate memmap from the added memory range for sparse-vmemmap To: Oscar Salvador , akpm@linux-foundation.org Cc: mhocko@suse.com, dan.j.williams@intel.com, pasha.tatashin@soleen.com, Jonathan.Cameron@huawei.com, david@redhat.com, vbabka@suse.cz, linux-mm@kvack.org, linux-kernel@vger.kernel.org References: <20190625075227.15193-1-osalvador@suse.de> <20190625075227.15193-5-osalvador@suse.de> From: Anshuman Khandual Message-ID: <3056b153-20a3-ac86-4a49-c26f8be4b2a6@arm.com> Date: Wed, 26 Jun 2019 13:47:32 +0530 User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:52.0) Gecko/20100101 Thunderbird/52.9.1 MIME-Version: 1.0 In-Reply-To: <20190625075227.15193-5-osalvador@suse.de> Content-Type: text/plain; charset=utf-8 Content-Language: en-US Content-Transfer-Encoding: 7bit Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org Hello Oscar, On 06/25/2019 01:22 PM, Oscar Salvador wrote: > diff --git a/arch/arm64/mm/mmu.c b/arch/arm64/mm/mmu.c > index 93ed0df4df79..d4b5661fa6b6 100644 > --- a/arch/arm64/mm/mmu.c > +++ b/arch/arm64/mm/mmu.c > @@ -765,7 +765,10 @@ int __meminit vmemmap_populate(unsigned long start, unsigned long end, int node, > if (pmd_none(READ_ONCE(*pmdp))) { > void *p = NULL; > > - p = vmemmap_alloc_block_buf(PMD_SIZE, node); > + if (altmap) > + p = altmap_alloc_block_buf(PMD_SIZE, altmap); > + else > + p = vmemmap_alloc_block_buf(PMD_SIZE, node); > if (!p) > return -ENOMEM; Is this really required to be part of this series ? I have an ongoing work (reworked https://patchwork.kernel.org/patch/10882781/) enabling altmap support on arm64 during memory hot add and remove path which is waiting on arm64 memory-hot remove to be merged first. - Anshuman