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 D6446C433EF for ; Wed, 2 Feb 2022 16:38:10 +0000 (UTC) Received: by kanga.kvack.org (Postfix) id 639C16B02C2; Wed, 2 Feb 2022 11:38:10 -0500 (EST) Received: by kanga.kvack.org (Postfix, from userid 40) id 5E9936B02C3; Wed, 2 Feb 2022 11:38:10 -0500 (EST) X-Delivered-To: int-list-linux-mm@kvack.org Received: by kanga.kvack.org (Postfix, from userid 63042) id 4B0E36B02C4; Wed, 2 Feb 2022 11:38:10 -0500 (EST) X-Delivered-To: linux-mm@kvack.org Received: from relay.hostedemail.com (relay.hostedemail.com [64.99.140.28]) by kanga.kvack.org (Postfix) with ESMTP id 3AC5D6B02C2 for ; Wed, 2 Feb 2022 11:38:10 -0500 (EST) Received: from smtpin03.hostedemail.com (a10.router.float.18 [10.200.18.1]) by unirelay08.hostedemail.com (Postfix) with ESMTP id F192020618 for ; Wed, 2 Feb 2022 16:38:09 +0000 (UTC) X-FDA: 79098397098.03.A8C083B Received: from smtp-out1.suse.de (smtp-out1.suse.de [195.135.220.28]) by imf23.hostedemail.com (Postfix) with ESMTP id 79DCB140003 for ; Wed, 2 Feb 2022 16:38:09 +0000 (UTC) Received: from relay2.suse.de (relay2.suse.de [149.44.160.134]) by smtp-out1.suse.de (Postfix) with ESMTP id 2941721100; Wed, 2 Feb 2022 16:38:08 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=suse.com; s=susede1; t=1643819888; 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=ovtEFN3zyuhZ84VATTXxeaX4XxbwY8ky/fQzl6DC/1E=; b=VbieOmiRhqEU6RioiXSYtTXq1pkpEM59XXP4jKGogGC6DPO62BFtWfjW0oxah/XnG4ZUpr fVcilnkkpeLfnCDqL24v6MCv/f+OzRTkaH1XJ7IPGKFxSvII98y0Pztp7ZHSXVDOgIndiB B908vNICOfe2bWd7yPqAP6oCJuqr0bA= Received: from suse.cz (unknown [10.100.201.86]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by relay2.suse.de (Postfix) with ESMTPS id 98642A3B8E; Wed, 2 Feb 2022 16:38:07 +0000 (UTC) Date: Wed, 2 Feb 2022 17:38:07 +0100 From: Michal Hocko To: Roman Gushchin Cc: Waiman Long , Johannes Weiner , Vladimir Davydov , Andrew Morton , Petr Mladek , Steven Rostedt , Sergey Senozhatsky , Andy Shevchenko , Rasmus Villemoes , linux-kernel@vger.kernel.org, cgroups@vger.kernel.org, linux-mm@kvack.org, Ira Weiny , Rafael Aquini Subject: Re: [PATCH v2 3/3] mm/page_owner: Dump memcg information Message-ID: References: <20220129205315.478628-4-longman@redhat.com> <12686956-612d-d89b-5641-470d5e913090@redhat.com> <268a8bdf-4c70-b967-f34c-2293b54186f0@redhat.com> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: X-Rspam-User: nil X-Rspamd-Server: rspam10 X-Rspamd-Queue-Id: 79DCB140003 X-Stat-Signature: km1yrzs3b6zq5fsmdsap4wk4a3wco7gd Authentication-Results: imf23.hostedemail.com; dkim=pass header.d=suse.com header.s=susede1 header.b=VbieOmiR; spf=pass (imf23.hostedemail.com: domain of mhocko@suse.com designates 195.135.220.28 as permitted sender) smtp.mailfrom=mhocko@suse.com; dmarc=pass (policy=quarantine) header.from=suse.com X-HE-Tag: 1643819889-866371 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 Wed 02-02-22 07:54:48, Roman Gushchin wrote: > On Wed, Feb 02, 2022 at 09:57:18AM +0100, Michal Hocko wrote: > > On Tue 01-02-22 11:41:19, Waiman Long wrote: > > > > > > On 2/1/22 05:49, Michal Hocko wrote: > > [...] > > > > Could you be more specific? Offlined memcgs are still part of the > > > > hierarchy IIRC. So it shouldn't be much more than iterating the whole > > > > cgroup tree and collect interesting data about dead cgroups. > > > > > > What I mean is that without piggybacking on top of page_owner, we will to > > > add a lot more code to collect and display those information which may have > > > some overhead of its own. > > > > Yes, there is nothing like a free lunch. Page owner is certainly a tool > > that can be used. My main concern is that this tool doesn't really > > scale on large machines with a lots of memory. It will provide a very > > detailed information but I am not sure this is particularly helpful to > > most admins (why should people process tons of allocation backtraces in > > the first place). Wouldn't it be sufficient to have per dead memcg stats > > to see where the memory sits? > > > > Accumulated offline memcgs is something that bothers more people and I > > am really wondering whether we can do more for those people to evaluate > > the current state. > > Cgroup v2 has corresponding counters for years. Or do you mean something different? Do we have anything more specific than nr_dying_descendants? I was thinking about an interface which would provide paths and stats for dead memcgs. But I have to confess I haven't really spent much time thinking about how much work that would be. I am by no means against adding memcg information to the page owner. I just think there must be a better way to present resource consumption by dead memcgs. -- Michal Hocko SUSE Labs