Received: by 2002:a05:7412:419a:b0:f3:1519:9f41 with SMTP id i26csp260108rdh; Thu, 23 Nov 2023 03:22:18 -0800 (PST) X-Google-Smtp-Source: AGHT+IE0iCItmjgcA9FNhfZjcXTkuaXHHg7maYG34llspYvwlhOU28QywqE9L0p4RT6A44k59Rpv X-Received: by 2002:a17:90b:4a50:b0:280:65ed:dfe with SMTP id lb16-20020a17090b4a5000b0028065ed0dfemr5264144pjb.23.1700738537832; Thu, 23 Nov 2023 03:22:17 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1700738537; cv=none; d=google.com; s=arc-20160816; b=vG6S1h+XSgGWh4LvFU06yE+HOWx2b9nkXMjUtUVMUf7F7hq3jecuHfDpvzT8df//Lh 0p21VZLaQ4ta4CQBNHmG1eagSpzBgc9KMxNepEeXikrR3aSkdYDt0qdrmSb/hKOX8eIT PR9vvLzJgOw5+Gf5PS5R/p7kk+6roU+Yavey9dmtH+SNIVMBbxNqSepWN4v/FkSx5wv5 EvTemSMvBpvnT15+zZWW1lFcB97UBOUrDT+fzVhSgE+8y1sQTCeJLZ8MeXrCD28mOnf7 xHmpwAPvI/KI6MjsNj0YQPw0leTOsGfZZWLqfEvsqmJ8dzNa/RatGjqs7psZQcJ0oWqX gBWg== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:user-agent:in-reply-to:content-disposition :mime-version:references:message-id:subject:cc:to:from:date :dkim-signature:dkim-filter; bh=Vn+apVzXsEM6pqvtCgpqeXfkP+wK1W/P560NUnnIQWw=; fh=+S6jYKQofpqFY3GIqSLJSt8+bEIrqANTNVz3XlYQPHY=; b=V6GfBt81uxKfbEwRN5WmC8rI4rVcOvZTqCFaPEQF+OMr6e7L0SDO1/MBBw1qSCZmLZ yqbseGwhlERiNAAT/XVQfGqB8+CrIOoBOxYrgmIhpiC2gW+5Gv0DP8wboouckuVHR2WB vZsrZKc+DZFW2pUq07/3XShydq+wK+QaIqSeZWYqP7XXJitzmw2KQseA38Wa5Cuf8d8I cTRrhgvfo5BgMIju1oFEdPC7kGoASfSHBdVlFEh/8v1BeCB4iM1e2migVmnx6v035v8r a/00kMsHW8cs9YmJbidQaEJwR7MGW0PV4+z3CpkPdnubxk3iQLDjmt+Q5CLh1fnYsA4S RCCQ== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@salutedevices.com header.s=mail header.b=gCrG99tM; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::3:1 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=QUARANTINE sp=QUARANTINE dis=NONE) header.from=salutedevices.com Return-Path: Received: from morse.vger.email (morse.vger.email. [2620:137:e000::3:1]) by mx.google.com with ESMTPS id co11-20020a17090afe8b00b0027b3755185dsi1568040pjb.99.2023.11.23.03.22.17 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Thu, 23 Nov 2023 03:22:17 -0800 (PST) Received-SPF: pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::3:1 as permitted sender) client-ip=2620:137:e000::3:1; Authentication-Results: mx.google.com; dkim=pass header.i=@salutedevices.com header.s=mail header.b=gCrG99tM; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::3:1 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=QUARANTINE sp=QUARANTINE dis=NONE) header.from=salutedevices.com Received: from out1.vger.email (depot.vger.email [IPv6:2620:137:e000::3:0]) by morse.vger.email (Postfix) with ESMTP id CC1BD80758E0; Thu, 23 Nov 2023 03:22:14 -0800 (PST) X-Virus-Status: Clean X-Virus-Scanned: clamav-milter 0.103.11 at morse.vger.email Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1345060AbjKWLV7 (ORCPT + 99 others); Thu, 23 Nov 2023 06:21:59 -0500 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:43104 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1345099AbjKWLVn (ORCPT ); Thu, 23 Nov 2023 06:21:43 -0500 Received: from mx1.sberdevices.ru (mx2.sberdevices.ru [45.89.224.132]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id A9943D6C; Thu, 23 Nov 2023 03:21:40 -0800 (PST) Received: from p-infra-ksmg-sc-msk02 (localhost [127.0.0.1]) by mx1.sberdevices.ru (Postfix) with ESMTP id 5DABC120003; Thu, 23 Nov 2023 14:21:37 +0300 (MSK) DKIM-Filter: OpenDKIM Filter v2.11.0 mx1.sberdevices.ru 5DABC120003 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=salutedevices.com; s=mail; t=1700738497; bh=Vn+apVzXsEM6pqvtCgpqeXfkP+wK1W/P560NUnnIQWw=; h=Date:From:To:Subject:Message-ID:MIME-Version:Content-Type:From; b=gCrG99tMe19Ma2XQZX1ZrXApT9lHM0RmaeJnK+ikOirwkyOLHbdW0T3SCq4RMakMz YTjh901E2O56zBcccytdOogebIZZqVtHZPxHkhRKLCvgje7gCky0Pqv6kQsx3EAH1s i9E2aCGP59MEwj5lNDzIa2EO+u6owlAOoJwSdCLtMJYYpWpTxXWY0a8euMGMBhXef1 J36qV8oONQzlLFd9wHo/LD0kE9Jq1hCZl/OsauD24GposE5t0uaLW63ymrd+4uSICA cb/DJ8cq2SQlYYC/rtV1cUh/iJTvPZ9PUwq6X8lppbaqf++BEh/B8pccZKKrYDkj9t lKyWHhsrXpC8Q== Received: from p-i-exch-sc-m01.sberdevices.ru (p-i-exch-sc-m01.sberdevices.ru [172.16.192.107]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by mx1.sberdevices.ru (Postfix) with ESMTPS; Thu, 23 Nov 2023 14:21:37 +0300 (MSK) Received: from localhost (100.64.160.123) by p-i-exch-sc-m01.sberdevices.ru (172.16.192.107) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.2.1118.40; Thu, 23 Nov 2023 14:21:37 +0300 Date: Thu, 23 Nov 2023 14:21:36 +0300 From: Dmitry Rokosov To: Shakeel Butt CC: , , , , , , , , , , , , Subject: Re: [PATCH v2 1/2] mm: memcg: print out cgroup name in the memcg tracepoints Message-ID: <20231123112136.n7qgkevgrracuk7m@CAB-WSD-L081021> References: <20231122100156.6568-1-ddrokosov@salutedevices.com> <20231122100156.6568-2-ddrokosov@salutedevices.com> <20231123072126.jpukmc6rqmzckdw2@google.com> <20231123080334.5owfpg7zl4nzeh4t@CAB-WSD-L081021> <20231123081547.7fbxd4ts3qohrioq@google.com> <20231123084510.wwnkjyrrbp5vltkg@CAB-WSD-L081021> MIME-Version: 1.0 Content-Type: text/plain; charset="us-ascii" Content-Disposition: inline In-Reply-To: <20231123084510.wwnkjyrrbp5vltkg@CAB-WSD-L081021> User-Agent: NeoMutt/20220415 X-Originating-IP: [100.64.160.123] X-ClientProxiedBy: p-i-exch-sc-m01.sberdevices.ru (172.16.192.107) To p-i-exch-sc-m01.sberdevices.ru (172.16.192.107) X-KSMG-Rule-ID: 10 X-KSMG-Message-Action: clean X-KSMG-AntiSpam-Lua-Profiles: 181556 [Nov 23 2023] X-KSMG-AntiSpam-Version: 6.0.0.2 X-KSMG-AntiSpam-Envelope-From: ddrokosov@salutedevices.com X-KSMG-AntiSpam-Rate: 0 X-KSMG-AntiSpam-Status: not_detected X-KSMG-AntiSpam-Method: none X-KSMG-AntiSpam-Auth: dkim=none X-KSMG-AntiSpam-Info: LuaCore: 3 0.3.3 e5c6a18a9a9bff0226d530c5b790210c0bd117c8, {Track_E25351}, {Tracking_from_domain_doesnt_match_to}, 127.0.0.199:7.1.2;d41d8cd98f00b204e9800998ecf8427e.com:7.1.1;p-i-exch-sc-m01.sberdevices.ru:7.1.1,5.0.1;salutedevices.com:7.1.1;100.64.160.123:7.1.2, FromAlignment: s, ApMailHostAddress: 100.64.160.123 X-MS-Exchange-Organization-SCL: -1 X-KSMG-AntiSpam-Interceptor-Info: scan successful X-KSMG-AntiPhishing: Clean X-KSMG-LinksScanning: Clean X-KSMG-AntiVirus: Kaspersky Secure Mail Gateway, version 2.0.1.6960, bases: 2023/11/23 09:18:00 #22508170 X-KSMG-AntiVirus-Status: Clean, skipped X-Spam-Status: No, score=-0.9 required=5.0 tests=DKIM_SIGNED,DKIM_VALID, DKIM_VALID_AU,HEADER_FROM_DIFFERENT_DOMAINS,MAILING_LIST_MULTI, SPF_HELO_NONE,SPF_PASS,T_SCC_BODY_TEXT_LINE autolearn=unavailable autolearn_force=no version=3.4.6 X-Spam-Checker-Version: SpamAssassin 3.4.6 (2021-04-09) on morse.vger.email Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org X-Greylist: Sender passed SPF test, not delayed by milter-greylist-4.6.4 (morse.vger.email [0.0.0.0]); Thu, 23 Nov 2023 03:22:14 -0800 (PST) Shakeel, On Thu, Nov 23, 2023 at 11:45:10AM +0300, Dmitry Rokosov wrote: > On Thu, Nov 23, 2023 at 08:15:47AM +0000, Shakeel Butt wrote: > > On Thu, Nov 23, 2023 at 11:03:34AM +0300, Dmitry Rokosov wrote: > > [...] > > > > > + cgroup_name(memcg->css.cgroup, > > > > > + __entry->name, > > > > > + sizeof(__entry->name)); > > > > > > > > Any reason not to use cgroup_ino? cgroup_name may conflict and be > > > > ambiguous. > > > > > > I actually didn't consider it, as the cgroup name serves as a clear tag > > > for filtering the appropriate cgroup in the entire trace file. However, > > > you are correct that there might be conflicts with cgroup names. > > > Therefore, it might be better to display both tags: ino and name. What > > > do you think on this? > > > > > > > I can see putting cgroup name can avoid pre or post processing, so > > putting both are fine. Though keep in mind that cgroup_name acquires a > > lock which may impact the applications running on the system. > > Are you talking about kernfs_rename_lock? Yes, it's acquired each > time... Unfortunatelly, I don't know a way to save cgroup_name one time > somehow... I delved deeper and realized that kernfs_rename_lock is a read-write lock, but it's a global one. While it's true that we only enable tracepoints during specific periods of the host's lifetime, the trace system is still a fast way to debug things. So, you're absolutely right, we shouldn't slow down the system unnecessarily. Therefore, today I will prepare a new version with only the cgroup ino. Thank you for pointing that out to me! -- Thank you, Dmitry