Received: by 2002:a05:7412:b10a:b0:f3:1519:9f41 with SMTP id az10csp365321rdb; Thu, 30 Nov 2023 06:59:21 -0800 (PST) X-Google-Smtp-Source: AGHT+IHL76BlGV0Ngxk92yYQJLy5yMf84ARPJfEP8TW10W3c1MrCyLACIpi0MFAK9KmPJtSGHLz6 X-Received: by 2002:a17:902:d303:b0:1cc:5691:5113 with SMTP id b3-20020a170902d30300b001cc56915113mr23720268plc.26.1701356361013; Thu, 30 Nov 2023 06:59:21 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1701356360; cv=none; d=google.com; s=arc-20160816; b=aBWgVPZyd5wdIxmqCZ6QB22N9mYK73VqTzNZ1uSIT4wnKmUONzzZAfKaNF45J9BHrA PYAewZAe9ZUXWlx2rhzVRxjpgtxyIcYQ7DJStc+DctRsVzY3sICVabcFe/WbJrnKJK3G KUh7KEQ1DUhV7MtSX2y+ilJnlx/gF2WauLvXK1oKG0Ayu54HgrOHPiKLh5b80pBUKX4q liuYLpGpaMVSwz96Q46EbQjFrz0FF8VdCb6LN8z7oUVfoPa0MCRSE9m2TbKnY55XQdBf /tGGBTVreeHVHCsUNR/6ij9dG+eV6YVNFhm2rAt6AxsDfRNBf6j8ombEJQR5gMGAf/Ny PAmw== 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 :dkim-signature; bh=anwzb0IfcTwLgmjjELnREgi7poOVFjjci8rak8hmjbk=; fh=FqfDQTecQdd6MDLJJpo3Gs+U5Dx223V4blNYIpNV0Yo=; b=jUeHR+Wh5AE+CvB0OwM+l7yRBOdDXlZeUo3hwuMi0zSokRjFwVHnsN7pGaxGgn950h 6knhumN+gxTjZHr9HTxX8VzbiOX0DbHv0aBvFL4HhE76AwKAxtfBQuT5J5ozSd5o0sgh tKEPajQ0WxMqlWEC/lgMSDbnQ6t8dSE/LJv+rQsSgw+xnBEH87B2IzcsMD77hw/aDHxj waKYHXN4XODEOG49Hk/q7Q8eUKEmbeeQpjwIgRhepOInV/rGk2iYwmTtfWWFE0S30JoZ 7Q81cN5CHQkdoBaqopjzwaCZsglk9631kQorRj5e2+Qotcgt1ISPlbBL0E1ZAI10vDkJ CoCQ== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@kernel.org header.s=k20201202 header.b=j8Gc1JD6; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::3:6 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=kernel.org Return-Path: Received: from pete.vger.email (pete.vger.email. [2620:137:e000::3:6]) by mx.google.com with ESMTPS id o4-20020a170902bcc400b001c0c79b3869si252903pls.578.2023.11.30.06.59.20 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Thu, 30 Nov 2023 06:59:20 -0800 (PST) Received-SPF: pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::3:6 as permitted sender) client-ip=2620:137:e000::3:6; Authentication-Results: mx.google.com; dkim=pass header.i=@kernel.org header.s=k20201202 header.b=j8Gc1JD6; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::3:6 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=kernel.org Received: from out1.vger.email (depot.vger.email [IPv6:2620:137:e000::3:0]) by pete.vger.email (Postfix) with ESMTP id 36E5082A7E13; Thu, 30 Nov 2023 06:59:18 -0800 (PST) X-Virus-Status: Clean X-Virus-Scanned: clamav-milter 0.103.11 at pete.vger.email Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S235241AbjK3O7C (ORCPT + 99 others); Thu, 30 Nov 2023 09:59:02 -0500 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:55720 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S235264AbjK3O6z (ORCPT ); Thu, 30 Nov 2023 09:58:55 -0500 Received: from smtp.kernel.org (relay.kernel.org [52.25.139.140]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 9E923172D for ; Thu, 30 Nov 2023 06:58:58 -0800 (PST) Received: by smtp.kernel.org (Postfix) with ESMTPSA id 0CE65C433C8; Thu, 30 Nov 2023 14:58:55 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=kernel.org; s=k20201202; t=1701356338; bh=Fi+PXbFeaElSMsJ85ZgC4fiBmvsEM9ElGQ2yDWOBSwg=; h=Date:From:To:Cc:Subject:In-Reply-To:References:From; b=j8Gc1JD6u2c5eeZjTJtjzejxJmsZctNa2jWwdImxvAN12/Rho7yWrgwCjDMhUveyS Fb9MpgGkdd2Dgmk1b1EG5qcDy+HXt+dFAWGui91lsvLoDmfUl7kg2ufIF0L6d3D7wX zaenxtk7LJU8Pvf4/eBaPu1vYn537Xw8KE+uJiIf/cVhMDLceCDN1IDz5nbXlZBFhe cC4Cq2jSoseytIw6D2xXwojtRKawIJDpHncBhhbdA/tVcn8QKBv486TUEyZyLY+Byq 7rIA2JyqUJk90QyWN/i8Ie31x+y16U7GYx4KU+TM2Etl3/zqaOn5RBgpv6pzj813Xu O2rwI6tIYSOfg== Date: Thu, 30 Nov 2023 23:58:53 +0900 From: Masami Hiramatsu (Google) To: Steven Rostedt Cc: LKML , Linux Trace Kernel , Mark Rutland , Mathieu Desnoyers , dmaluka@google.com, Sean Paul , Arun Easi , Daniel Wagner Subject: Re: [PATCH] tracing: Allow creating instances with specified system events Message-Id: <20231130235853.0d41c12583548472c9df8dcd@kernel.org> In-Reply-To: <20231129102545.56901df5@gandalf.local.home> References: <20231128122117.2276f4a7@gandalf.local.home> <20231129235821.d99da161644525a2fa988938@kernel.org> <20231129102545.56901df5@gandalf.local.home> X-Mailer: Sylpheed 3.7.0 (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=-3.4 required=5.0 tests=DKIMWL_WL_HIGH,DKIM_SIGNED, DKIM_VALID,DKIM_VALID_AU,DKIM_VALID_EF,MAILING_LIST_MULTI,NICE_REPLY_A, 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 pete.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 (pete.vger.email [0.0.0.0]); Thu, 30 Nov 2023 06:59:18 -0800 (PST) On Wed, 29 Nov 2023 10:25:45 -0500 Steven Rostedt wrote: > On Wed, 29 Nov 2023 23:58:21 +0900 > Masami Hiramatsu (Google) wrote: > > > > - Dynamic events had to be specified directly to still allow them to be > > > created. > > > > I have a question about this point. Does this mean the dynamic event files > > will be created in the instance which limits the "system"? > > For this point, I would like to allow limiting dynamic events on instance too. > > If user needs to use specific one, e.g. synthetic, then it is possible to > > add it to the filter. > > I'm going back and forth on this. Here's my thoughts about it. > > Arguments for allowing all dynamic events: > > 1. There's not many. This code is basically a way to keep the overhead of > an instance down. By removing all static events, it can substantially lower > the memory footprint. > > As synthetic events are user created, there shouldn't be too many that > would cause a memory foot print issue, and the user also has a bit of > control of what events are created. Sometimes synthetic event user != instance user. (Only the privileged user will do, but maybe done by different program.) > 2. We have no idea what a user may want to do with those events. What if > the user wants to see an event in that buffer and creates a synthetic > event for it? Should the kernel create a policy for that? I think it is enough to give a choice to user. User can enable events under synthetic, probes, etc. by mkdir later. IIUC, current implementation forcibly exposes all dynamic events. > > Arguments against defaulting dynamic events in: > > 1. The list is created in the kernel. The instance is not created by the > user and thus the kernel could have more control over it. > > 2. If the user really wants to have dynamic events, they can create another > instance with the needed events or use the top level. > > Hmm, writing this out, I am now leaning more toward not defaulting dynamic > events in. And if we can create a way to dynamically add and remove events > systems from an instance (via mkdir and rmdir), this should not be an issue. Yeah, that's my point. If we allow all dynamic events, it needs to change the default behavior later. That will not be consistent. Thank you, > > Anyone else have any thoughts about this? > > -- Steve -- Masami Hiramatsu (Google)