Received: by 2002:a25:ad19:0:0:0:0:0 with SMTP id y25csp11086098ybi; Thu, 25 Jul 2019 09:43:58 -0700 (PDT) X-Google-Smtp-Source: APXvYqzJuUF2IUwk0YmxhnDgaZOJD6z0jxcUy3x8+QSxm/txEbhShpkXC3gnzLE0IeQ0+nHLZdiF X-Received: by 2002:a63:20d:: with SMTP id 13mr76201597pgc.253.1564073038701; Thu, 25 Jul 2019 09:43:58 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1564073038; cv=none; d=google.com; s=arc-20160816; b=Wg1NVmaeLgpbx41265zaonuYwQhprMxBxytpT0QIt6Tf3G4JzvNeluC82duRS4b0DX TJsWRJa4qG2dfwXNEDua53FY1MnERogMlSpeGwGlzEiwuj6ukeXOL4PpWbOtbKajJvCT zFW/ExWLnaPVLVPGhX1Ja9OX/hplldrxOB9U/OVglGhp8BiR7xvUePp/D4hG3zbc+os0 M4NfyRbeuCob2dQV2ZzJ/BuRy1uTZ3xb1G9nLIJa13Fwe15WZDiMP/1SRUywnPJ4B00c hWruuAmQR+qBDnxUpFRDqrdCPv7UmeEslODY1TeRsJts3WYCg5tXoiD4ovP6/GjwcSyb GdNg== 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; bh=Z99G27Lzy67exZmkSSgaAeEp5wxfmyOARbAWmkyC0fM=; b=m9haEqZIFsXiryKgZdRLgHmxLBabns9+kh2BNqAJlQpzMa5rZufnZ3jKncjoSLcVif EDWUf0oXR2mZoxSWYMNEt6tMI2WGzZD776RYD0PpnOdAHwpbBHtNc2Q62i2VwFrQiTsu gfGoRefi83zWJsTbENfwVmehSs4ADzBhyCcw/qIWSa9FbBBV2fYGDNrUraz6mWBPFUTG rGJJpYmO9pWEXN0dcnApcFymrbIjGBHzk0dgxTh752s/auvf5gcuCT5PZeoC19/dBScz c0fQzw1zgSrNBxzUNH9f3wgEtz5rQx6A+haC1a/bJydWc1BOWQNWEjjZ/QoZwYCyTMf2 bqSg== 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 85si21797825pgb.583.2019.07.25.09.43.44; Thu, 25 Jul 2019 09:43:58 -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 S2389330AbfGYKNb (ORCPT + 99 others); Thu, 25 Jul 2019 06:13:31 -0400 Received: from mx2.suse.de ([195.135.220.15]:35746 "EHLO mx1.suse.de" rhost-flags-OK-OK-OK-FAIL) by vger.kernel.org with ESMTP id S2387531AbfGYKNb (ORCPT ); Thu, 25 Jul 2019 06:13:31 -0400 X-Virus-Scanned: by amavisd-new at test-mx.suse.de Received: from relay2.suse.de (unknown [195.135.220.254]) by mx1.suse.de (Postfix) with ESMTP id DF2CBAEAC; Thu, 25 Jul 2019 10:13:29 +0000 (UTC) Date: Thu, 25 Jul 2019 12:13:27 +0200 From: Oscar Salvador To: David Hildenbrand Cc: Dan Williams , Andrew Morton , Michal Hocko , Pavel Tatashin , Jonathan Cameron , Anshuman Khandual , Vlastimil Babka , Linux MM , Linux Kernel Mailing List Subject: Re: [PATCH v2 2/5] mm,memory_hotplug: Introduce MHP_VMEMMAP_FLAGS Message-ID: <20190725101322.GA16385@linux> References: <20190625075227.15193-1-osalvador@suse.de> <20190625075227.15193-3-osalvador@suse.de> <20190725092751.GA15964@linux> <71a30086-b093-48a4-389f-7e407898718f@redhat.com> <20190725094030.GA16069@linux> <6410dd7d-bc9c-1ca2-6cb7-d51b059be388@redhat.com> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <6410dd7d-bc9c-1ca2-6cb7-d51b059be388@redhat.com> User-Agent: Mutt/1.10.1 (2018-07-13) Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On Thu, Jul 25, 2019 at 12:04:08PM +0200, David Hildenbrand wrote: > As I said somewhere already (as far as I recall), one mode would be > sufficient. If you want per memblock, add the memory in memblock > granularity. > > So having a MHP_MEMMAP_ON_MEMORY that allocates it in one chunk would be > sufficient for the current use cases (DIMMs, Hyper-V). > > MHP_MEMMAP_ON_MEMORY: Allocate the memmap for the added memory in one > chunk from the beginning of the added memory. This piece of memory will > be accessed and used even before the memory is onlined. This is what I had in my early versions of the patchset, but I do remember that Michal suggested to let the caller specify if it wants the memmaps to be allocated per memblock, or per whole-range. I still think it makes somse sense, you can just pass a large chunk (spanning multiple memory-blocks) at once and yet specify to allocate it per memory-blocks. Of course, I also agree that having only one mode would ease things (not that much as v3 does not suppose that difference wrt. range vs memory-block). -- Oscar Salvador SUSE L3