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 00AA0D3A672 for ; Tue, 29 Oct 2024 16:35:10 +0000 (UTC) Received: by kanga.kvack.org (Postfix) id 6A6FE6B009B; Tue, 29 Oct 2024 12:35:10 -0400 (EDT) Received: by kanga.kvack.org (Postfix, from userid 40) id 62EB76B009D; Tue, 29 Oct 2024 12:35:10 -0400 (EDT) X-Delivered-To: int-list-linux-mm@kvack.org Received: by kanga.kvack.org (Postfix, from userid 63042) id 4CF456B009E; Tue, 29 Oct 2024 12:35:10 -0400 (EDT) X-Delivered-To: linux-mm@kvack.org Received: from relay.hostedemail.com (smtprelay0012.hostedemail.com [216.40.44.12]) by kanga.kvack.org (Postfix) with ESMTP id 2AA1A6B009B for ; Tue, 29 Oct 2024 12:35:10 -0400 (EDT) Received: from smtpin23.hostedemail.com (a10.router.float.18 [10.200.18.1]) by unirelay03.hostedemail.com (Postfix) with ESMTP id 9D3A3A01EB for ; Tue, 29 Oct 2024 16:35:09 +0000 (UTC) X-FDA: 82727188782.23.F46365C Received: from nyc.source.kernel.org (nyc.source.kernel.org [147.75.193.91]) by imf14.hostedemail.com (Postfix) with ESMTP id 5052D100016 for ; Tue, 29 Oct 2024 16:34:40 +0000 (UTC) Authentication-Results: imf14.hostedemail.com; dkim=pass header.d=kernel.org header.s=k20201202 header.b=otd4vn6i; spf=pass (imf14.hostedemail.com: domain of rppt@kernel.org designates 147.75.193.91 as permitted sender) smtp.mailfrom=rppt@kernel.org; dmarc=pass (policy=quarantine) header.from=kernel.org ARC-Seal: i=1; s=arc-20220608; d=hostedemail.com; t=1730219627; a=rsa-sha256; cv=none; b=DGEZUqVsuV5XQK4ICLhKP26RnSJYUZ3BrWLIfqVtSf0fnLFJPKAJDqzzkvTQB1hpwI6pNr eBqx9p3aq4//vM3ZvYqnVOYjzWoB57zZIqKvV1TntAmACRRwuNRPXaPUy0YZ7xDPT2ieqq qJMrhcqDW3lmwnJswmogaEqqocZSumg= ARC-Authentication-Results: i=1; imf14.hostedemail.com; dkim=pass header.d=kernel.org header.s=k20201202 header.b=otd4vn6i; spf=pass (imf14.hostedemail.com: domain of rppt@kernel.org designates 147.75.193.91 as permitted sender) smtp.mailfrom=rppt@kernel.org; dmarc=pass (policy=quarantine) header.from=kernel.org ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=hostedemail.com; s=arc-20220608; t=1730219627; h=from:from:sender: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: in-reply-to:in-reply-to:references:references:dkim-signature; bh=YcF8LNRd7RDRSyHPbT0WwLkDgQSIeog4dG95+GYSZfQ=; b=vE7zhtBnG85dQ7xOH+jTsVucJnflpM+CbwHtNpbzpxz0kEvI90Zir2jzTVdf7djZOEuDE7 xa0qxOKlLDvNO8qRR8fz/jXj6io4zqaHTj0CWOt+jArOJBPrvLCks1wAZEqT7ZNqiQCujz 8iExptjDPv41O1hzDM6gWKQOz4isc1o= Received: from smtp.kernel.org (transwarp.subspace.kernel.org [100.75.92.58]) by nyc.source.kernel.org (Postfix) with ESMTP id 226D3A4302F; Tue, 29 Oct 2024 16:33:11 +0000 (UTC) Received: by smtp.kernel.org (Postfix) with ESMTPSA id 5F9C5C4CECD; Tue, 29 Oct 2024 16:34:58 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=kernel.org; s=k20201202; t=1730219706; bh=Yj1b0cSGOis8m/UbHkjlmF67Irb4SXyzwgTNfJtCv4E=; h=Date:From:To:Cc:Subject:References:In-Reply-To:From; b=otd4vn6iRnZrPv2Llj4qkLPBk+7sCOd1HCIYS04+RCV4G3arDJmvKN0Ua0udw2Rjz Y9HqTXjHPqETIUiitVuGWmsYPl1OfP9XXbe26QKVlLU/NbqltpNoyMPdaKFxk4YwhS jPFRlYG0b5SWDwJ/dsMNrJr3is0jCr6LZbBG88K9AM3qwyHg+NE7ZkzKh9PeIbkcig G2k8PYOGHq4l2QkoEIJmZHohrAldMZfTZ9snAtPiPg6LpTDpWa+MfnxvdpbmN+qL6G 5Iz4ClflvSViLQKRKW9YsutYB2T89rV7ZoAJWmzX7+4k9rYmkBQZ+7HfRZem+0rlus 9yI00MJ775kBA== Date: Tue, 29 Oct 2024 18:31:08 +0200 From: Mike Rapoport To: Gregory Price Cc: David Hildenbrand , x86@kernel.org, linux-kernel@vger.kernel.org, linux-acpi@vger.kernel.org, linux-mm@kvack.org, linux-cxl@kvack.org, Jonathan.Cameron@huawei.com, dan.j.williams@intel.com, rrichter@amd.com, Terry.Bowman@amd.com, dave.jiang@intel.com, ira.weiny@intel.com, alison.schofield@intel.com, dave.hansen@linux.intel.com, luto@kernel.org, peterz@infradead.org, tglx@linutronix.de, mingo@redhat.com, bp@alien8.de, hpa@zytor.com, rafael@kernel.org, lenb@kernel.org, osalvador@suse.de, gregkh@linuxfoundation.org, akpm@linux-foundation.org Subject: Re: [PATCH v3 3/3] acpi,srat: give memory block size advice based on CFMWS alignment Message-ID: References: <20241022213450.15041-1-gourry@gourry.net> <20241022213450.15041-4-gourry@gourry.net> <55a5b63a-a6bb-4ba0-9aad-c9d8741d1c3a@redhat.com> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: X-Stat-Signature: ij5kcujhimwznkkgzqtsubzbwoj5ie6a X-Rspamd-Queue-Id: 5052D100016 X-Rspam-User: X-Rspamd-Server: rspam10 X-HE-Tag: 1730219680-391206 X-HE-Meta: U2FsdGVkX1/GaPwVZNoiWAzeSUDUFFjCKON6h2etv9HoK2mK3+FIur0Dwg5rNbp6Y0s/ZhWbDrPJZLpLrPIEfm2DoISpzLTRUlJ7fHZGk75GuTkkhKdPNcVonQ2gTYRECc5kutaXbvLdxKGY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RMAMe44dclm70UNpZxsJGoHvQTE 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: List-Subscribe: List-Unsubscribe: On Tue, Oct 29, 2024 at 09:20:44AM -0400, Gregory Price wrote: > On Tue, Oct 29, 2024 at 01:42:12PM +0100, David Hildenbrand wrote: > > > > > static int __init acpi_parse_cfmws(union acpi_subtable_headers *header, > > > void *arg, const unsigned long table_end) > > > { > > > @@ -545,6 +569,15 @@ int __init acpi_numa_init(void) > > > * Initialize a fake_pxm as the first available PXM to emulate. > > > */ > > > + /* Align memblock size to CFMW regions if possible */ > > > + acpi_table_parse_cedt(ACPI_CEDT_TYPE_CFMWS, acpi_align_cfmws, NULL); > > > + > > > + /* > > > + * Nodes start populating with blocks after this, so probe the max > > > + * block size to prevent it from changing in the future. > > > + */ > > > + memory_block_probe_max_size(); > > > + > > > > This looks odd. Why shouldn't we allow someone else to suggest/advise an > > even smaller "max size" ? I'd drop that. > > > > Ah, my reading of the numa_add_memblk path was mistaken. I thought the > hotplug blocks would start being created immediately after this in the > acpi_parse_cfmws path - but memblk != memory_block x_x. Right, we have a bunch of semi related memory blocks :) There's mm/memblock.c for early memory description and allocation, mm/numa_memblks.c for to describe what range belongs to which NUMA node and there are memory blocks in drivers/base/memory.c that describe hot-(un)plugable memory blocks. Maybe it's time to rename memblock_* APIs back to bootmem_ :-D > Will drop along with other recommended updates and submit v4. > > ~Gregory -- Sincerely yours, Mike.