From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org X-Spam-Level: X-Spam-Status: No, score=-5.8 required=3.0 tests=BAYES_00,DKIM_SIGNED, DKIM_VALID,DKIM_VALID_AU,HEADER_FROM_DIFFERENT_DOMAINS,MAILING_LIST_MULTI, SPF_HELO_NONE,SPF_PASS autolearn=no autolearn_force=no version=3.4.0 Received: from mail.kernel.org (mail.kernel.org [198.145.29.99]) by smtp.lore.kernel.org (Postfix) with ESMTP id C0C20C433C1 for ; Fri, 26 Mar 2021 09:11:54 +0000 (UTC) Received: from kanga.kvack.org (kanga.kvack.org [205.233.56.17]) by mail.kernel.org (Postfix) with ESMTP id 576A861A2D for ; Fri, 26 Mar 2021 09:11:54 +0000 (UTC) DMARC-Filter: OpenDMARC Filter v1.3.2 mail.kernel.org 576A861A2D Authentication-Results: mail.kernel.org; dmarc=fail (p=quarantine dis=none) header.from=suse.com Authentication-Results: mail.kernel.org; spf=pass smtp.mailfrom=owner-linux-mm@kvack.org Received: by kanga.kvack.org (Postfix) id C9B766B0072; Fri, 26 Mar 2021 05:11:53 -0400 (EDT) Received: by kanga.kvack.org (Postfix, from userid 40) id C38386B0073; Fri, 26 Mar 2021 05:11:53 -0400 (EDT) X-Delivered-To: int-list-linux-mm@kvack.org Received: by kanga.kvack.org (Postfix, from userid 63042) id B00876B0074; Fri, 26 Mar 2021 05:11:53 -0400 (EDT) X-Delivered-To: linux-mm@kvack.org Received: from forelay.hostedemail.com (smtprelay0052.hostedemail.com [216.40.44.52]) by kanga.kvack.org (Postfix) with ESMTP id 90B0C6B0072 for ; Fri, 26 Mar 2021 05:11:53 -0400 (EDT) Received: from smtpin15.hostedemail.com (10.5.19.251.rfc1918.com [10.5.19.251]) by forelay04.hostedemail.com (Postfix) with ESMTP id 582FB68AA for ; Fri, 26 Mar 2021 09:11:53 +0000 (UTC) X-FDA: 77961458106.15.E81A464 Received: from mx2.suse.de (mx2.suse.de [195.135.220.15]) by imf19.hostedemail.com (Postfix) with ESMTP id 3A0F090009E2 for ; Fri, 26 Mar 2021 09:11:49 +0000 (UTC) X-Virus-Scanned: by amavisd-new at test-mx.suse.de DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=suse.com; s=susede1; t=1616749911; h=from:from:reply-to:date:date:message-id:message-id:to:to:cc:cc: mime-version:mime-version:content-type:content-type: in-reply-to:in-reply-to:references:references; bh=v3Fgha7MpTSL8OTwDMUJAwK0cmAs0bMFt44LOcSj2mU=; b=c976bR14od94zSckadW8vjQ8Zci7Wj5DGuL8+T3jheSTsTWtvw4fJY00fcz3SXs4SsfWf6 +XN4O3Bz6G7mxnNZ0AtXtlhk+f8YWPRxS+tj1ary5ArZj6zfFgZs+rG0tK1P1vZqPM12Rc XsD12oNpMHMyydTu3qiSN0AKBuOBaWw= Received: from relay2.suse.de (unknown [195.135.221.27]) by mx2.suse.de (Postfix) with ESMTP id 98AFBAA55; Fri, 26 Mar 2021 09:11:51 +0000 (UTC) Date: Fri, 26 Mar 2021 10:11:51 +0100 From: Michal Hocko To: Oscar Salvador Cc: David Hildenbrand , Andrew Morton , Anshuman Khandual , Vlastimil Babka , Pavel Tatashin , linux-mm@kvack.org, linux-kernel@vger.kernel.org Subject: Re: [PATCH v5 1/5] mm,memory_hotplug: Allocate memmap from the added memory range Message-ID: References: <40fac999-2d28-9205-23f0-516fa9342bbe@redhat.com> <92fe19d0-56ac-e929-a9c1-d6a4e0da39d1@redhat.com> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: X-Rspamd-Server: rspam04 X-Rspamd-Queue-Id: 3A0F090009E2 X-Stat-Signature: qbdgwytz35iysc5yt9xuwxhes16wrjf3 Received-SPF: none (suse.com>: No applicable sender policy available) receiver=imf19; identity=mailfrom; envelope-from=""; helo=mx2.suse.de; client-ip=195.135.220.15 X-HE-DKIM-Result: pass/pass X-HE-Tag: 1616749909-361672 X-Bogosity: Ham, tests=bogofilter, spamicity=0.000031, version=1.2.4 Sender: owner-linux-mm@kvack.org Precedence: bulk X-Loop: owner-majordomo@kvack.org List-ID: On Fri 26-03-21 09:55:03, Oscar Salvador wrote: > On Fri, Mar 26, 2021 at 09:35:03AM +0100, Michal Hocko wrote: [...] > > Yes this is much better! Just a minor suggestion would be to push > > memory_block all the way to memory_block_online (it oline a memory > > block). I would also slightly prefer to provide 2 helpers that would make > > it clear that this is to reserve/cleanup the vmemamp space (defined in > > the memory_hotplug proper). > > Glad to hear that! > By pushing memory_block all the way to memory_block_{online,offline}, you > mean passing the memblock struct together with nr_vmemmap_pages, > only_type and nid to memory_block_{offline,online}, and derive in there > the start_pfn and nr_pages? memory_block + online_type should be sufficient. -- Michal Hocko SUSE Labs