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 CA568C43334 for ; Fri, 3 Jun 2022 17:30:05 +0000 (UTC) Received: by kanga.kvack.org (Postfix) id 19F0D6B0071; Fri, 3 Jun 2022 13:30:05 -0400 (EDT) Received: by kanga.kvack.org (Postfix, from userid 40) id 1293B6B0072; Fri, 3 Jun 2022 13:30:05 -0400 (EDT) X-Delivered-To: int-list-linux-mm@kvack.org Received: by kanga.kvack.org (Postfix, from userid 63042) id F09E18D0001; Fri, 3 Jun 2022 13:30:04 -0400 (EDT) X-Delivered-To: linux-mm@kvack.org Received: from relay.hostedemail.com (smtprelay0013.hostedemail.com [216.40.44.13]) by kanga.kvack.org (Postfix) with ESMTP id DD21F6B0071 for ; Fri, 3 Jun 2022 13:30:04 -0400 (EDT) Received: from smtpin29.hostedemail.com (a10.router.float.18 [10.200.18.1]) by unirelay10.hostedemail.com (Postfix) with ESMTP id BB030173F for ; Fri, 3 Jun 2022 17:30:04 +0000 (UTC) X-FDA: 79537612728.29.249E047 Received: from casper.infradead.org (casper.infradead.org [90.155.50.34]) by imf11.hostedemail.com (Postfix) with ESMTP id 503974002C for ; Fri, 3 Jun 2022 17:29:55 +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=xs3bzEPy72k+NSi83l5/oU2QBJoYs41hii/0nwSKin8=; b=uHnUri5LCVfBBdFa0vM4XvFQ3d zW1zplW2UMiwyQwAG8bbDnyuIkZKpr6A9HqnaZo+MFk9IeybVBDZOLMRVPFr21uBDi0LfAnXB0gRi vY3yWl1YM3cUfmIg1clsWwJ1QBXaQuA8DQOhv7YLs5NhLJL3K7sz7MXouwrHlUJYSdTUK8QAUasOa VaDiosw83gOl6fpqG4l6Vd9yd8GYYHj25IFCJGz5TrxyoNeWOPXHvo0CCCfNHNKT+CG9Qq2AM7eL3 F33psUVjm2ZUz6IArctDEn+xc/vPGBFBnU0iV7dVQrXjvHL3ry0srZN0Ng8p092BQWXKR6ulUzq4R zPFV2Czg==; Received: from willy by casper.infradead.org with local (Exim 4.94.2 #2 (Red Hat Linux)) id 1nxB7W-0082Ms-I7; Fri, 03 Jun 2022 17:29:58 +0000 Date: Fri, 3 Jun 2022 18:29:58 +0100 From: Matthew Wilcox To: Joakim Tjernlund Cc: "linux-mm@kvack.org" , linux-arm-kernel@lists.infradead.org Subject: Re: Finding kernel RAM consumers ? Message-ID: References: <70b4e1e46d9d63275a0dfe90f96f40ea14d89f0c.camel@infinera.com> <88dfec5a1c98f4eb71e23cafe89db4395ea12811.camel@infinera.com> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: X-Rspamd-Server: rspam06 X-Rspamd-Queue-Id: 503974002C X-Stat-Signature: efuz8zi7yowsnzz6ofcj9fepup5fdh3p X-Rspam-User: Authentication-Results: imf11.hostedemail.com; dkim=pass header.d=infradead.org header.s=casper.20170209 header.b=uHnUri5L; spf=none (imf11.hostedemail.com: domain of willy@infradead.org has no SPF policy when checking 90.155.50.34) smtp.mailfrom=willy@infradead.org; dmarc=none X-HE-Tag: 1654277395-337047 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 Fri, Jun 03, 2022 at 05:26:33PM +0000, Joakim Tjernlund wrote: > On Fri, 2022-06-03 at 08:49 +0200, Joakim Tjernlund wrote: > > On Thu, 2022-06-02 at 21:11 +0100, Matthew Wilcox wrote: > > > 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? > > > > Those are interesting, thanks. > > In my case it is the amount of work space RAM allocated that is a bit much. The kernel code/data > > is 5+MB but the total need is 14MB, 9MB is buffer and similar. > > > > Jocke > > Found something, arm64 only supports mem model SPARSEMEM_EXTREME and it uses most of my memory. > Tried to force SPARSEMEM_STATIC but that didn't boot, is STATIC even cheaper ? That sounds like a question for the arm64 maintainers