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 6F867C433E2 for ; Wed, 24 Mar 2021 12:24:46 +0000 (UTC) Received: from vger.kernel.org (vger.kernel.org [23.128.96.18]) by mail.kernel.org (Postfix) with ESMTP id 30BAD61A0F for ; Wed, 24 Mar 2021 12:24:46 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S233286AbhCXMYU (ORCPT ); Wed, 24 Mar 2021 08:24:20 -0400 Received: from us-smtp-delivery-124.mimecast.com ([216.205.24.124]:28341 "EHLO us-smtp-delivery-124.mimecast.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S232276AbhCXMYF (ORCPT ); Wed, 24 Mar 2021 08:24:05 -0400 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=redhat.com; s=mimecast20190719; t=1616588644; 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=XGTuM/6dwW8oPW7JX32HRs4SmM+PHWXQq1cuJEp3pks=; b=T+8DSqA9ZvSD+O+65d2aoAyDf6vRoTMsVg7p+UeHgG+CQrXWhVEv0qsu0886Ol4dh9IAFM Sn5nbcL6mQTiXQ4RvUSpDXgDcql+dBb4xVMvRKhdhSidanZQDs+I+RX9GAe2sRf98a4m99 bq5WZ4FZ8RNqYbk8BZsOykSkKpa81Ts= 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-379-93jokzXmO5KEzIkXUWxVOw-1; Wed, 24 Mar 2021 08:23:59 -0400 X-MC-Unique: 93jokzXmO5KEzIkXUWxVOw-1 Received: from smtp.corp.redhat.com (int-mx08.intmail.prod.int.phx2.redhat.com [10.5.11.23]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by mimecast-mx01.redhat.com (Postfix) with ESMTPS id 527C51005D55; Wed, 24 Mar 2021 12:23:58 +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 071FC19D80; Wed, 24 Mar 2021 12:23:50 +0000 (UTC) Subject: Re: [PATCH v5 1/5] mm,memory_hotplug: Allocate memmap from the added memory range To: Michal Hocko , Oscar Salvador Cc: 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: Date: Wed, 24 Mar 2021 13:23:47 +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.84 on 10.5.11.23 Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org 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. @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. -- Thanks, David / dhildenb