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 D9FC4C433E0 for ; Wed, 24 Mar 2021 13:17:38 +0000 (UTC) Received: from vger.kernel.org (vger.kernel.org [23.128.96.18]) by mail.kernel.org (Postfix) with ESMTP id A3D1461A1E for ; Wed, 24 Mar 2021 13:17:38 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S235416AbhCXNR1 (ORCPT ); Wed, 24 Mar 2021 09:17:27 -0400 Received: from us-smtp-delivery-124.mimecast.com ([63.128.21.124]:47298 "EHLO us-smtp-delivery-124.mimecast.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S234753AbhCXNPr (ORCPT ); Wed, 24 Mar 2021 09:15:47 -0400 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=redhat.com; s=mimecast20190719; t=1616591747; 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=fwfRna23b1/1zuMFzGp4YS0CnL5NG2i+hg1hHfBfPGAmI5Az+pXmjpHCkXuJ5lQKeLdJ8V A1DL+ameiDvscplK75p1HWBYufB6MutB9kW9qOqcRZroge0c/hh/2Tgr+XnY9IdndhLv2Z pzQprvcfBiCyvWR8hAKmvBQQQG0nOLU= 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 Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org 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