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 F0255C25B75 for ; Tue, 21 May 2024 07:33:20 +0000 (UTC) Received: by kanga.kvack.org (Postfix) id 7E4096B0085; Tue, 21 May 2024 03:33:20 -0400 (EDT) Received: by kanga.kvack.org (Postfix, from userid 40) id 7942A6B0088; Tue, 21 May 2024 03:33:20 -0400 (EDT) X-Delivered-To: int-list-linux-mm@kvack.org Received: by kanga.kvack.org (Postfix, from userid 63042) id 682A86B0089; Tue, 21 May 2024 03:33:20 -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 4A2D06B0085 for ; Tue, 21 May 2024 03:33:20 -0400 (EDT) Received: from smtpin14.hostedemail.com (a10.router.float.18 [10.200.18.1]) by unirelay09.hostedemail.com (Postfix) with ESMTP id E21D081126 for ; Tue, 21 May 2024 07:33:19 +0000 (UTC) X-FDA: 82141587318.14.70B8313 Received: from dfw.source.kernel.org (dfw.source.kernel.org [139.178.84.217]) by imf22.hostedemail.com (Postfix) with ESMTP id 311E7C0018 for ; Tue, 21 May 2024 07:33:18 +0000 (UTC) Authentication-Results: imf22.hostedemail.com; dkim=pass header.d=kernel.org header.s=k20201202 header.b=Degd8G0m; spf=pass (imf22.hostedemail.com: domain of rppt@kernel.org designates 139.178.84.217 as permitted sender) smtp.mailfrom=rppt@kernel.org; dmarc=pass (policy=none) header.from=kernel.org ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=hostedemail.com; s=arc-20220608; t=1716276798; 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:content-transfer-encoding: in-reply-to:in-reply-to:references:references:dkim-signature; bh=rkkglIoLlVjqgE74nkBfdjpSlo2UedCsRCU85B0w5C4=; b=D7h15b7+nve1EMKZ2iev7sDH4+NWb1om3b3yUmWV4Nf3i7uD9hxa8Y086gJ7TMgCyPQcet hCKhtvAouQIJ1L/64OkgtCbsuLhN8tnE9mOyHX0MmSxPxJqwKwXZuF87AnGghrRMb+YUlk wSafDpJIiQCEPlqEwIc0Xh+umrQWFAw= ARC-Authentication-Results: i=1; imf22.hostedemail.com; dkim=pass header.d=kernel.org header.s=k20201202 header.b=Degd8G0m; spf=pass (imf22.hostedemail.com: domain of rppt@kernel.org designates 139.178.84.217 as permitted sender) smtp.mailfrom=rppt@kernel.org; dmarc=pass (policy=none) header.from=kernel.org ARC-Seal: i=1; s=arc-20220608; d=hostedemail.com; t=1716276798; a=rsa-sha256; cv=none; b=OPUYe5a2TctP9Xr4eD6VUtbM0nhqcXrDi6avfLGRtV1Hxgbw4ZY+WUleLnMA1ZN3adZ6sT YiV24zorIVuis5muTs3ZRyJDd9txhLppp41tzZG0H3aNgRxJiM7ErRf3tWDmclrNJGCDQr ojAbV3ERD/ep4Wqga1Vy5AMxa2JCnnM= Received: from smtp.kernel.org (transwarp.subspace.kernel.org [100.75.92.58]) by dfw.source.kernel.org (Postfix) with ESMTP id 56F3F6202F; Tue, 21 May 2024 07:33:17 +0000 (UTC) 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> MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Disposition: inline Content-Transfer-Encoding: 8bit In-Reply-To: <20240521025329epcms1p6ce11064c0f0608a0156d82fda7ef285c@epcms1p6> X-Stat-Signature: 5mog4agcsi7z49rd8d8accpx8ckjsu3n X-Rspamd-Queue-Id: 311E7C0018 X-Rspam-User: X-Rspamd-Server: rspam10 X-HE-Tag: 1716276798-895335 X-HE-Meta: U2FsdGVkX18tjBgov6f9oCKeanwyfrJmFX0PAfKwCOXppCocd/TIIBZPac4Ehp6K6Hi7Num4nfQ8yolpZ1ySFMKGeoozZxyk3DHLl6EO4VQAIjYv5cg3qmn+jGckftQyNhQRAYTsI51ydwnhf+RA6/M3Kq8BDxDnFy4pY2yPgS6YMQizrCkbRld0MSRnCW2sxbttm8lt1JScyziuGrmTH9LwX3SKIuHppTEhCbHW5S0Cc+jb9ILA3ZeT+/hmEM+VAMlKNO+gjMOo2VG/FlkQ+STY4G314lyflAv2L+TAfFgzw/6JeO4GQicP2kKDJYeGE7jDuc2KrrDATD2jTyqAxbuUWLyR6eu9/3bi/e9Py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ter, 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, 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.