Received: by 2002:a6b:500f:0:0:0:0:0 with SMTP id e15csp3017943iob; Mon, 16 May 2022 11:08:59 -0700 (PDT) X-Google-Smtp-Source: ABdhPJww0h1D7iojBPtZirNED1ln/R82EkC3AAH1CmT7v5dhTd8twUiYrIJ7sf0mWm9NR1nINRiD X-Received: by 2002:a05:6402:3812:b0:42a:a0dc:562c with SMTP id es18-20020a056402381200b0042aa0dc562cmr11798488edb.205.1652724539367; Mon, 16 May 2022 11:08:59 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1652724539; cv=none; d=google.com; s=arc-20160816; b=xXEC+qM1zjqqRqZlphsNGIJV39FDBHpBukZt+fCBlJf3XiPKNlN1QJktoHt1XeT6DR JJ9Hk34iSb3INcAgoLnO0uvT/vB7+OUJt/JaxfKIOJg/ti+ABQhmv3/DaOWwu/7sfLj3 qSMCYx6RgDVsOXWpf9rZ5UdW2cTYug3rCf9cwr9XEZjpPu6J3OLVp6DmNrEvVJPPVSdX 35p9a2RNGpVWr9sokcMpifYK+Z3rkkQfgIduuzRs7SMivEwcQfPB+j6IlZ2BcsUD0oJA 0/zTOHtMt0pauMzQBZgjccyAflnJqiiSjH53SFJ/n4RtlXeXvAVTg8mbSo5xvDzLqerp Z3sw== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:in-reply-to:content-disposition:mime-version :references:message-id:subject:cc:to:from:date:dkim-signature :dkim-signature; bh=mk2xKWahTV4e228Q8zDevZzG4IKrGzg2PozG1y8nurY=; b=XA87vy5lQLhAt8SV998IrBIGn1CWuSc4bEPdYHXj9+V20V+R/mjRYwwLB0GivT8WFx 6ZLGuXsWLYFBzky2vI/o82MYUxGyLv03r9vogmRpUpt0iyVkGK3kDdDFanBXAKu26Wi1 1u+yl8W4lwAcpLxLznyj2jEg5Hmc0b+plp0ZOWiU2Su8rm3/da012PwaetzKXIRw1mvX Ztiup1vHYDZby6WOGKxDgOnX1E9Y09kg0dC87x+U+8dqlWrowKdnYdNJI1V1WOMOXF8j 6cm6+/0nGqRCzpy/hYFALuDCpXT/ZIzOxJ0cXMeJ1xipSzfLU1Ih6a/4I/YW8YBViS9i EG9Q== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@suse.de header.s=susede2_rsa header.b=zSYEe+Se; dkim=neutral (no key) header.i=@suse.de header.s=susede2_ed25519 header.b=qaFD9ITY; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:20 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=suse.de Return-Path: Received: from out1.vger.email (out1.vger.email. [2620:137:e000::1:20]) by mx.google.com with ESMTP id s18-20020a05640217d200b00425e8ac3feasi9903780edy.90.2022.05.16.11.08.31; Mon, 16 May 2022 11:08:59 -0700 (PDT) Received-SPF: pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:20 as permitted sender) client-ip=2620:137:e000::1:20; Authentication-Results: mx.google.com; dkim=pass header.i=@suse.de header.s=susede2_rsa header.b=zSYEe+Se; dkim=neutral (no key) header.i=@suse.de header.s=susede2_ed25519 header.b=qaFD9ITY; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:20 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=suse.de Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S242544AbiEPKiy (ORCPT + 99 others); Mon, 16 May 2022 06:38:54 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:40924 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S229569AbiEPKiv (ORCPT ); Mon, 16 May 2022 06:38:51 -0400 Received: from smtp-out1.suse.de (smtp-out1.suse.de [195.135.220.28]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 635FF237D3; Mon, 16 May 2022 03:38:50 -0700 (PDT) Received: from imap2.suse-dmz.suse.de (imap2.suse-dmz.suse.de [192.168.254.74]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature ECDSA (P-521) server-digest SHA512) (No client certificate requested) by smtp-out1.suse.de (Postfix) with ESMTPS id 1EF2E21F6A; Mon, 16 May 2022 10:38:49 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=suse.de; s=susede2_rsa; t=1652697529; 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=mk2xKWahTV4e228Q8zDevZzG4IKrGzg2PozG1y8nurY=; b=zSYEe+Se+AkB0F7e+Wtoo81oE96AKXPz5YbZE1Xmp79CG+nldY0OemHFVYsx/vLlExbhQx PydBAyZ4W4diuTjDuZZniALdfRRdv9kl8IuL498b4+/A+UlLpnWZegtAiU5gTDnE8hNybI Fh/fDdugYPDRE1lN6lmSbX1rIreyaZw= DKIM-Signature: v=1; a=ed25519-sha256; c=relaxed/relaxed; d=suse.de; s=susede2_ed25519; t=1652697529; 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=mk2xKWahTV4e228Q8zDevZzG4IKrGzg2PozG1y8nurY=; b=qaFD9ITYXdPoDEOuP5Z77ambsqWbSJUfcG0qR3OCTLvAq4l+bA/j+t3va0jiCV79u71PDS VgZAEs5O6bIGnEAg== Received: from imap2.suse-dmz.suse.de (imap2.suse-dmz.suse.de [192.168.254.74]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature ECDSA (P-521) server-digest SHA512) (No client certificate requested) by imap2.suse-dmz.suse.de (Postfix) with ESMTPS id 579E213ADC; Mon, 16 May 2022 10:38:48 +0000 (UTC) Received: from dovecot-director2.suse.de ([192.168.254.65]) by imap2.suse-dmz.suse.de with ESMTPSA id z/PBErgpgmI2LwAAMHmgww (envelope-from ); Mon, 16 May 2022 10:38:48 +0000 Date: Mon, 16 May 2022 12:38:46 +0200 From: Oscar Salvador To: Muchun Song Cc: corbet@lwn.net, mike.kravetz@oracle.com, akpm@linux-foundation.org, mcgrof@kernel.org, keescook@chromium.org, yzaikin@google.com, david@redhat.com, masahiroy@kernel.org, linux-doc@vger.kernel.org, linux-kernel@vger.kernel.org, linux-mm@kvack.org, duanxiongchun@bytedance.com, smuchun@gmail.com Subject: Re: [PATCH v12 4/7] mm: hotplug: introduce SECTION_CANNOT_OPTIMIZE_VMEMMAP Message-ID: References: <20220516102211.41557-1-songmuchun@bytedance.com> <20220516102211.41557-5-songmuchun@bytedance.com> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <20220516102211.41557-5-songmuchun@bytedance.com> X-Spam-Status: No, score=-4.4 required=5.0 tests=BAYES_00,DKIM_SIGNED, DKIM_VALID,DKIM_VALID_AU,DKIM_VALID_EF,RCVD_IN_DNSWL_MED,SPF_HELO_NONE, SPF_PASS,T_SCC_BODY_TEXT_LINE autolearn=ham autolearn_force=no version=3.4.6 X-Spam-Checker-Version: SpamAssassin 3.4.6 (2021-04-09) on lindbergh.monkeyblade.net Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On Mon, May 16, 2022 at 06:22:08PM +0800, Muchun Song wrote: > --- a/mm/sparse.c > +++ b/mm/sparse.c > @@ -913,6 +913,13 @@ int __meminit sparse_add_section(int nid, unsigned long start_pfn, > ms = __nr_to_section(section_nr); > set_section_nid(section_nr, nid); > __section_mark_present(ms, section_nr); > + /* > + * Mark whole section as non-optimizable once there is a subsection > + * whose vmemmap pages are allocated from alternative allocator. The > + * early section is always optimizable. > + */ > + if (!early_section(ms) && altmap) > + section_mark_cannot_optimize_vmemmap(ms); Because no one expects those sections to be removed? IIRC, early_section + altmap only happened in case of sub-section pmem scenario? I guess my question is: can we really have early_sections coming from alternative allocator? I think this should be spelled out more. -- Oscar Salvador SUSE Labs