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=-7.5 required=3.0 tests=BAYES_00,DKIMWL_WL_HIGH, DKIM_SIGNED,DKIM_VALID,DKIM_VALID_AU,HEADER_FROM_DIFFERENT_DOMAINS, MAILING_LIST_MULTI,NICE_REPLY_A,SPF_HELO_NONE,SPF_PASS,USER_AGENT_SANE_1 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 815B6C433C1 for ; Wed, 24 Mar 2021 13:15:48 +0000 (UTC) Received: from kanga.kvack.org (kanga.kvack.org [205.233.56.17]) by mail.kernel.org (Postfix) with ESMTP id 7CC2761A07 for ; Wed, 24 Mar 2021 13:15:47 +0000 (UTC) DMARC-Filter: OpenDMARC Filter v1.3.2 mail.kernel.org 7CC2761A07 Authentication-Results: mail.kernel.org; dmarc=fail (p=none dis=none) header.from=redhat.com Authentication-Results: mail.kernel.org; spf=pass smtp.mailfrom=owner-linux-mm@kvack.org Received: by kanga.kvack.org (Postfix) id E81926B02C5; Wed, 24 Mar 2021 09:15:46 -0400 (EDT) Received: by kanga.kvack.org (Postfix, from userid 40) id E580F6B02C7; Wed, 24 Mar 2021 09:15:46 -0400 (EDT) X-Delivered-To: int-list-linux-mm@kvack.org Received: by kanga.kvack.org (Postfix, from userid 63042) id CD19A6B02C8; Wed, 24 Mar 2021 09:15:46 -0400 (EDT) X-Delivered-To: linux-mm@kvack.org Received: from forelay.hostedemail.com (smtprelay0192.hostedemail.com [216.40.44.192]) by kanga.kvack.org (Postfix) with ESMTP id B0B5B6B02C5 for ; Wed, 24 Mar 2021 09:15:46 -0400 (EDT) Received: from smtpin11.hostedemail.com (10.5.19.251.rfc1918.com [10.5.19.251]) by forelay03.hostedemail.com (Postfix) with ESMTP id 6D41D824999B for ; Wed, 24 Mar 2021 13:15:46 +0000 (UTC) X-FDA: 77954815092.11.487B65F Received: from us-smtp-delivery-124.mimecast.com (us-smtp-delivery-124.mimecast.com [63.128.21.124]) by imf06.hostedemail.com (Postfix) with ESMTP id 89CA7C0007E4 for ; Wed, 24 Mar 2021 13:15:45 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=redhat.com; s=mimecast20190719; t=1616591745; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding: in-reply-to:in-reply-to:references:references; bh=PSFX/DcSFEgheuDXE3GzEee+g+XEjoU2CBXg1Z8/dSA=; b=izjiBrqJvZxBk6cyU3IHbENTktkdLWLupgLkUh26u8hXt6EVqFzdBdqV2vZcLH/6fKNO3I RYOgVitMNuxq9dH/lnaYgz0QVouOa65jGH+NTq+2PQhjkmuHnkgpoHWiE0m3d626Dc1xmR EWYtpt8ivhJh6Do3/s/IXOVBloZiuCo= Received: from mimecast-mx01.redhat.com (mimecast-mx01.redhat.com [209.132.183.4]) (Using TLS) by relay.mimecast.com with ESMTP id us-mta-466-u5ZjKIz3N9W3KYy5VT2eBw-1; Wed, 24 Mar 2021 09:15:43 -0400 X-MC-Unique: u5ZjKIz3N9W3KYy5VT2eBw-1 Received: from smtp.corp.redhat.com (int-mx02.intmail.prod.int.phx2.redhat.com [10.5.11.12]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by mimecast-mx01.redhat.com (Postfix) with ESMTPS id 59A9A88AEE8; Wed, 24 Mar 2021 13:13:34 +0000 (UTC) Received: from [10.36.115.66] (ovpn-115-66.ams2.redhat.com [10.36.115.66]) by smtp.corp.redhat.com (Postfix) with ESMTP id 74B6A83168; Wed, 24 Mar 2021 13:13:32 +0000 (UTC) Subject: Re: [PATCH v5 1/5] mm,memory_hotplug: Allocate memmap from the added memory range To: Michal Hocko Cc: Oscar Salvador , Andrew Morton , Anshuman Khandual , Vlastimil Babka , Pavel Tatashin , linux-mm@kvack.org, linux-kernel@vger.kernel.org References: <20210319092635.6214-1-osalvador@suse.de> <20210319092635.6214-2-osalvador@suse.de> <20210324101259.GB16560@linux> From: David Hildenbrand Organization: Red Hat GmbH Message-ID: <32bc6e31-0200-1e8c-895c-3f60ed072fc2@redhat.com> Date: Wed, 24 Mar 2021 14:13:31 +0100 User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:78.0) Gecko/20100101 Thunderbird/78.8.0 MIME-Version: 1.0 In-Reply-To: Content-Type: text/plain; charset=utf-8; format=flowed Content-Language: en-US Content-Transfer-Encoding: 7bit X-Scanned-By: MIMEDefang 2.79 on 10.5.11.12 X-Stat-Signature: 7zb1m5desahegddn7zuih8omq3gbsxjo X-Rspamd-Server: rspam02 X-Rspamd-Queue-Id: 89CA7C0007E4 Received-SPF: none (redhat.com>: No applicable sender policy available) receiver=imf06; identity=mailfrom; envelope-from=""; helo=us-smtp-delivery-124.mimecast.com; client-ip=63.128.21.124 X-HE-DKIM-Result: pass/pass X-HE-Tag: 1616591745-175851 X-Bogosity: Ham, tests=bogofilter, spamicity=0.000000, version=1.2.4 Sender: owner-linux-mm@kvack.org Precedence: bulk X-Loop: owner-majordomo@kvack.org List-ID: On 24.03.21 13:37, Michal Hocko wrote: > On Wed 24-03-21 13:23:47, David Hildenbrand wrote: >> On 24.03.21 13:10, Michal Hocko wrote: >>> On Wed 24-03-21 13:03:29, Michal Hocko wrote: >>>> On Wed 24-03-21 11:12:59, Oscar Salvador wrote: >>> [...] >>> >>> an additional remark >>> >>>>> - online_pages()->move_pfn_range_to_zone(): Accounts for node/zone's spanned pages >>>>> - online_pages()->zone->present_pages += nr_pages; >>> >>> I am pretty sure you shouldn't account vmmemmap pages to the target zone >>> in some cases - e.g. vmemmap cannot be part of the movable zone, can it? >>> So this would be yet another special casing. This patch has got it wrong >>> unless I have missed some special casing. >>> >> >> It's a bit unfortunate that we have to discuss the very basic design >> decisions again. > > It would be great to have those basic design decisions layed out in the > changelog. > >> @Oscar, maybe you can share the links where we discussed all this and add >> some of it to the patch description. >> >> I think what we have right here is good enough for an initial version, from >> where on we can improve things without having to modify calling code. > > I have to say I really dislike vmemmap proliferation into > {on,off}lining. It just doesn't belong there from a layering POV. All > this code should care about is to hand over pages to the allocator and > make them visible. Well, someone has to initialize the vmemmap of the vmemmap pages ( which is itself :) ), and as the vemmap does not span complete sections things can get very weird as we can only set whole sections online (there was more to that, I think it's buried in previous discussions). > > Is that a sufficient concern to nack the whole thing? No, I do not think > so. But I do not see any particular rush to have this work needs to be > merged ASAP. Sure, there is no need to rush (not that I suggested that). -- Thanks, David / dhildenb