Received: by 2002:a05:6a10:1a4d:0:0:0:0 with SMTP id nk13csp1326123pxb; Wed, 2 Feb 2022 02:17:41 -0800 (PST) X-Google-Smtp-Source: ABdhPJxxqZpKh0Ny+mlJjIaswvess0E+oJcy0lbh7DffE+v7SUu3e/rfmKc7/bFDqgkl0ZPbeffe X-Received: by 2002:a17:907:9488:: with SMTP id dm8mr24319772ejc.73.1643797060818; Wed, 02 Feb 2022 02:17:40 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1643797060; cv=none; d=google.com; s=arc-20160816; b=E8GRD9Jym1bYWQJIkpwYuDzL2A4fmcCR1tl2hEWdVRoX/0wFDd7R2PeYgpCwlsykFZ 3cR2KbTq0QUhPgnS3gWjrC7ki9HTGvr7qtBo6YMYW06fiIh+EKBNfUJOoFxmAMhnR0Ug MLRlnMgsmuXWuM8jG62noTmPq7z7XFLytx/GRcpTnbx2x58StFT8WHWxydq51JZkK8Uy 3tHDss5PnWZOujIkT2/LxTFfGFQTC1z6+mG1VOlEIUbvKUVwB39wyoAx+/NDyTm8ZUl1 Us9XzTrAAXbiG2GlyObGf2gxW+GZXWCAJ+A4taHtFykFf84K8Y2YFOVccFyp9V33G0FX lnWw== 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=l6Bn0nz2rnpcXkXYw/gRthu/0RqSHCGbN5yIH2/zMno=; b=hjlOQBpETxg3P53RC62L9xMbSala6vcDwWZ2WQ0q4ghRIOXEBs7UJpctaoP/MyNsqn KMRtjee963XeB6vi2pXBVFCWq82Uh21cq4TSJyQnX2Up0+gwI/OCN7CxfUZ3fPKTVR+3 snpsWrM3QXBghn+e89AIMdcWDTd/4WAqQGCxRLXPuXxEHKOni7gn49Y+JjdZk2/O2NQv D4LiiUfitK1p1hvPjF47NyUdlMPgw7sLeEO/hOkqa6ZerVZywK2HeHY/67q2TrmNA52X y2T8HFSTDGUCxEj5SdndlGh/VBH1a4mf6RuphBstxHOCxST434TZGnT2cbez8jKh/mBj Gukw== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@suse.com header.s=susede1 header.b=LsrFLxhX; 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 e27si11808902ejl.129.2022.02.02.02.17.15; Wed, 02 Feb 2022 02:17:40 -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=LsrFLxhX; 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 S236747AbiBAKtO (ORCPT + 99 others); Tue, 1 Feb 2022 05:49:14 -0500 Received: from smtp-out2.suse.de ([195.135.220.29]:46652 "EHLO smtp-out2.suse.de" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S229845AbiBAKtN (ORCPT ); Tue, 1 Feb 2022 05:49:13 -0500 Received: from relay2.suse.de (relay2.suse.de [149.44.160.134]) by smtp-out2.suse.de (Postfix) with ESMTP id 320331F397; Tue, 1 Feb 2022 10:49:12 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=suse.com; s=susede1; t=1643712552; 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=l6Bn0nz2rnpcXkXYw/gRthu/0RqSHCGbN5yIH2/zMno=; b=LsrFLxhXhW9MQ5itj+U/rbYQQCU2+RZgxSgqRPFPCH62iHD/1uuU1u+XTeTmuwRN7c3vBl 7xp0WzHh84RoSxn0EONv306e8MJ1H89YhCsuKp+FnGzVoE92rGb1n/4pI20rWUQi1J/SmO giL7UgDUxBg/dDgNhnO46MAaplPB8qo= 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 C1067A3B84; Tue, 1 Feb 2022 10:49:11 +0000 (UTC) Date: Tue, 1 Feb 2022 11:49:11 +0100 From: Michal Hocko To: Waiman Long Cc: Roman Gushchin , 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-1-longman@redhat.com> <20220129205315.478628-4-longman@redhat.com> <12686956-612d-d89b-5641-470d5e913090@redhat.com> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <12686956-612d-d89b-5641-470d5e913090@redhat.com> Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On Mon 31-01-22 13:38:28, Waiman Long wrote: [...] > Of course, it is also possible to have a debugfs interface to list those > dead memcg information, displaying more information about the page that pins > the memcg will be hard without using the page owner tool. Yes, you will need page owner or hook into the kernel by other means (like already mentioned drgn). The question is whether scanning all existing pages to get that information is the best we can offer. > Keeping track of > the list of dead memcg's may also have some runtime overhead. 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. -- Michal Hocko SUSE Labs