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 vger.kernel.org (vger.kernel.org [23.128.96.18]) by smtp.lore.kernel.org (Postfix) with ESMTP id D63CCC433EF for ; Wed, 2 Feb 2022 16:29:50 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S232699AbiBBQ3u (ORCPT ); Wed, 2 Feb 2022 11:29:50 -0500 Received: from us-smtp-delivery-124.mimecast.com ([170.10.133.124]:44807 "EHLO us-smtp-delivery-124.mimecast.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S240502AbiBBQ3q (ORCPT ); Wed, 2 Feb 2022 11:29:46 -0500 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=redhat.com; s=mimecast20190719; t=1643819386; 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: content-transfer-encoding:content-transfer-encoding: in-reply-to:in-reply-to:references:references; bh=f0ow7OhvPHO62CtY/qyYiL8XWSa1Avspao6Gho1V2I8=; b=agkRmmpWv/oZ33JztgIH47+SFJckrTw7c7ss5fo4ONQM1sXsQci4e1LHw3SKOu1UBB02hU 0ei5IZ3iguX5T7j6VO61bwazybzJmosQkB/zfTAdPsRfEILdv6zZyggqdhbmtnn7Zu+v8h c2aJ2ssXr6kJvhUGjc7QTh9LPrRXk2I= Received: from mimecast-mx01.redhat.com (mimecast-mx01.redhat.com [209.132.183.4]) by relay.mimecast.com with ESMTP with STARTTLS (version=TLSv1.2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id us-mta-584-HvNJrQYJPbiuC6PRN1-sag-1; Wed, 02 Feb 2022 11:29:41 -0500 X-MC-Unique: HvNJrQYJPbiuC6PRN1-sag-1 Received: from smtp.corp.redhat.com (int-mx02.intmail.prod.int.phx2.redhat.com [10.5.11.12]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by mimecast-mx01.redhat.com (Postfix) with ESMTPS id D9D958144E0; Wed, 2 Feb 2022 16:29:38 +0000 (UTC) Received: from [10.22.34.202] (unknown [10.22.34.202]) by smtp.corp.redhat.com (Postfix) with ESMTP id 1595C7D498; Wed, 2 Feb 2022 16:29:36 +0000 (UTC) Message-ID: Date: Wed, 2 Feb 2022 11:29:36 -0500 MIME-Version: 1.0 User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:91.0) Gecko/20100101 Thunderbird/91.4.0 Subject: Re: [PATCH v2 3/3] mm/page_owner: Dump memcg information Content-Language: en-US To: Michal Hocko 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 References: <20220129205315.478628-1-longman@redhat.com> <20220129205315.478628-4-longman@redhat.com> <12686956-612d-d89b-5641-470d5e913090@redhat.com> <268a8bdf-4c70-b967-f34c-2293b54186f0@redhat.com> From: Waiman Long In-Reply-To: Content-Type: text/plain; charset=UTF-8; format=flowed Content-Transfer-Encoding: 7bit X-Scanned-By: MIMEDefang 2.79 on 10.5.11.12 Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On 2/2/22 03:57, 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. You won't get the stack backtrace information without page_owner enabled. I believe that is a helpful piece of information. I don't expect page_owner to be enabled by default on production system because of its memory overhead. I believe you can actually see the number of memory cgroups present by looking at the /proc/cgroups file. Though, you don't know how many of them are offline memcgs. So if one suspect that there are a large number of offline memcgs, one can set up a test environment with page_owner enabled for further analysis. Cheers, Longman