Received: by 2002:a05:7412:419a:b0:f3:1519:9f41 with SMTP id i26csp3934972rdh; Tue, 28 Nov 2023 07:36:04 -0800 (PST) X-Google-Smtp-Source: AGHT+IEcSpDGqngHwUzECsBwPr1I2K/tsJfbp1piqSalqvClJWnVXMGbOrQuFO/FkHUsyQkDXAhR X-Received: by 2002:a17:902:d5cb:b0:1cf:5629:a0c6 with SMTP id g11-20020a170902d5cb00b001cf5629a0c6mr13531571plh.13.1701185763994; Tue, 28 Nov 2023 07:36:03 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1701185763; cv=none; d=google.com; s=arc-20160816; b=CByYWq2ddoTutt7mJBxsJasy2OaFFDNrHxeClqAuayWJUhPnRWMeDbEtGos5bnqyNy wbooHkOJnNBxpJ8OHwcZygyevfN6fuK1qn2LYyCiLklr2pghrbiCI+itGdj1GWS1n8OX RGYjqyKK9TRgogs/YM0s2VW0vN0Pad2fR8NvPbfWRAF5k2PFEPfwhtskxX6lTScapQYk kAN43c1Xo1EyiT4f63gKfJ4Rs6MwJyajLHYs/gH6wC+jYdRoKUCSjzBsFREkiLHuGCDQ HLILCWwoyLnpooIZlZYJdI9pqejqS60U45it28yI27hEJ7VN1f5Trar0c57LuU+3UFGV Es4g== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:content-transfer-encoding:mime-version :references:in-reply-to:message-id:subject:cc:to:from:date; bh=F5LD1IFOMx5BA3jSSZ+OHAi1G9cQhhJfs5+0PelMwB8=; fh=s/qgI0ixBNrKgtggrKcDZsbKAL3r7pkxf9cLWUFtGJI=; b=x5jrfyethpCtgXWHlBKh82LUAZujRCE19FyRrfHWhKvDVrOPPEl5Im1h8qH4ERVCz+ 4/x6Pd4RpA1opfM1H/qqYVFba3fOT4IjBZopxSnyrkW3KJXqEmjwGA6M0oVo6ep0QkJg muAnPyrLqhW8sRSiBbrMTi6b/Yd93gFmvCMv928cu+A6t/38LZ5ku66ndB2oNQYyujaO /TRTceZ7C0e5YhVHn8WrDi5Q3K3V8plaw/DeJQP/PKepDTHfKC8MxltTFO08jlhe+cAQ kEL0XQyGURvrdxacBRc815WgwWFnavNVqdhysiOw4a0rP0YVIZQfiRN65IdaamZdFyi4 OHJg== ARC-Authentication-Results: i=1; mx.google.com; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.33 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org Return-Path: Received: from lipwig.vger.email (lipwig.vger.email. [23.128.96.33]) by mx.google.com with ESMTPS id y2-20020a170902ed4200b001b3d6c68bd1si11607996plb.643.2023.11.28.07.36.03 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Tue, 28 Nov 2023 07:36:03 -0800 (PST) Received-SPF: pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.33 as permitted sender) client-ip=23.128.96.33; Authentication-Results: mx.google.com; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.33 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org Received: from out1.vger.email (depot.vger.email [IPv6:2620:137:e000::3:0]) by lipwig.vger.email (Postfix) with ESMTP id 231E5807C56E; Tue, 28 Nov 2023 07:35:34 -0800 (PST) X-Virus-Status: Clean X-Virus-Scanned: clamav-milter 0.103.11 at lipwig.vger.email Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1346843AbjK1PfS (ORCPT + 99 others); Tue, 28 Nov 2023 10:35:18 -0500 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:58462 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1346839AbjK1PfR (ORCPT ); Tue, 28 Nov 2023 10:35:17 -0500 Received: from smtp.kernel.org (relay.kernel.org [52.25.139.140]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id CFB9710CA for ; Tue, 28 Nov 2023 07:35:23 -0800 (PST) Received: by smtp.kernel.org (Postfix) with ESMTPSA id 84687C433C7; Tue, 28 Nov 2023 15:35:22 +0000 (UTC) Date: Tue, 28 Nov 2023 10:35:44 -0500 From: Steven Rostedt To: "Masami Hiramatsu (Google)" Cc: LKML , Linux Trace Kernel , Mark Rutland , Mathieu Desnoyers , dmaluka@google.com, Sean Paul , Arun Easi , Daniel Wagner Subject: Re: [RFC][PATCH] tracing: Allow creating instances with specified system events Message-ID: <20231128103544.2ef0d584@gandalf.local.home> In-Reply-To: <20231129001738.5041154000c4c1df58f6c7a1@kernel.org> References: <20231127174108.3c331c9c@gandalf.local.home> <20231129001738.5041154000c4c1df58f6c7a1@kernel.org> X-Mailer: Claws Mail 3.19.1 (GTK+ 2.24.33; x86_64-pc-linux-gnu) MIME-Version: 1.0 Content-Type: text/plain; charset=US-ASCII Content-Transfer-Encoding: 7bit X-Spam-Status: No, score=-0.8 required=5.0 tests=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 lipwig.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 (lipwig.vger.email [0.0.0.0]); Tue, 28 Nov 2023 07:35:34 -0800 (PST) On Wed, 29 Nov 2023 00:17:38 +0900 Masami Hiramatsu (Google) wrote: > Hi Steve, > > On Mon, 27 Nov 2023 17:41:08 -0500 > Steven Rostedt wrote: > > > From: "Steven Rostedt (Google)" > > > > A trace instance may only need to enable specific events. As the eventfs > > directory of an instance currently creates all events which adds overhead, > > allow internal instances to be created with just the events in systems > > that they care about. This currently only deals with systems and not > > individual events, but this should bring down the overhead of creating > > instances for specific use cases quite bit. > > This sounds good, but can the eventfs reduce such overhead because > if the user doesn't touch the actual event, the event dentry will > be released soon? Yes, but this also removes the creation of the meta data behind it. Which has a descriptor for every event. And since there are over a thousand events, this is still quite a bit of savings. It also removes the eventfs_inode that represents each directory. > > Note, this may also be useful for creating instances in the eventfs, but > > I'm not sure how to do this there. I could add a deliminator: > > > > mkdir /sys/kernel/tracing/instances/foo::sched,timer > > Can we limit this after making an instance? In that case, we can use > rmdir to remove unused "systems" directories. Or, maybe we can create > it afterwards with mkdir or use comand to a pseudo file. > > echo sched:* timer:* > instances/foo/available_events That, or I even thought of allowing rmdir on event systems, and even mkdir. # cd instance/foo/events # rmdir * # mkdir sched timer -- Steve