Received: by 2002:a05:6a10:1a4d:0:0:0:0 with SMTP id nk13csp1926647pxb; Wed, 2 Feb 2022 16:09:06 -0800 (PST) X-Google-Smtp-Source: ABdhPJx/T3YURt7wI55C+Ci/+BCHEVxEnbsf604ZJezV0J3BSciWvsKVEouO4PIMf7xPibvXv0ga X-Received: by 2002:a17:903:230f:: with SMTP id d15mr34349649plh.8.1643846946002; Wed, 02 Feb 2022 16:09:06 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1643846945; cv=none; d=google.com; s=arc-20160816; b=umOIY7e4gf2ohivJGz7JnzpwVQbDxkRQJ97E1Bfe4j4r8Awumr/NlbI2tm0q9mMMyS P2piZ4nwWnmcmlhUVwpiqo40eECSjANBAxSNwA7X3MbMq00eN9ed0M7nuG0PqVT0VepE CMaq9N1hkc/ISca7EnbRLXYlZhn0noC0s9vqZNs+tKkJNlBDpQCiN/3KGH2K48YJAZ/h PxdYJX7u+sVccl2WF1cOnhY0oKvfdtNHUOL+3cgRQsAB29h0UqnxyA/v+pkCodjv7Jcy cXdPbrpSlnAtFkmNLbrCV7/gxj/QEHFG69kbY5+nnqyKJOC1gk5A2otpYmApcXJ3zkHg NEEw== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:in-reply-to:content-disposition:mime-version :references:message-id:subject:cc:to:from:date:dkim-signature; bh=eUaCCmIrt4YXjEHnPOouYBMineoqEjQxWMOeykndMd0=; b=vVRa7eDyBFw21H8qgjjHliD5kidw9Ai9KeZYMGg1nBTExJcM2H99Pbv+XQ7gnPnXDt KF/MsAsebBbSDD8dXvJt31ZSG7nHK2jcp3s5RABrR+8t6cFP9n6hFAwy0vtPwfFq/a75 CbuA12i6mfV0tNb2reHQDwhxn6rOKrztzCu7bQhcZbDoOF2AKlMAEdq6NkveanZ+AuYK PM6Xi8JY4dcpO+pVsM1doDvNv9MvBcfQbj4qba7u7xArVyjOXYZW6ZKhJiHka8kcy+Yv 4syYdl5ImJRSXrc82h5yUAsPfSltwq2fXXsrRQKbCHjlznnj4rhjwo9aVnNOWGf16c70 HlFw== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@suse.com header.s=susede1 header.b=LVC7QKF9; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:20 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=QUARANTINE sp=NONE dis=NONE) header.from=suse.com Return-Path: Received: from out1.vger.email (out1.vger.email. [2620:137:e000::1:20]) by mx.google.com with ESMTP id s206si9372139pgs.442.2022.02.02.16.08.54; Wed, 02 Feb 2022 16:09:05 -0800 (PST) Received-SPF: pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:20 as permitted sender) client-ip=2620:137:e000::1:20; Authentication-Results: mx.google.com; dkim=pass header.i=@suse.com header.s=susede1 header.b=LVC7QKF9; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:20 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=QUARANTINE sp=NONE dis=NONE) header.from=suse.com Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1346378AbiBBR4T (ORCPT + 99 others); Wed, 2 Feb 2022 12:56:19 -0500 Received: from smtp-out2.suse.de ([195.135.220.29]:34682 "EHLO smtp-out2.suse.de" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1346305AbiBBR4S (ORCPT ); Wed, 2 Feb 2022 12:56:18 -0500 Received: from relay2.suse.de (relay2.suse.de [149.44.160.134]) by smtp-out2.suse.de (Postfix) with ESMTP id 566B61F383; Wed, 2 Feb 2022 17:56:17 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=suse.com; s=susede1; t=1643824577; 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=eUaCCmIrt4YXjEHnPOouYBMineoqEjQxWMOeykndMd0=; b=LVC7QKF9m3y87F2lRODe1hv/0VpW6yBSKfqzNrbC+ql2jmd+Gdx7rF40xvljUGtdOYzaik dFyHjYuA394ZAR40l98/+zytDpSVZV7EnNLBgnsAoCmYkfj+UeOcwQQGudFdWr0CMa1WaP rxWjwNZtjIvt35GHr7ossjaNISAv4oU= 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 AEECFA3B84; Wed, 2 Feb 2022 17:56:16 +0000 (UTC) Date: Wed, 2 Feb 2022 18:56:16 +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: <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: Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On Wed 02-02-22 09:51:32, Roman Gushchin wrote: > On Wed, Feb 02, 2022 at 05:38:07PM +0100, Michal Hocko wrote: > > 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? > > No, just 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. > > I'd go with a drgn script. I wrote a bunch of them some times ago and > can probably revive them and post here (will take few days). That would be really awsome! Thanks! -- Michal Hocko SUSE Labs