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 Received: from kanga.kvack.org (kanga.kvack.org [205.233.56.17]) by smtp.lore.kernel.org (Postfix) with ESMTP id 06909C433EF for ; Mon, 16 May 2022 10:38:51 +0000 (UTC) Received: by kanga.kvack.org (Postfix) id 787188D0005; Mon, 16 May 2022 06:38:51 -0400 (EDT) Received: by kanga.kvack.org (Postfix, from userid 40) id 737438D0003; Mon, 16 May 2022 06:38:51 -0400 (EDT) X-Delivered-To: int-list-linux-mm@kvack.org Received: by kanga.kvack.org (Postfix, from userid 63042) id 5FE478D0005; Mon, 16 May 2022 06:38:51 -0400 (EDT) X-Delivered-To: linux-mm@kvack.org Received: from relay.hostedemail.com (smtprelay0011.hostedemail.com [216.40.44.11]) by kanga.kvack.org (Postfix) with ESMTP id 4C0AB8D0003 for ; Mon, 16 May 2022 06:38:51 -0400 (EDT) Received: from smtpin04.hostedemail.com (a10.router.float.18 [10.200.18.1]) by unirelay08.hostedemail.com (Postfix) with ESMTP id 18CC2219B1 for ; Mon, 16 May 2022 10:38:51 +0000 (UTC) X-FDA: 79471258062.04.BF2E1D4 Received: from smtp-out1.suse.de (smtp-out1.suse.de [195.135.220.28]) by imf30.hostedemail.com (Postfix) with ESMTP id 720D580007 for ; Mon, 16 May 2022 10:38:28 +0000 (UTC) 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-Rspam-User: X-Rspamd-Server: rspam11 X-Rspamd-Queue-Id: 720D580007 X-Stat-Signature: y5xkmp773tz3ga6h5bx44ua4g19ou4eu Authentication-Results: imf30.hostedemail.com; dkim=pass header.d=suse.de header.s=susede2_rsa header.b=zSYEe+Se; dkim=pass header.d=suse.de header.s=susede2_ed25519 header.b=qaFD9ITY; spf=pass (imf30.hostedemail.com: domain of osalvador@suse.de designates 195.135.220.28 as permitted sender) smtp.mailfrom=osalvador@suse.de; dmarc=pass (policy=none) header.from=suse.de X-HE-Tag: 1652697508-11491 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 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