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 69633C433DB for ; Wed, 24 Mar 2021 12:37:46 +0000 (UTC) Received: from kanga.kvack.org (kanga.kvack.org [205.233.56.17]) by mail.kernel.org (Postfix) with ESMTP id ED28C61A09 for ; Wed, 24 Mar 2021 12:37:45 +0000 (UTC) DMARC-Filter: OpenDMARC Filter v1.3.2 mail.kernel.org ED28C61A09 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 734026B02C2; Wed, 24 Mar 2021 08:37:45 -0400 (EDT) Received: by kanga.kvack.org (Postfix, from userid 40) id 6E2D96B02C3; Wed, 24 Mar 2021 08:37:45 -0400 (EDT) X-Delivered-To: int-list-linux-mm@kvack.org Received: by kanga.kvack.org (Postfix, from userid 63042) id 5D1946B02C4; Wed, 24 Mar 2021 08:37:45 -0400 (EDT) X-Delivered-To: linux-mm@kvack.org Received: from forelay.hostedemail.com (smtprelay0111.hostedemail.com [216.40.44.111]) by kanga.kvack.org (Postfix) with ESMTP id 425766B02C2 for ; Wed, 24 Mar 2021 08:37:45 -0400 (EDT) Received: from smtpin32.hostedemail.com (10.5.19.251.rfc1918.com [10.5.19.251]) by forelay04.hostedemail.com (Postfix) with ESMTP id 0C06EA77E for ; Wed, 24 Mar 2021 12:37:45 +0000 (UTC) X-FDA: 77954719290.32.ACD5754 Received: from mx2.suse.de (mx2.suse.de [195.135.220.15]) by imf10.hostedemail.com (Postfix) with ESMTP id 37AC3407F8FF for ; Wed, 24 Mar 2021 12:37:43 +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=1616589463; 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=ZtgFaOg9Su1Yf0TQH/ROrKjdESYBrkslJWw39nM9B8s=; b=oioWrSvcZsBqeA2OHs+ANwAYR1Tq55BbrkzRcMM5VnRBNPdq3Tx2Q5GOWTkceHSz4Jt8lH MpCmHE5QAAqNhjVZ/s+ynOHOThytklhkw5UB/Tlu0ATCiPZ7IhR1qHtYrT3jjTJA0ysL8E mjMWhizBKYz8+vH1LxQhtp+R6TybYUg= Received: from relay2.suse.de (unknown [195.135.221.27]) by mx2.suse.de (Postfix) with ESMTP id E52F7AD38; Wed, 24 Mar 2021 12:37:42 +0000 (UTC) Date: Wed, 24 Mar 2021 13:37:35 +0100 From: Michal Hocko To: David Hildenbrand Cc: Oscar Salvador , 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: <20210319092635.6214-1-osalvador@suse.de> <20210319092635.6214-2-osalvador@suse.de> <20210324101259.GB16560@linux> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: X-Stat-Signature: w46bkchqbmt58tufyprmjknhjxucb7b6 X-Rspamd-Server: rspam05 X-Rspamd-Queue-Id: 37AC3407F8FF Received-SPF: none (suse.com>: No applicable sender policy available) receiver=imf10; identity=mailfrom; envelope-from=""; helo=mx2.suse.de; client-ip=195.135.220.15 X-HE-DKIM-Result: pass/pass X-HE-Tag: 1616589463-378702 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 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. 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. -- Michal Hocko SUSE Labs