Received: by 2002:ab2:6816:0:b0:1f9:5764:f03e with SMTP id t22csp2984087lqo; Tue, 21 May 2024 03:25:10 -0700 (PDT) X-Forwarded-Encrypted: i=3; AJvYcCXE8dltscBjLtmdJ/RLvRK81Pop7LawNG8funo9Xcm/QfgToPyClXIYUrxgOyvRrzNtplw7GzfCSXGfq5mNb4ZVc2enJfvREwG5h4Ja7w== X-Google-Smtp-Source: AGHT+IE32/92hpvQH1l/m3zMfCTDymonhwgRlNNpwDcBGNStk5Dbn3K8wsFrMuuoG01USWW9UB0u X-Received: by 2002:a0c:f209:0:b0:6aa:68f7:b828 with SMTP id 6a1803df08f44-6aa6906fbfcmr53826226d6.10.1716287109788; Tue, 21 May 2024 03:25:09 -0700 (PDT) ARC-Seal: i=2; a=rsa-sha256; t=1716287109; cv=pass; d=google.com; s=arc-20160816; b=Zr52hps23PPPDgPHhbXbXpywEph9rE1wfij7ktVWbjg4GBC9mOR0LuFKrGkSuqkj6Z W6unNWaWZS2UHwCO5iRzyXHczSJ7sDq58Ou0muRfW+aWr80LZHtHwOWJzT64xvpvsVqg omc86Duuwz+aMiSI8aGniWrnywLAy0obuSOB0lt0ptdJFEicvaeObk+VHs0a0YabgL4m jb2Z/fhvdwXuMNnbE/Cypl2bVmVKMN8M8ps4pCz0bTmRYiLeZKfjtWq69beCAn0YHtG3 hmggC2i0Jrg6ov8leBbEZFweSE2f7/HgeIbCG30JDpUbymdWfSlBahVmVokHswV0X3rO 5trw== ARC-Message-Signature: i=2; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=references:dlp-filter:cms-type:content-transfer-encoding:date :message-id:in-reply-to:cc:to:from:sender:reply-to:subject :mime-version:list-unsubscribe:list-subscribe:list-id:precedence :dkim-signature:dkim-filter; bh=xNtfwsLj+AXhnT99jVhXBY0LB5g4T+lW3lcoU9wKeIQ=; fh=LRsCXwvZkjwowoPIiHFoLcmInPxf0pwoYgLTb5UlUns=; b=EPUDLPUHtdMiVIkVGxq3veBXYQQGRjdchzUd5zw61rAvj64OtCUJmfzOtTra5rHT+Z i/MP0cdJvNPLWNyZH21eishxyGyQ4JL4A8m5GJaVbySoy/9uRrBlT5C7K/g1Udab8tgF xj+fkiO124qGaSRSjSu8Es7gItPalBOfZgyrxZcLzglNQT3kWogdNgkFCzq5HZNtHMt4 IjUplVU9MDl0OghESHGYbKMrrTdnkGkXLthDlaWJaWUZYEYmNlxTI2RzohsB0YrPhZzY b+6vKNRR5yM6UJyFDmvxuOV8NKa2XhfH+iQ6lxrnW6uaWCtbgme1v7O69OTve++iCQD1 jb6g==; dara=google.com ARC-Authentication-Results: i=2; mx.google.com; dkim=pass header.i=@samsung.com header.s=mail20170921 header.b=gJP93wTF; arc=pass (i=1 spf=pass spfdomain=samsung.com dkim=pass dkdomain=samsung.com dmarc=pass fromdomain=samsung.com); spf=pass (google.com: domain of linux-kernel+bounces-184797-linux.lists.archive=gmail.com@vger.kernel.org designates 2604:1380:45d1:ec00::1 as permitted sender) smtp.mailfrom="linux-kernel+bounces-184797-linux.lists.archive=gmail.com@vger.kernel.org"; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=samsung.com Return-Path: Received: from ny.mirrors.kernel.org (ny.mirrors.kernel.org. [2604:1380:45d1:ec00::1]) by mx.google.com with ESMTPS id 6a1803df08f44-6a15f2b6447si55067456d6.391.2024.05.21.03.25.09 for (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Tue, 21 May 2024 03:25:09 -0700 (PDT) Received-SPF: pass (google.com: domain of linux-kernel+bounces-184797-linux.lists.archive=gmail.com@vger.kernel.org designates 2604:1380:45d1:ec00::1 as permitted sender) client-ip=2604:1380:45d1:ec00::1; Authentication-Results: mx.google.com; dkim=pass header.i=@samsung.com header.s=mail20170921 header.b=gJP93wTF; arc=pass (i=1 spf=pass spfdomain=samsung.com dkim=pass dkdomain=samsung.com dmarc=pass fromdomain=samsung.com); spf=pass (google.com: domain of linux-kernel+bounces-184797-linux.lists.archive=gmail.com@vger.kernel.org designates 2604:1380:45d1:ec00::1 as permitted sender) smtp.mailfrom="linux-kernel+bounces-184797-linux.lists.archive=gmail.com@vger.kernel.org"; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=samsung.com 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 ny.mirrors.kernel.org (Postfix) with ESMTPS id 72CA51C219D7 for ; Tue, 21 May 2024 10:25:09 +0000 (UTC) Received: from localhost.localdomain (localhost.localdomain [127.0.0.1]) by smtp.subspace.kernel.org (Postfix) with ESMTP id 3EDAC78C82; Tue, 21 May 2024 10:18:04 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; dkim=pass (1024-bit key) header.d=samsung.com header.i=@samsung.com header.b="gJP93wTF" Received: from mailout1.samsung.com (mailout1.samsung.com [203.254.224.24]) (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 2F2C76CDD8 for ; Tue, 21 May 2024 10:17:58 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.client-ip=203.254.224.24 ARC-Seal:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1716286682; cv=none; b=Dt6Lm/MA11JC8mObbhGvVZmnBaEBWXTIcPMcvzlALRf9KqCYEMzjuKYZ030Ac02Iu83J/n8jWkGXOkFR71ACCDRqUgs/kedWJlcoRWgfVEp5uZS6JFoAM+Uj+ZzQY4c1GYNMG277ZuTrjW+Rwz3BDfBYwL3abahX1hPJgnhnE4U= ARC-Message-Signature:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1716286682; c=relaxed/simple; bh=xNtfwsLj+AXhnT99jVhXBY0LB5g4T+lW3lcoU9wKeIQ=; h=Mime-Version:Subject:From:To:CC:In-Reply-To:Message-ID:Date: Content-Type:References; b=fERx/XpbIboLGUENWRhVXON66v/LNSDeC4wUX6QNUdbqyEtZna/+e029xuq3IKT4bxEqQWRoyLZzWF8ERMlfQ6lWxWKi+ziMKY/ziMOcuSXePO8QHaF/H8o0jc85LbrlJvbGGVuuYvlPVaY8ZhU7/2k320rUQ7SRTPqsXpB1T2U= ARC-Authentication-Results:i=1; smtp.subspace.kernel.org; dmarc=pass (p=none dis=none) header.from=samsung.com; spf=pass smtp.mailfrom=samsung.com; dkim=pass (1024-bit key) header.d=samsung.com header.i=@samsung.com header.b=gJP93wTF; arc=none smtp.client-ip=203.254.224.24 Authentication-Results: smtp.subspace.kernel.org; dmarc=pass (p=none dis=none) header.from=samsung.com Authentication-Results: smtp.subspace.kernel.org; spf=pass smtp.mailfrom=samsung.com Received: from epcas1p4.samsung.com (unknown [182.195.41.48]) by mailout1.samsung.com (KnoxPortal) with ESMTP id 20240521101755epoutp01fdad356112021897e4afbad2580adb46~ReaNZxu680206902069epoutp01T for ; Tue, 21 May 2024 10:17:55 +0000 (GMT) DKIM-Filter: OpenDKIM Filter v2.11.0 mailout1.samsung.com 20240521101755epoutp01fdad356112021897e4afbad2580adb46~ReaNZxu680206902069epoutp01T DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=samsung.com; s=mail20170921; t=1716286675; bh=xNtfwsLj+AXhnT99jVhXBY0LB5g4T+lW3lcoU9wKeIQ=; h=Subject:Reply-To:From:To:CC:In-Reply-To:Date:References:From; b=gJP93wTFQKdJyt38z2Vk87Yi3LnQrQcgoWMnByvx/qrgY8o61OaH7dThz7D7rPV89 XKsL5+hNFYPeS5REZxA1C1ZcqCZrUiMTZSX/jUH+VoG5YIejwsZuB3J/EOdtzz/Rmo L14D+0wL9A+n9hDqrQA1/Wdn98yH9tXhZIYRVa1I= Received: from epsnrtp2.localdomain (unknown [182.195.42.163]) by epcas1p4.samsung.com (KnoxPortal) with ESMTP id 20240521101754epcas1p4faba0848f97da16868486c58b9039450~ReaMVjLtI0862408624epcas1p4q; Tue, 21 May 2024 10:17:54 +0000 (GMT) Received: from epsmges1p1.samsung.com (unknown [182.195.36.223]) by epsnrtp2.localdomain (Postfix) with ESMTP id 4Vk9Ny04Pzz4x9Py; Tue, 21 May 2024 10:17:54 +0000 (GMT) X-AuditID: b6c32a35-053ff700000025be-ab-664c74d14045 Received: from epcas1p2.samsung.com ( [182.195.41.46]) by epsmges1p1.samsung.com (Symantec Messaging Gateway) with SMTP id FA.1F.09662.1D47C466; Tue, 21 May 2024 19:17:53 +0900 (KST) Precedence: bulk X-Mailing-List: linux-kernel@vger.kernel.org List-Id: List-Subscribe: List-Unsubscribe: Mime-Version: 1.0 Subject: RE:(2) [RESEND PATCH 00/10] memblock: introduce memsize showing reserved memory Reply-To: jaewon31.kim@samsung.com Sender: Jaewon Kim From: Jaewon Kim To: Mike Rapoport , 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" X-Priority: 3 X-Content-Kind-Code: NORMAL In-Reply-To: X-Drm-Type: N,general X-Msg-Generator: Mail X-Msg-Type: PERSONAL X-Reply-Demand: N Message-ID: <20240521101753epcms1p50443f6b88adea211dd9bbb417dd57cb1@epcms1p5> Date: Tue, 21 May 2024 19:17:53 +0900 X-CMS-MailID: 20240521101753epcms1p50443f6b88adea211dd9bbb417dd57cb1 Content-Transfer-Encoding: quoted-printable Content-Type: text/plain; charset="utf-8" CMS-TYPE: 101P X-CPGSPASS: Y X-CPGSPASS: Y X-Brightmail-Tracker: H4sIAAAAAAAAA+NgFprDJsWRmVeSWpSXmKPExsWy7bCmnu7FEp80g5u9xhZz1q9hs3h5SNOi e/NMRove96+YLC7vmsNmcW/Nf1aLI+u3M1m8n1xsMbuxj9GB02PnrLvsHgs2lXpsWtXJ5rHp 0yR2jxMzfrN49G1ZxehxZsERdo/Pm+QCOKKybTJSE1NSixRS85LzUzLz0m2VvIPjne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== DLP-Filter: Pass X-CFilter-Loop: Reflected X-CMS-RootMailID: 20240521024009epcas1p10ed9f9b929203183a29f79508e79bb76 References: <20240521023957.2587005-1-jaewon31.kim@samsung.com> <20240521025329epcms1p6ce11064c0f0608a0156d82fda7ef285c@epcms1p6> >On Tue, May 21, 2024 at 11:53:29AM +0900, Jaewon Kim wrote: >> >--------- Original Message --------- >> >Sender : =EA=B9=80=EC=9E=AC=EC=9B=90=20Syst= em=20Performance=20Lab.(MX)/=EC=82=BC=EC=84=B1=EC=A0=84=EC=9E=90=0D=0A>>=20= >Date=20=20=20:=202024-05-21=2011:40=20(GMT+9)=0D=0A>>=20>Title=20=20:=20= =5BRESEND=20PATCH=2000/10=5D=20memblock:=20introduce=20memsize=20showing=20= reserved=20memory=0D=0A>>=20>?=0D=0A>>=20>Some=20of=20memory=20regions=20ca= n=20be=20reserved=20for=20a=20specific=20purpose.=20They=20are=0D=0A>>=20>u= sually=20defined=20through=20reserved-memory=20in=20device=20tree.=20If=20o= nly=20size=0D=0A>>=20>without=20address=20is=20specified=20in=20device=20tr= ee,=20the=20address=20of=20the=20region=0D=0A>>=20>will=20be=20determined= =20at=20boot=20time.=0D=0A>>=20>=0D=0A>>=20>We=20may=20find=20the=20address= =20of=20the=20memory=20regions=20through=20booting=20log,=20but=0D=0A>>=20>= it=20does=20not=20show=20all.=20And=20it=20could=20be=20hard=20to=20catch= =20the=20very=20beginning=0D=0A>>=20>log.=20The=20memblock_dump_all=20shows= =20all=20memblock=20status=20but=20it=20does=20not=0D=0A>>=20>show=20region= =20name=20and=20its=20information=20is=20difficult=20to=20summarize.=0D=0A>= >=20>=0D=0A>>=20>This=20patch=20introduce=20a=20debugfs=20node,=20memblock/= memsize,=20to=20see=20reserved=0D=0A>>=20>memory=20easily.=0D=0A>>=20>=0D= =0A>>=20>Here's=20an=20example=0D=0A>>=20>=0D=0A>>=20>=24=20cat=20debugfs/m= emblock/memsize=0D=0A>>=20>=0D=0A>>=20>0x0000000000000000-0x000000000000000= 0=200x02000000=20(?=20=2032768=20KB=20)?=20=20map=20reusable=20linux,cma=0D= =0A>>=20>0x0000000000000000-0x0000000000000000=200x01000000=20(?=20=2016384= =20KB=20)?=20=20map=20reusable=20vxxxxx=0D=0A>>=20>...=0D=0A>>=20>0x0000000= 000000000-0x0000000000000000=200x004e0000=20(?=20?=204992=20KB=20)=20nomap= =20unusable=20unknown=0D=0A>>=20>0x0000000000000000-0x0000000000000000=200x= 00400000=20(?=20?=204096=20KB=20)=20nomap=20unusable=20cxxxxx=0D=0A>>=20>0x= 0000000000000000-0x0000000000000000=200x00e00000=20(?=20=2014336=20KB=20)= =20nomap=20unusable=20gxxxxx=0D=0A>>=20>=0D=0A>>=20>Reserved?=20?=20:=20122= 3856=20KB=0D=0A>>=20>=20.kernel?=20?=20:?=20275208=20KB=0D=0A>>=20>?=20.tex= t?=20?=20=20:?=20=2016576=20KB=0D=0A>>=20>?=20.rwdata?=20=20:?=20?=201963= =20KB=0D=0A>>=20>?=20.rodata?=20=20:?=20=2011920=20KB=0D=0A>>=20>?=20.bss?= =20?=20?=20:?=20?=202450=20KB=0D=0A>>=20>?=20.memmap?=20=20:?=20186368=20KB= =0D=0A>>=20>?=20.etc?=20?=20?=20:?=20=2055933=20KB=0D=0A>>=20>=20.unusable?= =20:?=20948648=20KB=0D=0A>>=20>System?=20?=20?=20:=2011359056=20KB=0D=0A>>= =20>=20.common?=20?=20:=2010306384=20KB=0D=0A>>=20>=20.reusable?=20:=201052= 672=20KB=0D=0A>>=20>Total?=20?=20?=20=20:=2012582912=20KB=20(=2012288.00=20= MB=20)=0D=0A>>=20>=0D=0A>>=20>Jaewon=20Kim=20(10):=0D=0A>>=20>?=20memblock:= =20introduce=20memsize=20showing=20reserved=20memory=0D=0A>>=20>?=20membloc= k:=20detect=20hidden=20memory=20hole=20size=0D=0A>>=20>?=20memblock:=20hand= le=20overlapped=20reserved=20memory=20region=0D=0A>>=20>?=20memblock:=20tak= e=20a=20region=20intersecting=20an=20unknown=20region=0D=0A>>=20>?=20memblo= ck:=20track=20memblock=20changed=20at=20early=20param=0D=0A>>=20>?=20memblo= ck:=20recognize=20late=20freed=20size=20by=20checking=20PageReserved=0D=0A>= >=20>?=20memblock:=20track=20kernel=20size=20on=20memsize=0D=0A>>=20>?=20me= mblock:=20print=20memsize=20summary=20information=0D=0A>>=20>?=20memblock:= =20print=20kernel=20internal=20size=0D=0A>>=20>?=20memblock:=20support=20me= msize=20reusable=20to=20consider=20as=20reusable=0D=0A>>=20>=0D=0A>>=20>=20= drivers/of/fdt.c?=20?=20?=20?=20?=20?=20=20=7C?=2011=20+=0D=0A>>=20>=20driv= ers/of/of_reserved_mem.c=20=7C?=2012=20+-=0D=0A>>=20>=20include/linux/membl= ock.h?=20?=20=20=7C?=2029=20++=0D=0A>>=20>=20init/main.c?=20?=20?=20?=20?= =20?=20?=20?=20?=20=7C?=2013=20+-=0D=0A>>=20>=20kernel/dma/contiguous.c?=20= ?=20?=20=7C?=20=209=20+-=0D=0A>>=20>=20mm/Kconfig?=20?=20?=20?=20?=20?=20?= =20?=20?=20=20=7C?=2016=20++=0D=0A>>=20>=20mm/memblock.c?=20?=20?=20?=20?= =20?=20?=20?=20=7C=20502=20++++++++++++++++++++++++++++++++++-=0D=0A>>=20>= =20mm/mm_init.c?=20?=20?=20?=20?=20?=20?=20?=20=20=7C?=20=206=20+-=0D=0A>>= =20>=20mm/page_alloc.c?=20?=20?=20?=20?=20?=20?=20=7C?=2010=20+-=0D=0A>>=20= >=209=20files=20changed,=20597=20insertions(+),=2011=20deletions(-)=0D=0A>>= =20>=0D=0A>>=20>--=20=0D=0A>>=20>2.25.1=0D=0A>>=20=0D=0A>>=20Hello=20Mike= =20=0D=0A>>=20=0D=0A>>=20This=20is=20actually=20RESEND=20as=20it=20was=20in= troduced=202=20years=20ago.=0D=0A>>=20Please=20refer=20to=20https://lore.ke= rnel.org/linux-mm/YkQB6Ah603yPR3qf=40kernel.org/=23t=0D=0A>>=20=0D=0A>>=20>= =20But=20you=20never=20provided=20details=20about=20*why*=20you=20want=20th= is=20information=20exposed.=0D=0A>>=20=0D=0A>>=20For=20your=20question,=20I= 'd=20like=20to=20say=20;=0D=0A>>=20We=20can=20see=20the=20same=20format=20a= nd=20exact=20information=20between=20different=20version=20of=20kernel=20st= atus.=0D=0A>>=20=0D=0A>>=201)=20Internally=20we=20can=20check=20if=20the=20= reserved=20memory=20changes.=0D=0A>>=202)=20Externally=20we=20can=20communi= cate=20between=20chipset=20vendors=20and=20OEM,=20with=20a=20same=20format.= =0D=0A>=0D=0A>Why=20the=20existing=20debugfs=20interface=20is=20not=20suffi= cient?=0D=0A=0D=0Adebugfs/memblock/memory=20&=20debugfs/memblock/reserved= =20have=20changed=20its=20format=20but=20still=20does=20not=20show=20name,= =20reusable,=20kernel=20size.=0D=0AIf=20memory=20is=20reserved=20from=20mem= block,=20and=20did=20not=20freed=20back=20to=20memblock.=20Memblock=20does= =20not=20know=20even=20after=20the=20memory=20is=20freed=20to=20system.=0D= =0AI=20think=20a=20simple=20debug=20interface=20is=20needed=20to=20easily= =20communicate=20with=20others=20or=20compare=20different=20SW=20releases.= =0D=0A=0D=0A>=20=0D=0A>>=20This=20helps=20us=20to=20communitcate=20well,=20= to=20easily=20detect=20changes=20or=20just=20to=20see=20differences.=0D=0A>= >=20=0D=0A>>=20Jaewon=20Kim=0D=0A>>=20=0D=0A>=0D=0A>--=20=0D=0A>Sincerely= =20yours,=0D=0A>Mike.=0D=0A=0D=0A