Received: by 2002:a05:6500:2018:b0:1fb:9675:f89d with SMTP id t24csp297911lqh; Fri, 31 May 2024 01:21:53 -0700 (PDT) X-Forwarded-Encrypted: i=3; AJvYcCX4WJit/q2xYYv4Y0Kix2MXRmpqiDU88LGr+lrY9dNq9lAHfborMLtCXCvWqzVBqB3DBO8TDttjGSTcnoxP5II8rXfmxDBLUItB94skHA== X-Google-Smtp-Source: AGHT+IFA5v5C0EOTwZDTGzHO2iMQ0K8uKHdJKnsnKHtGG/pMfC2bmifTiSjNHgb4B+SiON4yg1mm X-Received: by 2002:a17:906:e089:b0:a65:9c88:b738 with SMTP id a640c23a62f3a-a681f87e67dmr73764466b.12.1717143713707; Fri, 31 May 2024 01:21:53 -0700 (PDT) ARC-Seal: i=2; a=rsa-sha256; t=1717143713; cv=pass; d=google.com; s=arc-20160816; b=pMHK9Zo099C2ZFi7B7qryfOJeGT5cPF+/JEnCOPIlnr3fpIiw7zm0Vu8cHRw3zanb/ P+qJgQJ/IKOlMydCXU92CtuZjWlSqP3JPpDRtJBbs7HayZrvGkO2WSgDdUmvPcnT4LTi Rq4umsLXYyn4wBDKO/IbARdSIcf3sM/0Ml9QBvNjtkZt2CM4hsabQr35ZXyNqkWG0Ls5 Kg1zhJ6OyI/QuY1s44lh139xrezT9SqQCaZaxzA1PMkAgLR4xL3hysYmyHxCkJvsTj/o uzFt0oNsMtA0iciqR5uDD/bajdsHwupPXUZyPnjlyM/UdfwtxRBmpW4CvCr8cWlLtyUl S9gQ== 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=47bo/92egWa4/j2Xm7QdIt7CeR6gaQYr+wJHwvffe08=; fh=mU+LSPHFKZPiXWr4HlGdMW3VL2CtX3vsrd2MTLmQ1so=; b=xEp0k2PAELPW/e1eljrrvO8hxL1DE/CW+CTlwbl+hja1fm7v8bs2yWE6YsIL5f+mK+ 8YJl7kdlo6/Od4nIjJXPgHq0A7JhN7Vz4ac7LqAuvMkbalOT8SbDybXS59SgjXoN/5tJ Ht9rK3aJ9qY+GE7zpeNlKz4gtfOogTi9Qg0pGYhkGiV69F4xNJV+oUx0yQBWC5xJrQSz dyyU6z9Butm8Pznag1f2UjvGlyAB7O6L2LWnNqOYhu93peDrZL7e2k+YaykWiL8Bfprk yqHyjxjf14jFIhm5Ld0tGonEsqyRpAiTGhmvdIbvngzSGXDnADvi3bK+F0pW2wuHigw0 qj0Q==; dara=google.com ARC-Authentication-Results: i=2; mx.google.com; dkim=pass header.i=@samsung.com header.s=mail20170921 header.b=FxKtYmfX; 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-196465-linux.lists.archive=gmail.com@vger.kernel.org designates 147.75.80.249 as permitted sender) smtp.mailfrom="linux-kernel+bounces-196465-linux.lists.archive=gmail.com@vger.kernel.org"; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=samsung.com Return-Path: Received: from am.mirrors.kernel.org (am.mirrors.kernel.org. [147.75.80.249]) by mx.google.com with ESMTPS id a640c23a62f3a-a67ea38e5aasi66872166b.344.2024.05.31.01.21.53 for (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Fri, 31 May 2024 01:21:53 -0700 (PDT) Received-SPF: pass (google.com: domain of linux-kernel+bounces-196465-linux.lists.archive=gmail.com@vger.kernel.org designates 147.75.80.249 as permitted sender) client-ip=147.75.80.249; Authentication-Results: mx.google.com; dkim=pass header.i=@samsung.com header.s=mail20170921 header.b=FxKtYmfX; 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-196465-linux.lists.archive=gmail.com@vger.kernel.org designates 147.75.80.249 as permitted sender) smtp.mailfrom="linux-kernel+bounces-196465-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 am.mirrors.kernel.org (Postfix) with ESMTPS id 468B01F2B92C for ; Fri, 31 May 2024 08:21:53 +0000 (UTC) Received: from localhost.localdomain (localhost.localdomain [127.0.0.1]) by smtp.subspace.kernel.org (Postfix) with ESMTP id 858A878269; Fri, 31 May 2024 08:21:49 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; dkim=pass (1024-bit key) header.d=samsung.com header.i=@samsung.com header.b="FxKtYmfX" Received: from mailout4.samsung.com (mailout4.samsung.com [203.254.224.34]) (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 BBC7B33993 for ; Fri, 31 May 2024 08:21:45 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.client-ip=203.254.224.34 ARC-Seal:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1717143708; cv=none; b=mK9szKIEdZoa84DYKlQ7oMeNSZ9tLNxC0agSTj5Am+BW5IqJ4CGpga2jJJ1qAMk9dxKgkWRQEuFFpE3Xm3bDzJqfDBFboZ2VAAHuRBIn9VgzW6YyS/zPEbrvHJKw/tJWWvG11/FwB1vyE7MIHf+Vw2Zz00z3BSvzcnnCQg96TBc= ARC-Message-Signature:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1717143708; c=relaxed/simple; bh=bpqGeOddtdjhGO6r7EA7mdJzQe8YO1GbgCe5Z+mZDys=; h=Mime-Version:Subject:From:To:CC:In-Reply-To:Message-ID:Date: Content-Type:References; b=kI7+O6nP3RUnlvK5DNHzGmlfKmKkVGf7Qem4dhGrajsO9yInTmO3S+BSHJa/wPsQiU79qRl4QOXR7FlV99oQP7R5LPZWp5SgJ0Egd58AgZ/8XaS0gnfWrWumtxCsUFTlECJZWDdHPPuXcW/vUK/qdUuzYcFjB0hexy2NCRXYqDc= 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=FxKtYmfX; arc=none smtp.client-ip=203.254.224.34 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 epcas1p2.samsung.com (unknown [182.195.41.46]) by mailout4.samsung.com (KnoxPortal) with ESMTP id 20240531082142epoutp043d71865adcab05246ce22ee8b52a28ec~UhRmTC18w0718007180epoutp04j for ; Fri, 31 May 2024 08:21:42 +0000 (GMT) DKIM-Filter: OpenDKIM Filter v2.11.0 mailout4.samsung.com 20240531082142epoutp043d71865adcab05246ce22ee8b52a28ec~UhRmTC18w0718007180epoutp04j DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=samsung.com; s=mail20170921; t=1717143702; bh=47bo/92egWa4/j2Xm7QdIt7CeR6gaQYr+wJHwvffe08=; h=Subject:Reply-To:From:To:CC:In-Reply-To:Date:References:From; b=FxKtYmfXlad6Y0PpIQSLfr0fYYqA43BRFQwa6RAwJ+L2Y4dC8ffXLOFHTipyqNVbG 0ubicqOStici2kttfzjqdABmXWkkhLab/6zNoTh2GvJklLQhX7IDRhDm9WdGZzPRp5 m30QE9DTSQ9TPooJzLBxnWxAhEop8ePTrmDNeBXw= Received: from epsnrtp4.localdomain (unknown [182.195.42.165]) by epcas1p2.samsung.com (KnoxPortal) with ESMTP id 20240531082142epcas1p256cd9b57421a3dc4c6b70d73a975265b~UhRl0XYw-3266032660epcas1p2d; Fri, 31 May 2024 08:21:42 +0000 (GMT) Received: from epsmgec1p1.samsung.com (unknown [182.195.38.243]) by epsnrtp4.localdomain (Postfix) with ESMTP id 4VrGLF69Vdz4x9Q1; Fri, 31 May 2024 08:21:41 +0000 (GMT) X-AuditID: b6c32a36-86dfa70000002677-98-665988951f92 Received: from epcas1p4.samsung.com ( [182.195.41.48]) by epsmgec1p1.samsung.com (Symantec Messaging Gateway) with SMTP id FA.16.09847.59889566; Fri, 31 May 2024 17:21:41 +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) (2) [RESEND PATCH 00/10] memblock: introduce memsize showing reserved memory Reply-To: jaewon31.kim@samsung.com Sender: Jaewon Kim From: Jaewon Kim To: "richard.weiyang@gmail.com" , Jaewon Kim CC: Jaewon Kim , Mike Rapoport , "vbabka@suse.cz" , "akpm@linux-foundation.org" , "linux-mm@kvack.org" , "linux-kernel@vger.kernel.org" , "tkjos@google.com" , Pintu Agarwal X-Priority: 3 X-Content-Kind-Code: NORMAL In-Reply-To: <20240531010551.hs67amz34mljyifw@master> X-Drm-Type: N,general X-Msg-Generator: Mail X-Msg-Type: PERSONAL X-Reply-Demand: N Message-ID: <20240531082141epcms1p49d8d2048e04e90eca45644723614faa8@epcms1p4> Date: Fri, 31 May 2024 17:21:41 +0900 X-CMS-MailID: 20240531082141epcms1p49d8d2048e04e90eca45644723614faa8 Content-Transfer-Encoding: 7bit Content-Type: text/plain; charset="utf-8" CMS-TYPE: 101P X-CPGSPASS: Y X-CPGSPASS: Y X-Brightmail-Tracker: H4sIAAAAAAAAA+NgFlrKJsWRmVeSWpSXmKPExsWy7bCmge7Ujsg0g2/zjSzmrF/DZvHykKZF 9+aZjBa9718xWVzeNYfN4t6a/6wW119OY7G40/eKxeLI+u1MFu8nF1vMbuxjdOD22DnrLrvH gk2lHptWdbJ5bPo0id3jxIzfLB59W1YxepxZcITd4/MmuQ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2HWy5NUmIpzkg01GIuKk4EAL8e/gc4BAAA DLP-Filter: Pass X-CFilter-Loop: Reflected X-CMS-RootMailID: 20240521024009epcas1p10ed9f9b929203183a29f79508e79bb76 References: <20240531010551.hs67amz34mljyifw@master> <20240521023957.2587005-1-jaewon31.kim@samsung.com> <20240521025329epcms1p6ce11064c0f0608a0156d82fda7ef285c@epcms1p6> <20240521101753epcms1p50443f6b88adea211dd9bbb417dd57cb1@epcms1p5> <20240524090715epcms1p274939a1d5954be3423f6ce14a3df6f92@epcms1p2> <20240527013504epcms1p22bec7b83f2a42e76877b97ed0d769009@epcms1p2> <20240529095119epcms1p73f0e9ff756bcb2ee6a14db459128a644@epcms1p7> <20240529113519.jupuazcf754zjxzy@master> <20240530104928epcms1p8108ece61c39c6e3d0361d445c15352d1@epcms1p8> >On Thu, May 30, 2024 at 07:49:28PM +0900, Jaewon Kim wrote: >>>On Wed, May 29, 2024 at 10:10:29PM +0900, Jaewon Kim wrote: >>>>(Sorry I might forget to change to be plain text) >>>> >>>>Oh good thing, I did not know this patch. Thanks. >>>> >>>>By the way, I've tried to get memblock/memory and kernel log from a >>>>device based on >>>>v6.6.17 kernel device, to see upstream patches above. >>>>memblok/memory does not show region for >>> >>>memblock/memory only shows ranges put in "memory". >>>memblock/reserved shows ranges put in "reserved". >>> >>>If we just put them in "reserved", it will not displayed in "memory". >> >>Hi >>Let me explain more. >> >>In this case, the intially passed memory starts from 0000000081960000 so memblock/memory shows as it is. >> >># xxd -g 8 /proc/device-tree/memory/reg >>00000000: 0000000081960000 00000000000a0000 ................ >>00000010: 0000000081a40000 00000000001c0000 ................ >> >># cat sys/kernel/debug/memblock/memory >> 0: 0x0000000081960000..0x00000000819fffff 0 NONE >> 1: 0x0000000081a40000..0x0000000081bfffff 0 NONE >> >># cat sys/kernel/debug/memblock/reserved >> 0: 0x0000000082800000..0x00000000847fffff 0 NONE >> >>The memblock information in the kernel log may report like it allocated those memblock regions, as there was not overlapped even though it is already no-map. >> >>(I removed the name.) >><6>[ 0.000000][ T0] OF: reserved mem: 0x0000000080000000..0x0000000080dfffff (14336 KiB) nomap non-reusable AAA >><6>[ 0.000000][ T0] OF: reserved mem: 0x0000000080e00000..0x00000000811fffff (4096 KiB) nomap non-reusable BBB >><6>[ 0.000000][ T0] OF: reserved mem: 0x0000000081200000..0x00000000813fffff (2048 KiB) nomap non-reusable CCC >><6>[ 0.000000][ T0] OF: reserved mem: 0x0000000081a00000..0x0000000081a3ffff (256 KiB) nomap non-reusable DDD >> > >This looks not printed by memblock_reserve(), right? It is printed by your own >driver? AFAIK these log came from the commit below. aeb9267eb6b1 of: reserved-mem: print out reserved-mem details during boot > >>So a smart parser should combine the krenel log and the memblock/memory log. >> >>In my memsize feature shows it like this though. >> >>0x0000000081400000-0x0000000081960000 0x00560000 ( 5504 KB ) nomap unusable unknown >> >>BR >> > >I am sorry, I still not catch your point. Let me try to understand your message. > >You mentioned several regions, let me put them in order. > >(1) 0x0000000080000000..0x0000000080dfffff printed by driver >(2) 0x0000000080e00000..0x00000000811fffff printed by driver >(3) 0x0000000081200000..0x00000000813fffff printed by driver >(4) 0x0000000081400000..0x0000000081960000 expected to print in new debugfs >(5) 0x0000000081960000..0x00000000819fffff listed in reg/memory >(6) 0x0000000081a00000..0x0000000081a3ffff printed by driver >(7) 0x0000000081a40000..0x0000000081bfffff listed in reg/memory >(8) 0x0000000082800000..0x00000000847fffff listed in reserved > >If you just want information for region (4), sound we can do it in user-space? > >BTW, are region 1, 2, 3, 6, reserved in membock? Yes correct, I though (4) case could be shown to easily catch these hidden regions. As I said, I think 1, 2, 3, 6 seem to be not passed to kernel, it was just tried as they are defined in kernel device tree. > >-- >Wei Yang >Help you, Help me