Received: by 2002:a05:7412:8d10:b0:f3:1519:9f41 with SMTP id bj16csp3514698rdb; Sun, 10 Dec 2023 08:38:24 -0800 (PST) X-Google-Smtp-Source: AGHT+IE7v0+ZdK0N7kiEc36TjS9jbnQ9GB2aQ0yY5JBORNyUO4STj7Q+LlWqUJTcZKKm7XdpI5Qt X-Received: by 2002:a05:6e02:b4f:b0:35d:57de:1e42 with SMTP id f15-20020a056e020b4f00b0035d57de1e42mr5984745ilu.6.1702226304003; Sun, 10 Dec 2023 08:38:24 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1702226303; cv=none; d=google.com; s=arc-20160816; b=LD1TeFMouQPKZBR6xwxtwMJbPLf6EXM3zfH8p0yL3NxpA8g1zrX/p66zTUY108vipI bLSNdz4sB0074mYqLUQNXD/kazq1zoOxSHpSPwJmktxHmVzrce3ss3JuakF7G1a86oGr iNiqqQW/ST2uPvr3Q6XFZCp6ncQfPWEfFMN9U6XN8Q8KoW0oEyiZBQHD0aNKTI/BCSdB i3TUq/GoZhFSwBHpsE3F+nhkCN5XQRjA1jyaOkmiFd0ygxWXIjnTL1fn4IkGOIr0A1Ui Z0O3gSNB0OiGXqtkk2QnFJZamJm4jC5FEx0e0w1qWDMdAyBhoqEahXlz4XfHt4Do1541 w0Qw== 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=yDCTgcD1Ti+dEmsTIXUTFnNrfO9zjocxJ0sWkrEiDJg=; fh=DXqSFHFMGWs8NWhSKawAW+CcN1HWregSaTKgaWTRpeY=; b=XKc4R/4Q4eCMgxUwj5W8MlYSAYdFAP14L/Q8tZY8YIeRzxenELQ/xKYj/ZdrJ5yd6k Mc9Kcbg7DqDqkpP32BWMTJK7K3dUcr5qM46IazsXzdfm+/pJ9Acgjvtqi1xeNLQXSQV7 P++FtWb2YuvpkZU+ILDt5qJPIL8kgfsPqijwopvW3gxyQk8wwxpUsVkGb9tbrQB4FzRL l7G+qDzDpezSW8mF1SuPxJTLK3WwZRka4Xt/EesDogPjWPPatWuEulpMrRKe3k60c4UB ikmdUMJyE0FFMsztDuNUJnOR3VRVpYTszHHgyEsusuN7h+R5AKGSxHOQZY/rbg+S0KKF 0bjQ== ARC-Authentication-Results: i=1; mx.google.com; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.34 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org Return-Path: Received: from howler.vger.email (howler.vger.email. [23.128.96.34]) by mx.google.com with ESMTPS id 80-20020a630253000000b005c1f51c706bsi4485758pgc.599.2023.12.10.08.38.23 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Sun, 10 Dec 2023 08:38:23 -0800 (PST) Received-SPF: pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.34 as permitted sender) client-ip=23.128.96.34; Authentication-Results: mx.google.com; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.34 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 howler.vger.email (Postfix) with ESMTP id 44AE0807863D; Sun, 10 Dec 2023 08:38:21 -0800 (PST) X-Virus-Status: Clean X-Virus-Scanned: clamav-milter 0.103.11 at howler.vger.email Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S231843AbjLJQhs (ORCPT + 99 others); Sun, 10 Dec 2023 11:37:48 -0500 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:34182 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S231755AbjLJQhr (ORCPT ); Sun, 10 Dec 2023 11:37:47 -0500 Received: from smtp.kernel.org (relay.kernel.org [52.25.139.140]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id CF3B8F2 for ; Sun, 10 Dec 2023 08:37:53 -0800 (PST) Received: by smtp.kernel.org (Postfix) with ESMTPSA id B9CE1C433C7; Sun, 10 Dec 2023 16:37:52 +0000 (UTC) Date: Sun, 10 Dec 2023 11:38:29 -0500 From: Steven Rostedt To: Mathieu Desnoyers Cc: LKML , Linux Trace Kernel , Masami Hiramatsu , Mark Rutland Subject: Re: [PATCH] tracing: Allow for max buffer data size trace_marker writes Message-ID: <20231210113829.780c7097@gandalf.local.home> In-Reply-To: References: <20231209175003.63db40ab@gandalf.local.home> <2683467e-cadb-4bb8-8c50-87ef052edacb@efficios.com> <20231210103009.29010d00@gandalf.local.home> 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 howler.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 (howler.vger.email [0.0.0.0]); Sun, 10 Dec 2023 08:38:21 -0800 (PST) On Sun, 10 Dec 2023 11:07:22 -0500 Mathieu Desnoyers wrote: > > It just allows more to be written in one go. > > > > I don't see why the tests need to cover this or detect this change. > > If the purpose of this change is to ensure that the entire > trace marker payload is shown within a single event, then > there should be a test which exercises this, and which > validates that the end result is that the entire payload > is indeed shown within a single event record. No, the purpose of the change is not to do that, because there can always be a bigger trace marker write than a single event can hold. This is the way it has always worked. This is an optimization or "enhancement". The 1KB restriction was actually because of a previous implementation years ago (before selftests even existed) that wrote into a temp buffer before copying into the ring buffer. But since we now can copy directly into the ring buffer, there's no reason not to use the maximum that the ring buffer can accept. > > Otherwise there is no permanent validation that this change > indeed does what it is intended to do, so it can regress > at any time without any test noticing it. What regress? The amount of a trace_marker write that can make it into a the buffer in one go? Now, I agree that we should have a test to make sure that all of the trace marker write gets into the buffer. But it's always been allowed to break up that write however it wanted to. Note, because different architectures have different page sizes, how much that can make it in one go is architecture dependent. So you can have a "regression" by simply running your application on a different architecture. Again, it's not a requirement, it's just an enhancement. -- Steve