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 bombadil.infradead.org (bombadil.infradead.org [198.137.202.133]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by smtp.lore.kernel.org (Postfix) with ESMTPS id 0F340C30653 for ; Wed, 3 Jul 2024 07:47:50 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=lists.infradead.org; s=bombadil.20210309; h=Sender:List-Subscribe:List-Help :List-Post:List-Archive:List-Unsubscribe:List-Id:Content-Transfer-Encoding: Content-Type:In-Reply-To:References:Cc:To:From:Subject:MIME-Version:Date: Message-ID:Reply-To:Content-ID:Content-Description:Resent-Date:Resent-From: Resent-Sender:Resent-To:Resent-Cc:Resent-Message-ID:List-Owner; bh=U8wqaFZL1Wv5rPR7nebfPA7ewssLN2UKabsH+ryj9yM=; b=JWd2c4+B4LFwv+oSWDr2JkHVKa zw+TihqvnXdwy2d10JU7B/UUBju6VGRoAV/acb9q+NPZ8dkufKN8Li/pJc44lHB5EYGDWWCwlKfSh /4Yj5pNNABlB50/6U5jH2Xlim0mqAbQz7Inw7lUEJ4+hRkNmyeUZpBsp/5JysKoZYNekcgkMTphdS XxnIbJlImJ0ZbNQPyhSXE4sy4iIC/wSZ7tkGxvMUoMODXWqC8N6UtjRuSinufvge93F4wFexvBp3s tNb+EVxUcQaWFtfBfWTOSYzy2GdFqgdgm89VLVHYfeOtlipea7Cm2DtMZtSE7fcpEH9jfkZzyWfBP 5ra1o0GA==; Received: from localhost ([::1] helo=bombadil.infradead.org) by bombadil.infradead.org with esmtp (Exim 4.97.1 #2 (Red Hat Linux)) id 1sOuiD-00000009Mic-0srs; Wed, 03 Jul 2024 07:47:35 +0000 Received: from fanzine.igalia.com ([178.60.130.6] helo=fanzine2.igalia.com) by bombadil.infradead.org with esmtps (Exim 4.97.1 #2 (Red Hat Linux)) id 1sOui1-00000009Mi1-2c0n for linux-arm-kernel@lists.infradead.org; Wed, 03 Jul 2024 07:47:22 +0000 DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=igalia.com; s=20170329; h=Content-Transfer-Encoding:Content-Type:In-Reply-To:References: Cc:To:From:Subject:MIME-Version:Date:Message-ID:Sender:Reply-To:Content-ID: Content-Description:Resent-Date:Resent-From:Resent-Sender:Resent-To:Resent-Cc :Resent-Message-ID:List-Id:List-Help:List-Unsubscribe:List-Subscribe: List-Post:List-Owner:List-Archive; bh=U8wqaFZL1Wv5rPR7nebfPA7ewssLN2UKabsH+ryj9yM=; b=X6lkPr0LzuBYsZbI9vLcKe9l5z kZA8soXqSJABJbd6JnPH5y4RGEPGEwWOT9GbnKh2ZzQTguL5NRX/8kc72zu0nQAp7pdCcvc6zwVyZ XhLtO7vT4qiU+vU+NrByWc/GucqgwwHK4tnWw+Q/0HtHWy6MEBxdk3RKlC0C9zc+HqkoqvIUx/tcf G8oyiCyy5ojv+h2YeXnQTk74L28a9rMzxvmbQ8/WxgZEIe8PcnAEz8cVQDYe6Al36Lx+FIfZxGXMB r49Wpyp5jQGC8po+YLSvisUEqn04GJpeYkboMnXvfw6HnZapTHNVZvlVFnkeZKupvasCSKf4JomlW Pm2bHyIw==; Received: from [84.69.19.168] (helo=[192.168.0.101]) by fanzine2.igalia.com with esmtpsa (Cipher TLS1.3:ECDHE_X25519__RSA_PSS_RSAE_SHA256__AES_128_GCM:128) (Exim) id 1sOuhw-00AbWA-Tx; Wed, 03 Jul 2024 09:47:16 +0200 Message-ID: Date: Wed, 3 Jul 2024 08:47:15 +0100 MIME-Version: 1.0 User-Agent: Mozilla Thunderbird Subject: Re: [PATCH 1/2] numa: Add simple generic NUMA emulation From: Tvrtko Ursulin To: Greg Kroah-Hartman , Tvrtko Ursulin Cc: linux-arm-kernel@lists.infradead.org, linux-kernel@vger.kernel.org, kernel-dev@igalia.com, =?UTF-8?Q?Ma=C3=ADra_Canal?= , Catalin Marinas , Will Deacon References: <20240625125803.38038-1-tursulin@igalia.com> <20240625125803.38038-2-tursulin@igalia.com> <2024062627-curler-unlucky-51e0@gregkh> <679a9dda-8e8a-4428-8d57-30b0c60f28ce@igalia.com> Content-Language: en-GB In-Reply-To: <679a9dda-8e8a-4428-8d57-30b0c60f28ce@igalia.com> Content-Type: text/plain; charset=UTF-8; format=flowed Content-Transfer-Encoding: 8bit X-CRM114-Version: 20100106-BlameMichelson ( TRE 0.8.0 (BSD) ) MR-646709E3 X-CRM114-CacheID: sfid-20240703_004721_683743_86A2D6BE X-CRM114-Status: GOOD ( 22.05 ) X-BeenThere: linux-arm-kernel@lists.infradead.org X-Mailman-Version: 2.1.34 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Sender: "linux-arm-kernel" Errors-To: linux-arm-kernel-bounces+linux-arm-kernel=archiver.kernel.org@lists.infradead.org Hi Greg, Gentle reminder on the opens from this thread. Let me re-summarise the question below: On 26/06/2024 12:47, Tvrtko Ursulin wrote: > > Hi Greg, > > On 26/06/2024 08:38, Greg Kroah-Hartman wrote: >> On Tue, Jun 25, 2024 at 01:58:02PM +0100, Tvrtko Ursulin wrote: >>> From: Maíra Canal >>> >>> Add some common code for splitting the memory into N emulated NUMA >>> memory >>> nodes. >>> >>> Individual architecture can then enable selecting this option and use >>> the >>> existing numa=fake= kernel argument to enable it. >>> >>> Memory is always split into equally sized chunks. >>> >>> Signed-off-by: Maíra Canal >>> Signed-off-by: Tvrtko Ursulin >>> Co-developed-by: Tvrtko Ursulin >>> Cc: Catalin Marinas >>> Cc: Will Deacon >>> Cc: Greg Kroah-Hartman >>> Cc: “Rafael J. Wysocki" >>> --- >>>   drivers/base/Kconfig          |  7 ++++ >>>   drivers/base/Makefile         |  1 + >>>   drivers/base/arch_numa.c      |  6 ++++ >>>   drivers/base/numa_emulation.c | 67 +++++++++++++++++++++++++++++++++++ >>>   drivers/base/numa_emulation.h | 21 +++++++++++ >> >> Why not just properly describe the numa topology in your bootloader or >> device tree and not need any such "fake" stuff at all? >> >> Also, you are now asking me to maintain these new files, not something >> I'm comfortable doing at all sorry. > > Mostly because ae3c107cd8be ("numa: Move numa implementation to common > code") and existing common code in drivers/base/arch_numa.c it appeared > it could be acceptable to add the simple NUMA emulation into the common > code too. Then building upon the same concept as on x86 where no need > for firmware changes is needed for experimenting with different > configurations. > > Would folding into arch_numa.c so no new files are added address your > concern, or your main issue is the emulation in general? Re-iterating and slightly re-formulating this question I see three options: a) Fold the new simple generic code into the existing arch_numa.c, addressing the "no new files" objection, if that was the main objection. b) Move completely into arch code - aka you don't want to see it under drivers/base at all, ever, regardless of how simple the new code is, or that common NUMA code is already there. c) Strong nack for either a) or b) - so "do it in the firmware" comment. Trying to understand your position so we can progress this. Thanks, Tvrtko > > >> +    if (str_has_prefix(opt, "fake=")) > >> +        return numa_emu_cmdline(opt + 5); > > > > You did not document this at all :( > > That was indeed an oversight. Just need to "copy with edits" some stuff > from Documentation/arch/x86/x86_64/boot-options.rst. > > Regards, > > Tvrtko