Received: by 2002:a05:6358:701b:b0:131:369:b2a3 with SMTP id 27csp4526797rwo; Tue, 25 Jul 2023 07:22:11 -0700 (PDT) X-Google-Smtp-Source: APBJJlGtlynJmLawhmz7F+G8RiPnVYHCnKXwpY9hzj72Fr0cCsuQgMxMJtn5BxKI0RY27vzwhRu/ X-Received: by 2002:a05:651c:21b:b0:2b6:e128:e7a3 with SMTP id y27-20020a05651c021b00b002b6e128e7a3mr8485328ljn.33.1690294931195; Tue, 25 Jul 2023 07:22:11 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1690294931; cv=none; d=google.com; s=arc-20160816; b=RsTJTNTmKfKJbB5pnEp2T/kebARiAmLPsNxj76VbXzOmx3DDUB52d5sDatwaanS40x X2FVHmLlBGGxRDoMdBAPZ9NSxsEoVlBgPw0DDHZOcvrCf83fbwm4WQtQP8e8It/NTvfF gaMQaRtcgOPR3Sg1I9DsUgwSZdw2t6QrUAiPcugxmad7uWrDotedRmrkZbHykRysHYDS m2Agyo01QVT8E0WenHg5TMZTQl9qljDatDq41lKXv35L/uWFGR4AQrYyDBcZEg0+B1/P JS/Sqb44J3eyK2nirvK0votNMUHKF222HUTZ6sxzVoTyJJki7NeOj2GdZtaeSBqBgzaN 5o+Q== 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=J8/twdbVnVALjyy6alnaVgEL7SCtymIvo2fO0lAEw1A=; fh=bxFacnFc++WMqNfq69nxUnuXN1eMpWgxEi0Vx894d4A=; b=PlbUPr7NvCPs7QTW49m2lxBHdbdGkAEPsrRMkTGJ693IfiOGKXQ2QbQjqEvHDKRUWG GTlhYHdaz4jLyUP7K06VvAKXlPu0+9alATM+jr/UZQcskjLtXuqMM+lyRukGqDvejyK1 Kt4CJY3uJB/vsIIDGSwlX9a+aykDMchTEhvxQk8Le9AKRHBR3/tFca4CzI8a27+c6lfv Fn2hKR7nqQXDgo7PGSn8Swh63fZnbGNZVItJ4xaN3Qa9HO7zeHZb6+teQg6wG0hEibma 0ErYE69ehfUcdXOPbTQ+7+CKCF8m4pxVOPqRUE9NQpffn28H5cdEn5082fOPx7rMXLjj y3pQ== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@suse.com header.s=susede1 header.b="qtdc/Dbz"; 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=QUARANTINE 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 f10-20020a170906084a00b0096f4deef5basi8094071ejd.649.2023.07.25.07.21.47; Tue, 25 Jul 2023 07:22:11 -0700 (PDT) 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="qtdc/Dbz"; 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=QUARANTINE dis=NONE) header.from=suse.com Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S232014AbjGYOHW (ORCPT + 99 others); Tue, 25 Jul 2023 10:07:22 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:54946 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S229813AbjGYOHV (ORCPT ); Tue, 25 Jul 2023 10:07:21 -0400 Received: from smtp-out1.suse.de (smtp-out1.suse.de [195.135.220.28]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id F36BE1BD6; Tue, 25 Jul 2023 07:07:19 -0700 (PDT) Received: from imap2.suse-dmz.suse.de (imap2.suse-dmz.suse.de [192.168.254.74]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature ECDSA (P-521) server-digest SHA512) (No client certificate requested) by smtp-out1.suse.de (Postfix) with ESMTPS id 99DDC22235; Tue, 25 Jul 2023 14:07:18 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=suse.com; s=susede1; t=1690294038; 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=J8/twdbVnVALjyy6alnaVgEL7SCtymIvo2fO0lAEw1A=; b=qtdc/DbznROvVm5FX3MMqXZU8IO/sm1dnPWwStcgf8XhwngPg/8F36cKRQCxhatKSPIlfZ +CDxXTnNzaFH/1RRe2u/5bP+Smx254C82UsNjI329f/rkl9GaBWT0AsChmjpADwDrINbLo F78flZYtWWIeNSgv/oDehdNdvzioFhk= Received: from imap2.suse-dmz.suse.de (imap2.suse-dmz.suse.de [192.168.254.74]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature ECDSA (P-521) server-digest SHA512) (No client certificate requested) by imap2.suse-dmz.suse.de (Postfix) with ESMTPS id 5CD5713487; Tue, 25 Jul 2023 14:07:18 +0000 (UTC) Received: from dovecot-director2.suse.de ([192.168.254.65]) by imap2.suse-dmz.suse.de with ESMTPSA id eFfHFRbXv2RvdgAAMHmgww (envelope-from ); Tue, 25 Jul 2023 14:07:18 +0000 Date: Tue, 25 Jul 2023 16:07:17 +0200 From: Michal =?utf-8?Q?Koutn=C3=BD?= To: Ivan Babrou Cc: Greg Kroah-Hartman , linux-fsdevel@vger.kernel.org, kernel-team@cloudflare.com, linux-kernel@vger.kernel.org, cgroups@vger.kernel.org, Tejun Heo , Hugh Dickins , Andrew Morton , Amir Goldstein , Christoph Hellwig , Jan Kara , Zefan Li , Johannes Weiner Subject: Re: [PATCH] kernfs: attach uuid for every kernfs and report it in fsid Message-ID: References: <20230710183338.58531-1-ivan@cloudflare.com> <2023071039-negate-stalemate-6987@gregkh> MIME-Version: 1.0 Content-Type: multipart/signed; micalg=pgp-sha512; protocol="application/pgp-signature"; boundary="7ajxxoxppngon7fy" Content-Disposition: inline In-Reply-To: X-Spam-Status: No, score=-4.4 required=5.0 tests=BAYES_00,DKIM_SIGNED, DKIM_VALID,DKIM_VALID_AU,DKIM_VALID_EF,RCVD_IN_DNSWL_MED,SPF_HELO_NONE, SPF_PASS,T_SCC_BODY_TEXT_LINE,URIBL_BLOCKED autolearn=ham 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 --7ajxxoxppngon7fy Content-Type: text/plain; charset=utf-8 Content-Disposition: inline Content-Transfer-Encoding: quoted-printable Hello. On Mon, Jul 10, 2023 at 02:21:10PM -0700, Ivan Babrou = wrote: > I want to monitor cgroup changes, so that I can have an up to date map > of inode -> cgroup path, so that I can resolve the value returned from > bpf_get_current_cgroup_id() into something that a human can easily > grasp (think system.slice/nginx.service). Have you considered cgroup_path_from_kernfs_id()? > Currently I do a full sweep to build a map, which doesn't work if a > cgroup is short lived, as it just disappears before I can resolve it. > Unfortunately, systemd recycles cgroups on restart, changing inode > number, so this is a very real issue. So, a historical map of cgroup id -> path is also useful for you, right? (IOW, cgroup_path_from_kernfs_id() is possible but it'd inflate log buffer size if full paths were stored instead of ids.) (I think a similar map would be beneficial for SCM_CGROUP [1] idea too.) > There's also this old wiki page from systemd: >=20 > * https://freedesktop.org/wiki/Software/systemd/Optimizations The page also states: > Last edited Sat 18 May 2013 08:20:38 AM UTC Emptiness notifications via release_agent are so 2016 :-), unified hiearchy has more convenient API [2], this is FTR. My 0.02=E2=82=AC, Michal [1] https://uapi-group.org/kernel-features/ [2] https://www.kernel.org/doc/html/latest/admin-guide/cgroup-v2.html?#un-p= opulated-notification --7ajxxoxppngon7fy Content-Type: application/pgp-signature; name="signature.asc" -----BEGIN PGP SIGNATURE----- iHUEABYKAB0WIQQpEWyjXuwGT2dDBqAGvrMr/1gcjgUCZL/XEgAKCRAGvrMr/1gc jnObAQCJ3C0hDVOfZEzkb1UOgnA4h3h266lsMaQDV8ICV1nHDQEAwyoY1QBjJ5E0 NgxyIDgfAir+2Th7xhf/1vF56yIvUA4= =a7jr -----END PGP SIGNATURE----- --7ajxxoxppngon7fy--