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 AB8ADC48BC3 for ; Wed, 14 Feb 2024 14:46:39 +0000 (UTC) Received: by kanga.kvack.org (Postfix) id 0CAC56B00A0; Wed, 14 Feb 2024 09:46:39 -0500 (EST) Received: by kanga.kvack.org (Postfix, from userid 40) id 07B706B00A1; Wed, 14 Feb 2024 09:46:39 -0500 (EST) X-Delivered-To: int-list-linux-mm@kvack.org Received: by kanga.kvack.org (Postfix, from userid 63042) id E5DD46B00A2; Wed, 14 Feb 2024 09:46:38 -0500 (EST) X-Delivered-To: linux-mm@kvack.org Received: from relay.hostedemail.com (smtprelay0017.hostedemail.com [216.40.44.17]) by kanga.kvack.org (Postfix) with ESMTP id D4D006B00A0 for ; Wed, 14 Feb 2024 09:46:38 -0500 (EST) Received: from smtpin11.hostedemail.com (a10.router.float.18 [10.200.18.1]) by unirelay10.hostedemail.com (Postfix) with ESMTP id 9B810C0E33 for ; Wed, 14 Feb 2024 14:46:38 +0000 (UTC) X-FDA: 81790685676.11.7782D8D Received: from smtp-out1.suse.de (smtp-out1.suse.de [195.135.223.130]) by imf21.hostedemail.com (Postfix) with ESMTP id 7562E1C001F for ; Wed, 14 Feb 2024 14:46:36 +0000 (UTC) Authentication-Results: imf21.hostedemail.com; dkim=pass header.d=suse.com header.s=susede1 header.b="G/fg/fXE"; dkim=pass header.d=suse.com header.s=susede1 header.b="G/fg/fXE"; spf=pass (imf21.hostedemail.com: domain of mhocko@suse.com designates 195.135.223.130 as permitted sender) smtp.mailfrom=mhocko@suse.com; dmarc=pass (policy=quarantine) header.from=suse.com ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=hostedemail.com; s=arc-20220608; t=1707921996; h=from:from:sender:reply-to:subject:subject:date:date: message-id:message-id:to:to:cc:cc:mime-version:mime-version: content-type:content-type:content-transfer-encoding: in-reply-to:in-reply-to:references:references:dkim-signature; bh=L7XYt0NyV1LLmmYXD5SRXg7RDztZSN4xXat2vk9BckU=; b=cy39SBXqfvwvsbe82FlPHJSoFo+JEXc0843QZ56zT7TaSTznpnLYF+CXtlt3A6S4GVKDlw BWi3xImiclUjft1DoQoviI0h+qKWxhPO6tTm+lx0TMNfyFoVMucCrvq3vpbLJSMFnxyVAi SsC5fmZuTMeXXMO1XhtUD0bn6kavGxg= ARC-Seal: i=1; s=arc-20220608; d=hostedemail.com; t=1707921996; a=rsa-sha256; cv=none; b=77HVFsH+XqUv5mBbhK8m+/d6H3ifExkeW4ObOpByCu2CpHmpzogV9PbPQ1hhBkyO2tCwQy tAwKKrIl2iiroIcP4o+cY0nDI8nIVar7wFfYGHjBVOoTyZGdRNrjEieHO1NJNeufH0OvfP BoQiT/CTuFDdsIkprtOiC6j0WHbVjBc= ARC-Authentication-Results: i=1; imf21.hostedemail.com; dkim=pass header.d=suse.com header.s=susede1 header.b="G/fg/fXE"; dkim=pass header.d=suse.com header.s=susede1 header.b="G/fg/fXE"; spf=pass (imf21.hostedemail.com: domain of mhocko@suse.com designates 195.135.223.130 as permitted sender) smtp.mailfrom=mhocko@suse.com; dmarc=pass (policy=quarantine) header.from=suse.com Received: from imap1.dmz-prg2.suse.org (imap1.dmz-prg2.suse.org [10.150.64.97]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256) (No client certificate requested) by smtp-out1.suse.de (Postfix) with ESMTPS id 9E9BF220C8; Wed, 14 Feb 2024 14:46:34 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=suse.com; s=susede1; t=1707921994; h=from:from:reply-to: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=L7XYt0NyV1LLmmYXD5SRXg7RDztZSN4xXat2vk9BckU=; b=G/fg/fXE/BxmwJaDpB5G6+sbfW69+fMUQ0OzLitvcmHEv1Ds8G+GL4LdouO/fwIfpKsqYP K1h5IhLHPiF9QIXH9zu5TsmsC3q6YrtzaT+6raFWjZBU+43wC0WrFSHBXIgYFSN3RNg2dN Cy4YpNtjfnssPK+JWHc4gG9YwWLpq0E= DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=suse.com; s=susede1; t=1707921994; h=from:from:reply-to: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=L7XYt0NyV1LLmmYXD5SRXg7RDztZSN4xXat2vk9BckU=; b=G/fg/fXE/BxmwJaDpB5G6+sbfW69+fMUQ0OzLitvcmHEv1Ds8G+GL4LdouO/fwIfpKsqYP K1h5IhLHPiF9QIXH9zu5TsmsC3q6YrtzaT+6raFWjZBU+43wC0WrFSHBXIgYFSN3RNg2dN Cy4YpNtjfnssPK+JWHc4gG9YwWLpq0E= Received: from imap1.dmz-prg2.suse.org (localhost [127.0.0.1]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256) (No client certificate requested) by imap1.dmz-prg2.suse.org (Postfix) with ESMTPS id 6C19613A72; Wed, 14 Feb 2024 14:46:34 +0000 (UTC) Received: from dovecot-director2.suse.de ([2a07:de40:b281:106:10:150:64:167]) by imap1.dmz-prg2.suse.org with ESMTPSA id Hbm4GUrSzGUzGAAAD6G6ig (envelope-from ); Wed, 14 Feb 2024 14:46:34 +0000 Date: Wed, 14 Feb 2024 15:46:33 +0100 From: Michal Hocko To: Johannes Weiner Cc: Suren Baghdasaryan , akpm@linux-foundation.org, kent.overstreet@linux.dev, vbabka@suse.cz, 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, rostedt@goodmis.org, 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 00/35] Memory allocation profiling Message-ID: References: <20240212213922.783301-1-surenb@google.com> <20240214062020.GA989328@cmpxchg.org> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <20240214062020.GA989328@cmpxchg.org> X-Rspamd-Queue-Id: 7562E1C001F X-Rspam-User: X-Stat-Signature: f68oyrsj8bcd4dfbcyyerfdpqy3dzdyu X-Rspamd-Server: rspam03 X-HE-Tag: 1707921996-203449 X-HE-Meta: U2FsdGVkX18HlyiEHo/BXUt4BcCw4ex4mdriv3lc0LB0QSseqINc949MhjCt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gT5DUiT6ESqUiOQd+X/AE4t9NGJ2sBRj5EoG7j2aJygbRGOiZ/on1rDzRp5YhQtHJuSyKWBwganmGYecapcL0M5CUvPanTCmaIAsif/vOZ7dxKLbWw+U96dYOXByfGRJnA3iEuxaaZIf2RuC5dbFqAvj 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: List-Subscribe: List-Unsubscribe: On Wed 14-02-24 01:20:20, Johannes Weiner wrote: [...] > I agree we should discuss how the annotations are implemented on a > technical basis, but my take is that we need something like this. I do not think there is any disagreement on usefulness of a better memory allocation tracking. At least for me the primary problem is the implementation. At LFSMM last year we have heard that existing tracing infrastructure hasn't really been explored much. Cover letter doesn't really talk much about those alternatives so it is really hard to evaluate whether the proposed solution is indeed our best way to approach this. > In a codebase of our size, I don't think the allocator should be > handing out memory without some basic implied tracking of where it's > going. It's a liability for production environments, and it can hide > bad memory management decisions in drivers and other subsystems for a > very long time. Fully agreed! It is quite common to see oom reports with a large portion of memory unaccounted and this really presents additional cost on the debugging side. -- Michal Hocko SUSE Labs