Received: by 2002:a05:7412:419a:b0:f3:1519:9f41 with SMTP id i26csp181266rdh; Thu, 23 Nov 2023 00:19:58 -0800 (PST) X-Google-Smtp-Source: AGHT+IGD6wHMVPP5fmkR3HU8Y6S4iXBqW5g/vxXMxsNcKPhlgjziNyY/i50Liqpp+AR8R9AD2QON X-Received: by 2002:a05:6a20:a124:b0:187:5302:4b2e with SMTP id q36-20020a056a20a12400b0018753024b2emr6120542pzk.41.1700727597834; Thu, 23 Nov 2023 00:19:57 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1700727597; cv=none; d=google.com; s=arc-20160816; b=KB1AQ4EqWmkRBoYAIGpg4CU2+DHWCAFA23NpCHllPjNw/G5x+oFZz1n2PllOqO0ZO6 oyYvkJj6gCNWLy1Xv9H9KDrPyNbieBobc20RT+hr8DmGkbSdGcHwQL1tnzfGUPzlI9dz M1a8gDi30lCevD7gH3tMTxVXVFVfndQ9HhJjsVx5GGZdesw5znUkmZYIlIcmxnx68dTB CT6GuqMyjExkxXbn5ZpQ42qr3yjiza3K62NoRCqo8I2E0/MfyHc2Mv4Yc5l6vMMAAimP 1SXwCY12m6ksUhjhWI0RYIusdAqd5hTwEi4dx06HENIZY0FHsAAsqdVERSStkTP3wd8e x+fw== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:cc:to:from:subject:message-id:references :mime-version:in-reply-to:date:dkim-signature; bh=CrEIDOduhti6InSDnRypg+BVJxqG3xXbxgAmhP0hxmM=; fh=XzVMJLyEOqnFYQxQf6mNzYYQUPa8GCSIcZhG5eW1hzQ=; b=uswp3FKv+VWzZ14oYe0GpunlRLotD0AbFs2Pia6aYqz7TJ+MkRLBZG5fMdlmcolTEO eD94ZaAy+x7D5Mru/KJ83DPl3gmQ1csGxgLH/sMQC+Zx6ciqpy1lekGbXONBZ3FpebDT ofaSOUTPxKGS5XawIeCdXrINK0cNCGmYaws1Yh3Kfj0Td6rZxFumTqQQ3Pd1dfTaJ1Qr XAW8OHKEuVpxREI2TcJEc9bB6pTfDtrYxHvGtcg7Ag6W6ObG8Nl7Y4HoQh/mqto6dHKH AMsPPeJjcz+83b3zS2dujtJ1jjyxu/YMGjNaLwy7An4WtzjwARC9FPiuNS9eyPCMXI0s oypQ== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@google.com header.s=20230601 header.b=x2rkB6ud; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.37 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=REJECT sp=REJECT dis=NONE) header.from=google.com Return-Path: Received: from snail.vger.email (snail.vger.email. [23.128.96.37]) by mx.google.com with ESMTPS id t9-20020a170902e84900b001cf747e89c1si725437plg.145.2023.11.23.00.19.57 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Thu, 23 Nov 2023 00:19:57 -0800 (PST) Received-SPF: pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.37 as permitted sender) client-ip=23.128.96.37; Authentication-Results: mx.google.com; dkim=pass header.i=@google.com header.s=20230601 header.b=x2rkB6ud; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.37 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=REJECT sp=REJECT dis=NONE) header.from=google.com Received: from out1.vger.email (depot.vger.email [IPv6:2620:137:e000::3:0]) by snail.vger.email (Postfix) with ESMTP id BDD7D807C751; Thu, 23 Nov 2023 00:15:59 -0800 (PST) X-Virus-Status: Clean X-Virus-Scanned: clamav-milter 0.103.11 at snail.vger.email Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S230285AbjKWIPq (ORCPT + 99 others); Thu, 23 Nov 2023 03:15:46 -0500 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:35994 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S229477AbjKWIPo (ORCPT ); Thu, 23 Nov 2023 03:15:44 -0500 Received: from mail-pf1-x44a.google.com (mail-pf1-x44a.google.com [IPv6:2607:f8b0:4864:20::44a]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 771D2D41 for ; Thu, 23 Nov 2023 00:15:50 -0800 (PST) Received: by mail-pf1-x44a.google.com with SMTP id d2e1a72fcca58-6bf2b098e43so698444b3a.3 for ; Thu, 23 Nov 2023 00:15:50 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=20230601; t=1700727350; x=1701332150; darn=vger.kernel.org; h=cc:to:from:subject:message-id:references:mime-version:in-reply-to :date:from:to:cc:subject:date:message-id:reply-to; bh=CrEIDOduhti6InSDnRypg+BVJxqG3xXbxgAmhP0hxmM=; b=x2rkB6udHXM79Gx1VkF6RrzD0tkl8Be5FgtE3leLVPPPHRlc3EdNlXYMpWS1WCQu15 jpB9m/m1cj39LXqICa4WRPMBzhRmRC7MdKehkFEZ6SKY+Cr21d0Ohza5FhK8wi1FRGbk MwSle3fAAhUf8CUlZE5QA3qedYhd9XPLO7ebvQllVBP670LRNX2qrCXm94laDm3nVw+W SFnTAd/1AYN2Jr/Tr5yme7rKS6ARtt3VUC/3sNhFijq/dZomO18mOpRxQ/E+Th0vTpPH qJpY7AeLAVPnsYEJNmm3oh49t4jQj1w1hgwL4rT3aKTczffTP84nb03xP331TWGGfk/p ITbA== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1700727350; x=1701332150; h=cc:to:from:subject:message-id:references:mime-version:in-reply-to :date:x-gm-message-state:from:to:cc:subject:date:message-id:reply-to; bh=CrEIDOduhti6InSDnRypg+BVJxqG3xXbxgAmhP0hxmM=; b=M1zthULYdtOnuLYAw9zoD5G3PIWzyUGtY0smKWsvT5tMW0QS9D5AVT107CF6wFdNFm jMFsxTioBu2HlxaQm+nI2tLhtVudyU08gxlnvCSgrk8vaUmuKYTnxZJddPs4GxEDSr2L GZ3JUZeylwRewWN26LPEzsQ6XGNG7HnEW5nWuvygxzxZi28Y8QWOV5QCLmZ+Jdh01k4X GCVLuLrWCka4LT2CGGYaT0N6FnrDJQruQBS6n6UMfp8hbZm/NtfH0eETHGEvY0xJ6u7+ vQm8JyGWSy5dCj9VmESBLCJ2yU6FBPUR7Jp6tkoQ9POeLKSLACs5ZNfUGt3+U+zZK0a7 qZxw== X-Gm-Message-State: AOJu0Yxudgy0wiFzW+ohkPLLt9/BsP7M+vPGF5TEzqoPH02KbreS/Se+ wz8uS2tf/cfAFzZ1QO/QbGQzHR1ExCq8rw== X-Received: from shakeelb.c.googlers.com ([fda3:e722:ac3:cc00:7f:e700:c0a8:262e]) (user=shakeelb job=sendgmr) by 2002:a05:6a00:1da3:b0:6c4:ec00:2941 with SMTP id z35-20020a056a001da300b006c4ec002941mr1201225pfw.4.1700727349918; Thu, 23 Nov 2023 00:15:49 -0800 (PST) Date: Thu, 23 Nov 2023 08:15:47 +0000 In-Reply-To: <20231123080334.5owfpg7zl4nzeh4t@CAB-WSD-L081021> Mime-Version: 1.0 References: <20231122100156.6568-1-ddrokosov@salutedevices.com> <20231122100156.6568-2-ddrokosov@salutedevices.com> <20231123072126.jpukmc6rqmzckdw2@google.com> <20231123080334.5owfpg7zl4nzeh4t@CAB-WSD-L081021> Message-ID: <20231123081547.7fbxd4ts3qohrioq@google.com> Subject: Re: [PATCH v2 1/2] mm: memcg: print out cgroup name in the memcg tracepoints From: Shakeel Butt To: Dmitry Rokosov Cc: rostedt@goodmis.org, mhiramat@kernel.org, hannes@cmpxchg.org, mhocko@kernel.org, roman.gushchin@linux.dev, muchun.song@linux.dev, akpm@linux-foundation.org, kernel@sberdevices.ru, rockosov@gmail.com, cgroups@vger.kernel.org, linux-mm@kvack.org, linux-kernel@vger.kernel.org, bpf@vger.kernel.org Content-Type: text/plain; charset="us-ascii" X-Spam-Status: No, score=-9.6 required=5.0 tests=BAYES_00,DKIMWL_WL_MED, DKIM_SIGNED,DKIM_VALID,DKIM_VALID_AU,DKIM_VALID_EF,RCVD_IN_DNSWL_NONE, SPF_HELO_NONE,SPF_PASS,T_SCC_BODY_TEXT_LINE,USER_IN_DEF_DKIM_WL autolearn=unavailable autolearn_force=no version=3.4.6 X-Spam-Checker-Version: SpamAssassin 3.4.6 (2021-04-09) on lindbergh.monkeyblade.net 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 (snail.vger.email [0.0.0.0]); Thu, 23 Nov 2023 00:15:59 -0800 (PST) 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.