Received: by 2002:a05:7412:1e0b:b0:fc:a2b0:25d7 with SMTP id kr11csp790674rdb; Thu, 15 Feb 2024 16:05:49 -0800 (PST) X-Forwarded-Encrypted: i=3; AJvYcCUA13QqEIsMHQd6l7/U8++HuBIrLrFkx9z1Yq5zW928qCkNjLZReS8sn+5jc7xTqLhxdfhznQLu+FxPlNeyRloqUEfL5KgBn4G4xLiZew== X-Google-Smtp-Source: AGHT+IF1f/9Nt/Jwg+OrWfgVQZq10MbF2Zv2U2WUOtd0hPorGIoEaD6wg2lHWVFal8FXlRoebWPo X-Received: by 2002:a05:6a20:4c93:b0:19e:cd5d:88f6 with SMTP id fq19-20020a056a204c9300b0019ecd5d88f6mr2954772pzb.53.1708041949299; Thu, 15 Feb 2024 16:05:49 -0800 (PST) ARC-Seal: i=2; a=rsa-sha256; t=1708041949; cv=pass; d=google.com; s=arc-20160816; b=JdtAD1pf/LgjfQHkMXkdKRcjHqKAayPdqN3RsJoJ1+oUWBiu2v8SBJoH3U4901G96O BNGCfWavhQEvZoeQxfcuBl0Xysg4CeFcVCZ1ovWi1j5tUoO2XS1L6x6G4+iiAatkbZ2r 0lKXoHnF/jaeL7T02QGEzdO2OsbTJXGGU5N8+xJZcSvZOTWXnbHsUrxrj6ZvAEvNov1s PV+6IkbM1IMQ3ZeogU21J0z+QJNikrNQqFBJCfd4Oz6tU8A1sG17EZQOpL5B56tUofkT atIQ8EruWMPrWllUgsroGHWaQr0gXyaihUTFj6mTk8+3iEpHUtEygzOsD//kXNjbcomQ PNzg== ARC-Message-Signature: i=2; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=in-reply-to:content-disposition:mime-version:list-unsubscribe :list-subscribe:list-id:precedence:references:message-id:subject:cc :to:from:dkim-signature:date; bh=K2uij+2SL3ce4+254m7l2JMunInmvxqqhYhnbhOg6QE=; fh=ri16QTP/cS5ah95n99p/phw60I7/ZPEoxjAJjLXDar0=; b=coXVrAFFWMBkzwjsWMFxzMoT7HN1+1IVvRPMPyetWIoEyM1vxh2pah3/zvHWwe3Ysf Hc91nZXvoPOpAFSB5/K7ZEqg46dm1Uj80kU6DIasv7kFQpRuWqIbSDFlF6kRfjsUsu/3 5ctj3+Aq5ghG+C6q4RzRsBLtkuE60h39zD/nMkMddOrt7wzg/lJlMZtjhTwPxM/bWknE REm9SxbCQKQoSCM20Pzdf++RXaOBzR4an0r7DuLvoUPxNYu5S6dBowMfag+xmYbrw/0c BYqEwnhbijK4wEtDAPOAsFA3offPh+gRfbiS9W/tFeEeKje4KvRTfX6ks59Qy0CaM2ZU 5EVw==; dara=google.com ARC-Authentication-Results: i=2; mx.google.com; dkim=pass header.i=@linux.dev header.s=key1 header.b=V1agdiFf; arc=pass (i=1 spf=pass spfdomain=linux.dev dkim=pass dkdomain=linux.dev dmarc=pass fromdomain=linux.dev); spf=pass (google.com: domain of linux-kernel+bounces-67864-linux.lists.archive=gmail.com@vger.kernel.org designates 147.75.48.161 as permitted sender) smtp.mailfrom="linux-kernel+bounces-67864-linux.lists.archive=gmail.com@vger.kernel.org"; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=linux.dev Return-Path: Received: from sy.mirrors.kernel.org (sy.mirrors.kernel.org. [147.75.48.161]) by mx.google.com with ESMTPS id ka5-20020a056a00938500b006e04dddc978si1976541pfb.305.2024.02.15.16.05.48 for (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Thu, 15 Feb 2024 16:05:49 -0800 (PST) Received-SPF: pass (google.com: domain of linux-kernel+bounces-67864-linux.lists.archive=gmail.com@vger.kernel.org designates 147.75.48.161 as permitted sender) client-ip=147.75.48.161; Authentication-Results: mx.google.com; dkim=pass header.i=@linux.dev header.s=key1 header.b=V1agdiFf; arc=pass (i=1 spf=pass spfdomain=linux.dev dkim=pass dkdomain=linux.dev dmarc=pass fromdomain=linux.dev); spf=pass (google.com: domain of linux-kernel+bounces-67864-linux.lists.archive=gmail.com@vger.kernel.org designates 147.75.48.161 as permitted sender) smtp.mailfrom="linux-kernel+bounces-67864-linux.lists.archive=gmail.com@vger.kernel.org"; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=linux.dev 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 sy.mirrors.kernel.org (Postfix) with ESMTPS id 382ECB242F1 for ; Thu, 15 Feb 2024 23:55:58 +0000 (UTC) Received: from localhost.localdomain (localhost.localdomain [127.0.0.1]) by smtp.subspace.kernel.org (Postfix) with ESMTP id 2E58514830F; Thu, 15 Feb 2024 23:54:41 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; dkim=pass (1024-bit key) header.d=linux.dev header.i=@linux.dev header.b="V1agdiFf" Received: from out-183.mta0.migadu.com (out-183.mta0.migadu.com [91.218.175.183]) (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 A1E5F146002; Thu, 15 Feb 2024 23:54:38 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.client-ip=91.218.175.183 ARC-Seal:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1708041280; cv=none; b=g28JUKX6347/r0493q/aPPoDFywnbU5oYQtogbxCC3vrDdm5qyj6u6R2hGc0AzHrY0tu8U0oV1IJRNHLobAHbDtLZ3WmBTuLRODSF1rElpyoSjCiWlO1+J2TxsNRYL3AunE4Ohmu3lsxldMGTN+KIDNvrfjbKVNJgtYaynNqSPk= ARC-Message-Signature:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1708041280; c=relaxed/simple; bh=XH/LH5AcQ9vTPSWj8ejMl5YLc1dGNFipWkDEygmqHUw=; h=Date:From:To:Cc:Subject:Message-ID:References:MIME-Version: Content-Type:Content-Disposition:In-Reply-To; b=dQp4J4Zl1l29sz5Y0woClca0ADDrOfO4YBuwFKh1DiybrNnpgcjqffI6Xgq5pGD8BaeefIKfT/+gOS+34Zzaaua00fJoB8XhUKs3CvzEblQHj2N1r7QxrUZG6Xdu3Lbd3W0Ko4xJpKKMXe/mGX0q+fIVEQ8Qx98SiaAgcnQhO5Y= ARC-Authentication-Results:i=1; smtp.subspace.kernel.org; dmarc=pass (p=none dis=none) header.from=linux.dev; spf=pass smtp.mailfrom=linux.dev; dkim=pass (1024-bit key) header.d=linux.dev header.i=@linux.dev header.b=V1agdiFf; arc=none smtp.client-ip=91.218.175.183 Authentication-Results: smtp.subspace.kernel.org; dmarc=pass (p=none dis=none) header.from=linux.dev Authentication-Results: smtp.subspace.kernel.org; spf=pass smtp.mailfrom=linux.dev Date: Thu, 15 Feb 2024 18:54:25 -0500 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=linux.dev; s=key1; t=1708041276; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:cc:mime-version:mime-version:content-type:content-type: in-reply-to:in-reply-to:references:references; bh=K2uij+2SL3ce4+254m7l2JMunInmvxqqhYhnbhOg6QE=; b=V1agdiFf2PWalNLvXcX/pEaaYs1LzTR99jNKgHHksR9pk5/i4sCMiqHAc6qlownhM5WAyl OqzNpW/LSM50S1rLe7LeKiTEyj4Uqd2FpbwOOt1xn3GjS5Kqmd+qtGSoP3zkFaJ1MFitLS Rmu6c2taXzQ47IwNRs2zeWhJq1hQz2g= X-Report-Abuse: Please report any abuse attempt to abuse@migadu.com and include these headers. From: Kent Overstreet To: Dave Hansen Cc: Steven Rostedt , Vlastimil Babka , Suren Baghdasaryan , Michal Hocko , akpm@linux-foundation.org, hannes@cmpxchg.org, roman.gushchin@linux.dev, mgorman@suse.de, dave@stgolabs.net, willy@infradead.org, liam.howlett@oracle.com, corbet@lwn.net, void@manifault.com, peterz@infradead.org, juri.lelli@redhat.com, catalin.marinas@arm.com, will@kernel.org, arnd@arndb.de, tglx@linutronix.de, mingo@redhat.com, dave.hansen@linux.intel.com, x86@kernel.org, peterx@redhat.com, david@redhat.com, axboe@kernel.dk, mcgrof@kernel.org, masahiroy@kernel.org, nathan@kernel.org, dennis@kernel.org, tj@kernel.org, muchun.song@linux.dev, rppt@kernel.org, paulmck@kernel.org, pasha.tatashin@soleen.com, yosryahmed@google.com, yuzhao@google.com, dhowells@redhat.com, hughd@google.com, andreyknvl@gmail.com, keescook@chromium.org, ndesaulniers@google.com, vvvvvv@google.com, gregkh@linuxfoundation.org, ebiggers@google.com, ytcoode@gmail.com, vincent.guittot@linaro.org, dietmar.eggemann@arm.com, bsegall@google.com, bristot@redhat.com, vschneid@redhat.com, cl@linux.com, penberg@kernel.org, iamjoonsoo.kim@lge.com, 42.hyeyoo@gmail.com, glider@google.com, elver@google.com, dvyukov@google.com, shakeelb@google.com, songmuchun@bytedance.com, jbaron@akamai.com, rientjes@google.com, minchan@google.com, kaleshsingh@google.com, kernel-team@android.com, linux-doc@vger.kernel.org, linux-kernel@vger.kernel.org, iommu@lists.linux.dev, linux-arch@vger.kernel.org, linux-fsdevel@vger.kernel.org, linux-mm@kvack.org, linux-modules@vger.kernel.org, kasan-dev@googlegroups.com, cgroups@vger.kernel.org Subject: Re: [PATCH v3 31/35] lib: add memory allocations report in show_mem() Message-ID: <6mjunla45lkwqvkq7jegiw5lfmufg4y53zegevep3iwvy77xub@2nfmbeo6tvz2> References: <20240212213922.783301-32-surenb@google.com> <320cd134-b767-4f29-869b-d219793ba8a1@suse.cz> <20240215180742.34470209@gandalf.local.home> <38e34171-e116-46ee-8e2b-de7cc96d265e@intel.com> Precedence: bulk X-Mailing-List: linux-kernel@vger.kernel.org List-Id: List-Subscribe: List-Unsubscribe: MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <38e34171-e116-46ee-8e2b-de7cc96d265e@intel.com> X-Migadu-Flow: FLOW_OUT On Thu, Feb 15, 2024 at 03:19:33PM -0800, Dave Hansen wrote: > On 2/15/24 15:07, Steven Rostedt wrote: > > Just adding the patches increases the size by 5k. But the rest shows an > > increase of 259k, and you are worried about 4k (and possibly less?)??? > > Doesn't the new page_ext thingy add a pointer per 'struct page', or > ~0.2% of RAM, or ~32MB on a 16GB laptop? I, too, am confused why 4k is > even remotely an issue. page_ext adds a separate per-page array; it itself does not add a pointer to strugt page, it's an array lookup that uses the page pfn. We do add a pointer to page_ext, and that's (for now) unavoidable overhead - but we'll be looking at referencing code tags by index, and if that works out we'll be able to kill the page_ext dependency and just store the alloc tag index in page bits.