Received: by 2002:ab2:6816:0:b0:1f9:5764:f03e with SMTP id t22csp2914008lqo; Tue, 21 May 2024 00:33:36 -0700 (PDT) X-Forwarded-Encrypted: i=3; AJvYcCXUPNBkh2NH8mCqdk+mJqrjzsivnfCFYInBQA/axQK2QByxHrBGc8lMagFhiR3HMsuzkjATjYWvEDy2eMYdn3lJi9RoWKExapjuY0rkzw== X-Google-Smtp-Source: AGHT+IHd1Mcoz2zaU5/v9KCvMiB8EhvTJlQjxzkX8XqfncCzuY+3IulX+IQCM08KpQisV7eTezW7 X-Received: by 2002:a05:6a20:12c5:b0:1a9:c4cc:721d with SMTP id adf61e73a8af0-1afde1df4ecmr32865114637.57.1716276815765; Tue, 21 May 2024 00:33:35 -0700 (PDT) ARC-Seal: i=2; a=rsa-sha256; t=1716276815; cv=pass; d=google.com; s=arc-20160816; b=dDCa5In4dn2J1tQxk42eY9aSURyDS1nvKTtDw6qMOUt+lpjxfZ4/19h4fK8KjZKQ0P +S1JKaSAYIGEdKHLmfNR1fozydFboDKLyySedbqou0CIq1CdT1ne8R3XTbzDxLtuPx88 ehXgsnvTkRsjCdINvul5MF8l1mpRMmk2tHVge2SSCp6GCEn+OL8BwdgHLi8ZGH770lfC YqHRitMrY10JyV+XnegGrnPlYvFGHy0Hfvge/cZSckrChp1cSqaBUr3yEMEN9lQs2QUz YoJ6axL+MBjhu10a0Wofm88dzzFiZ/Aj5cEvYbFQlOQghuWt1DGVnBvFoR0nhW4BqFD4 14JA== ARC-Message-Signature: i=2; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=in-reply-to:content-transfer-encoding:content-disposition :mime-version:list-unsubscribe:list-subscribe:list-id:precedence :references:message-id:subject:cc:to:from:date:dkim-signature; bh=rkkglIoLlVjqgE74nkBfdjpSlo2UedCsRCU85B0w5C4=; fh=K8vDgkwDv8ABhiLHxxSrmucFIrWGVCFw35QDgs+ByHA=; b=uuVxakXVcQCHnusZkBuZx8nqjDn8M3IejRBQ3KlIQhHiOMsNx6W9EVMnAWy9m632sI RFJAW0/6lTVAgYx3ghn5qXQcVcUvoyrsEJaQ/7jzE63/5f0dPrO0COnNRQTRXjeWQ1/q 3xrqLpJtZ4/Qq+3lO93CZCrDBM191rAlhWYN1Fr8zB78g938MgggcdqrqnqxUlUFIUd7 OPHqdUorBJl49/77M9Ko/PtF/EFcTscCJTDqTlxiGyxqM3Z3CGC5Kn7KweM64L2+mk2E H71QhtNhQNTyeU5m9HN+ggKWq+fe4eJe+ArsnsICBa/3SML1ZndtdBAlvxHy4lz7b/5J /aAQ==; dara=google.com ARC-Authentication-Results: i=2; mx.google.com; dkim=pass header.i=@kernel.org header.s=k20201202 header.b=Degd8G0m; arc=pass (i=1 dkim=pass dkdomain=kernel.org); spf=pass (google.com: domain of linux-kernel+bounces-184571-linux.lists.archive=gmail.com@vger.kernel.org designates 139.178.88.99 as permitted sender) smtp.mailfrom="linux-kernel+bounces-184571-linux.lists.archive=gmail.com@vger.kernel.org"; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=kernel.org Return-Path: Received: from sv.mirrors.kernel.org (sv.mirrors.kernel.org. [139.178.88.99]) by mx.google.com with ESMTPS id d9443c01a7336-1f3062833c2si16943935ad.486.2024.05.21.00.33.35 for (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Tue, 21 May 2024 00:33:35 -0700 (PDT) Received-SPF: pass (google.com: domain of linux-kernel+bounces-184571-linux.lists.archive=gmail.com@vger.kernel.org designates 139.178.88.99 as permitted sender) client-ip=139.178.88.99; Authentication-Results: mx.google.com; dkim=pass header.i=@kernel.org header.s=k20201202 header.b=Degd8G0m; arc=pass (i=1 dkim=pass dkdomain=kernel.org); spf=pass (google.com: domain of linux-kernel+bounces-184571-linux.lists.archive=gmail.com@vger.kernel.org designates 139.178.88.99 as permitted sender) smtp.mailfrom="linux-kernel+bounces-184571-linux.lists.archive=gmail.com@vger.kernel.org"; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=kernel.org Received: from smtp.subspace.kernel.org (wormhole.subspace.kernel.org [52.25.139.140]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by sv.mirrors.kernel.org (Postfix) with ESMTPS id 67D55281E59 for ; Tue, 21 May 2024 07:33:35 +0000 (UTC) Received: from localhost.localdomain (localhost.localdomain [127.0.0.1]) by smtp.subspace.kernel.org (Postfix) with ESMTP id 5387D54279; Tue, 21 May 2024 07:33:18 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; dkim=pass (2048-bit key) header.d=kernel.org header.i=@kernel.org header.b="Degd8G0m" Received: from smtp.kernel.org (aws-us-west-2-korg-mail-1.web.codeaurora.org [10.30.226.201]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by smtp.subspace.kernel.org (Postfix) with ESMTPS id 7EFD553E0A for ; Tue, 21 May 2024 07:33:17 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.client-ip=10.30.226.201 ARC-Seal:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1716276797; cv=none; b=hKMlx0FTGQLoqIWWDHwAKZ4X/yjdl377gdbsoRWgMPJcXqXQm+SD2BMliQLv1UjSz6ULSQuzDl2wu6P+cz2OswcujaDd6rrii6VQqESW0ek14f0Zgvsf5BuOQr2LAO81kRQgiA4zYaPJ8l0ZsslY51C/IAx0FHkmOqqHd99hYIA= ARC-Message-Signature:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1716276797; c=relaxed/simple; bh=DvwhrxxsccQSrw9QTfMS9cC8aa8Ng49TDT7sFzlr740=; h=Date:From:To:Cc:Subject:Message-ID:References:MIME-Version: Content-Type:Content-Disposition:In-Reply-To; b=n+SgCjDUzo40xwyRQJPgfC6l/0ehA7nj4A77JS5Yu/g1iIgODWdJj/WXjS9lYOgB2QyL0JaFaBg95Fr0CjFbM3UUD0keIYDf9uejfV+BtgqUyqDuIlkGciU7fPOjvEqCmq2XwD6vkOnEk5h10rmV+81HmPd2aXZ6f/XRcmIrnLs= ARC-Authentication-Results:i=1; smtp.subspace.kernel.org; dkim=pass (2048-bit key) header.d=kernel.org header.i=@kernel.org header.b=Degd8G0m; arc=none smtp.client-ip=10.30.226.201 Received: by smtp.kernel.org (Postfix) with ESMTPSA id 996B0C4AF07; Tue, 21 May 2024 07:33:14 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=kernel.org; s=k20201202; t=1716276797; bh=DvwhrxxsccQSrw9QTfMS9cC8aa8Ng49TDT7sFzlr740=; h=Date:From:To:Cc:Subject:References:In-Reply-To:From; b=Degd8G0mcC24obZPCioMA8GZLLkhmrbvq97vKhDminCEXOieMRtSfj16TjW1afYlu JeTfVFrYSgrfjhFw220IL/rvqfUbvGQts5I0aO6/hFOJ+vNhKT4aR4t9e6SvweYZms oZFmWsxKcB0LWLo2Zs9SdI1fAsBf6gAzSfE4hr2mDhNJVzHbzs1EL1p5oicA1hdfGg BCLD+XzW7sUumjHEQ6STLt4n7XXY6mChMkapkkGETW40yvV9WEUj8+z9cvHCYSrXSz iLRvo/R3UleCpZ14PLwqlumuhWfKzqpebWuQGZO+IIy+9rvbSRS+8Yvy4LDdp8LF1I 1lyDUZaXn42iw== Date: Tue, 21 May 2024 10:31:31 +0300 From: Mike Rapoport To: Jaewon Kim Cc: "vbabka@suse.cz" , "akpm@linux-foundation.org" , "linux-mm@kvack.org" , "linux-kernel@vger.kernel.org" , "jaewon31.kim@gmail.com" , "tkjos@google.com" Subject: Re: [RESEND PATCH 00/10] memblock: introduce memsize showing reserved memory Message-ID: References: <20240521023957.2587005-1-jaewon31.kim@samsung.com> <20240521025329epcms1p6ce11064c0f0608a0156d82fda7ef285c@epcms1p6> Precedence: bulk X-Mailing-List: linux-kernel@vger.kernel.org List-Id: List-Subscribe: List-Unsubscribe: MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Disposition: inline Content-Transfer-Encoding: 8bit In-Reply-To: <20240521025329epcms1p6ce11064c0f0608a0156d82fda7ef285c@epcms1p6> On Tue, May 21, 2024 at 11:53:29AM +0900, Jaewon Kim wrote: > >--------- Original Message --------- > >Sender : 김재원 System Performance Lab.(MX)/삼성전자 > >Date : 2024-05-21 11:40 (GMT+9) > >Title : [RESEND PATCH 00/10] memblock: introduce memsize showing reserved memory > >? > >Some of memory regions can be reserved for a specific purpose. They are > >usually defined through reserved-memory in device tree. If only size > >without address is specified in device tree, the address of the region > >will be determined at boot time. > > > >We may find the address of the memory regions through booting log, but > >it does not show all. And it could be hard to catch the very beginning > >log. The memblock_dump_all shows all memblock status but it does not > >show region name and its information is difficult to summarize. > > > >This patch introduce a debugfs node, memblock/memsize, to see reserved > >memory easily. > > > >Here's an example > > > >$ cat debugfs/memblock/memsize > > > >0x0000000000000000-0x0000000000000000 0x02000000 (? 32768 KB )? map reusable linux,cma > >0x0000000000000000-0x0000000000000000 0x01000000 (? 16384 KB )? map reusable vxxxxx > >... > >0x0000000000000000-0x0000000000000000 0x004e0000 (? ? 4992 KB ) nomap unusable unknown > >0x0000000000000000-0x0000000000000000 0x00400000 (? ? 4096 KB ) nomap unusable cxxxxx > >0x0000000000000000-0x0000000000000000 0x00e00000 (? 14336 KB ) nomap unusable gxxxxx > > > >Reserved? ? : 1223856 KB > > .kernel? ? :? 275208 KB > >? .text? ? :? 16576 KB > >? .rwdata? :? ? 1963 KB > >? .rodata? :? 11920 KB > >? .bss? ? ? :? ? 2450 KB > >? .memmap? :? 186368 KB > >? .etc? ? ? :? 55933 KB > > .unusable? :? 948648 KB > >System? ? ? : 11359056 KB > > .common? ? : 10306384 KB > > .reusable? : 1052672 KB > >Total? ? ? : 12582912 KB ( 12288.00 MB ) > > > >Jaewon Kim (10): > >? memblock: introduce memsize showing reserved memory > >? memblock: detect hidden memory hole size > >? memblock: handle overlapped reserved memory region > >? memblock: take a region intersecting an unknown region > >? memblock: track memblock changed at early param > >? memblock: recognize late freed size by checking PageReserved > >? memblock: track kernel size on memsize > >? memblock: print memsize summary information > >? memblock: print kernel internal size > >? memblock: support memsize reusable to consider as reusable > > > > drivers/of/fdt.c? ? ? ? ? ? |? 11 + > > drivers/of/of_reserved_mem.c |? 12 +- > > include/linux/memblock.h? ? |? 29 ++ > > init/main.c? ? ? ? ? ? ? ? ? |? 13 +- > > kernel/dma/contiguous.c? ? ? |? 9 +- > > mm/Kconfig? ? ? ? ? ? ? ? ? |? 16 ++ > > mm/memblock.c? ? ? ? ? ? ? ? | 502 ++++++++++++++++++++++++++++++++++- > > mm/mm_init.c? ? ? ? ? ? ? ? |? 6 +- > > mm/page_alloc.c? ? ? ? ? ? ? |? 10 +- > > 9 files changed, 597 insertions(+), 11 deletions(-) > > > >-- > >2.25.1 > > Hello Mike > > This is actually RESEND as it was introduced 2 years ago. > Please refer to https://lore.kernel.org/linux-mm/YkQB6Ah603yPR3qf@kernel.org/#t > > > But you never provided details about *why* you want this information exposed. > > For your question, I'd like to say ; > We can see the same format and exact information between different version of kernel status. > > 1) Internally we can check if the reserved memory changes. > 2) Externally we can communicate between chipset vendors and OEM, with a same format. Why the existing debugfs interface is not sufficient? > This helps us to communitcate well, to easily detect changes or just to see differences. > > Jaewon Kim > -- Sincerely yours, Mike.