Received: by 2002:a05:6a10:1a4d:0:0:0:0 with SMTP id nk13csp2200430pxb; Thu, 3 Feb 2022 01:17:23 -0800 (PST) X-Google-Smtp-Source: ABdhPJzWtY47eBavxn0x8bd3oIQ0HI6I130IVsDm/Q1z/eTTkFIVyUpZ/ksny/9kZyKZQkQ6ixEx X-Received: by 2002:a05:6a00:88e:: with SMTP id q14mr3826415pfj.47.1643879842812; Thu, 03 Feb 2022 01:17:22 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1643879842; cv=none; d=google.com; s=arc-20160816; b=wXbOEJ9Q3bkGf3ju33Z2t5wfF6XeKivco3cwjHQjWu4jbbKGl9s8miMCtJTsxS0iAn uuRwjsmc9VldB+cJd5gGarUwUe9j7DbZB3Us9Yw3YfFLgAIkqrzTV9uRcqMJgajc3CFf p1/lQsssJpz9DLE9OwNvmHGcWKBj9Qd4F3asjYjvszs6AK4FQGVXiCdeVIGaNbmnxitr Jz96Il+/hepAN5xgAVK5kzqmgcmoXCsoDDPXRhfXecYeAcq8tQOKpuGmxyIidzPgmZAC 9m2z0ng8sKVCIitO4aI+mfDNquwxnBSU617NNVSXBPa+gw5rO+lW9bqCqIVDbbmQzx+h OHxw== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:content-transfer-encoding:in-reply-to:from :references:cc:to:content-language:subject:user-agent:mime-version :date:message-id:dkim-signature; bh=f0ow7OhvPHO62CtY/qyYiL8XWSa1Avspao6Gho1V2I8=; b=bLkBkZWWJ6P6ae2fWMHCx4ZPK0dUDOb4Okt2tTCZtjY9jjDwHhii1P8a8skIAUROz0 f7+mJTzvr/8nQR/lHCvXmln6ntkFHL+N6OgMT6mW4G91nuYfNIJ2lQhnSz1RhrpAScgx CjKMjIGq5ahMPlP5zV4GtgU/pqwQF3xAPfFoVgM/hxWT7ZBL0NaQB3349SXnxWgnJj6w HC0Pz5k26t8zdJ0NGmiko16ejFq+Qq67vbV3wbmkedR9UclZ2s2jfD9BMhPeSiDtd5Td uL4/bKtmaYbOgaKZhzQ155KkC5WkEG1M9RxWvDpBudmZTu5e1pykuO9PSStUP9PH1BB9 ogSw== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@redhat.com header.s=mimecast20190719 header.b=agkRmmpW; 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=NONE sp=NONE dis=NONE) header.from=redhat.com Return-Path: Received: from out1.vger.email (out1.vger.email. [2620:137:e000::1:20]) by mx.google.com with ESMTP id e21si21453697plj.121.2022.02.03.01.17.09; Thu, 03 Feb 2022 01:17:22 -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=@redhat.com header.s=mimecast20190719 header.b=agkRmmpW; 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=NONE sp=NONE dis=NONE) header.from=redhat.com Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1345836AbiBBQ3t (ORCPT + 99 others); Wed, 2 Feb 2022 11:29:49 -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