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 9A023C43334 for ; Thu, 2 Jun 2022 20:11:05 +0000 (UTC) Received: by kanga.kvack.org (Postfix) id F1CFA6B0072; Thu, 2 Jun 2022 16:11:04 -0400 (EDT) Received: by kanga.kvack.org (Postfix, from userid 40) id EC78B6B0073; Thu, 2 Jun 2022 16:11:04 -0400 (EDT) X-Delivered-To: int-list-linux-mm@kvack.org Received: by kanga.kvack.org (Postfix, from userid 63042) id DDFCB6B0074; Thu, 2 Jun 2022 16:11:04 -0400 (EDT) X-Delivered-To: linux-mm@kvack.org Received: from relay.hostedemail.com (smtprelay0015.hostedemail.com [216.40.44.15]) by kanga.kvack.org (Postfix) with ESMTP id CFEE46B0072 for ; Thu, 2 Jun 2022 16:11:04 -0400 (EDT) Received: from smtpin08.hostedemail.com (a10.router.float.18 [10.200.18.1]) by unirelay12.hostedemail.com (Postfix) with ESMTP id A1EBD1213A2 for ; Thu, 2 Jun 2022 20:11:04 +0000 (UTC) X-FDA: 79534389648.08.35C39B6 Received: from casper.infradead.org (casper.infradead.org [90.155.50.34]) by imf22.hostedemail.com (Postfix) with ESMTP id C754CC0071 for ; Thu, 2 Jun 2022 20:10:59 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=infradead.org; s=casper.20170209; h=In-Reply-To:Content-Type:MIME-Version: References:Message-ID:Subject:Cc:To:From:Date:Sender:Reply-To: Content-Transfer-Encoding:Content-ID:Content-Description; bh=zVDNiJz0OZr/90m/y8BqDFBQ9ZaLL8K/kjBMEYInag0=; b=RbP63zopkcCtSI8GbS1QVFVM2i l/aAWNvTiLDY0d7IYXN4czwNSmRwmWwtHV+3ufKwhpxyGMgADpanGWbfmXbfg67FWehBiI1cVeZF7 Oi7D5dJnpGTMjPvHuB9HCA6XeHnP0t2ZlEQBbd0OlbDFe8DwoEPvZGfMMuDurHiuzXzSmADExcMJi Z0PnyimZq10bjaYpxo3BVXza/fz1IJiaYry6XXQgPoMXwQmdmlDQmuNN3KxRp8uKDqMmh3TpQd2dk B64JPYprtbVQS96E4S684hg7oqg9tMLtd3kKBocPf3oox8YioYgMpNlm2r0YEJDUBGoV4bcmY4Yda rdeEcrpg==; Received: from willy by casper.infradead.org with local (Exim 4.94.2 #2 (Red Hat Linux)) id 1nwr9o-007Oie-3M; Thu, 02 Jun 2022 20:11:00 +0000 Date: Thu, 2 Jun 2022 21:11:00 +0100 From: Matthew Wilcox To: Joakim Tjernlund Cc: "linux-mm@kvack.org" Subject: Re: Finding kernel RAM consumers ? Message-ID: References: <70b4e1e46d9d63275a0dfe90f96f40ea14d89f0c.camel@infinera.com> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <70b4e1e46d9d63275a0dfe90f96f40ea14d89f0c.camel@infinera.com> X-Rspam-User: X-Rspamd-Server: rspam02 X-Rspamd-Queue-Id: C754CC0071 X-Stat-Signature: 9gx1snccskda5nikyftt44qkessm6wzz Authentication-Results: imf22.hostedemail.com; dkim=pass header.d=infradead.org header.s=casper.20170209 header.b=RbP63zop; dmarc=none; spf=none (imf22.hostedemail.com: domain of willy@infradead.org has no SPF policy when checking 90.155.50.34) smtp.mailfrom=willy@infradead.org X-HE-Tag: 1654200659-484191 X-Bogosity: Ham, tests=bogofilter, spamicity=0.000000, version=1.2.4 Sender: owner-linux-mm@kvack.org Precedence: bulk X-Loop: owner-majordomo@kvack.org List-ID: On Thu, Jun 02, 2022 at 07:24:23PM +0000, Joakim Tjernlund wrote: > We have this small embedded target(aarch64) with 32 MB of RAM where the kernel consumes 14420K: > Memory: 22444K/36864K available (3584K kernel code, 698K rwdata, 936K rodata, 320K init, 255K bss, 14420K reserved, 0K cma-reserved) > > I want to track down were most of this RAM is consumed so I can trim away some MBs > but I am having a hard time finding may way. > Is there some tool/kernel config that can help me with that? You may find this series of articles interesting: https://lwn.net/Articles/741494/ https://lwn.net/Articles/744507/ https://lwn.net/Articles/746780/ https://lwn.net/Articles/748198/ While they're a little old and they're targetting a much smaller system than yours, they may give you some ideas of things you can try and tools you can use.