Received: by 2002:a05:7412:8d10:b0:f3:1519:9f41 with SMTP id bj16csp3536484rdb; Sun, 10 Dec 2023 09:29:13 -0800 (PST) X-Google-Smtp-Source: AGHT+IGQElRwdaJ9y14x07S4NXiElfija2wOhs07bmV6li9B/JxX85wOMKsp8haUbmnnYQVPa5Ps X-Received: by 2002:a17:903:32d0:b0:1d0:8be8:bb6a with SMTP id i16-20020a17090332d000b001d08be8bb6amr3686094plr.67.1702229353050; Sun, 10 Dec 2023 09:29:13 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1702229353; cv=none; d=google.com; s=arc-20160816; b=tsckTOeIpk2QVuLg4P0TQqNVQ5NshT6gkzSY6ulix9S8Tc1K1L5mhjJ0S4VIqLITb+ oQHGprDgCa8DmzuVmFzFHMr9YhyA2OaIzs/X3b9whB0izZQ1JJ528mFKMP+N9NMnr7SD bNzXfDhnPK9ajV8MfWLlaVNoiE45O2WkFGr0nk3sC91FEPjRFdKiXW/svxK/ORQHBBEG 0DrCN79A7DPvnLgr6C2D0WOvk9acTsWufFz8TFpVFxbVVF1juzO/LEGS6BxdvRiUbyox tHAwwALaKcUiM73FIrNRkZEQbOifVAqdDFCde/Rz6PPPClOjUOtYOCxSaG7BWUK6RGwN U+hQ== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:content-transfer-encoding:in-reply-to:from :references:cc:to:content-language:subject:user-agent:mime-version :date:message-id:dkim-signature; bh=pAEfL9IM7IOsD762SsoxfL46L0Pb8XpGBmHLvK98JrY=; fh=OxKBaZY+KlYuTji5QnxRFZIo+yQmPsubRUDuMfcIgYE=; b=I2ek56r3+7xNy1kb53XPjJEv6j1QEwty4ajTkOVIFw2FBnUC7EGAPb9fwQDrIxPtjT iGG53JhEVPn67LRArFLXSE2qMYXR9w3baosFeUVb7O0I92snMrl+3gJHKvH6rzwvdmqF y0PB73mXYSkg1sozHeEMdJzZNJuuQrlbmXc6y68Pu9f6costm+Bp+HWGmOl5vgp4N1vi mSBa6Njbaq/hL4n9s49Sp54cSWr4YtjRfof928rOFUXjUh8wI1vM5PEFhffmORPa5QjQ W+gXCj12OW9eB+BsaAZwyQaqA5huvexLJ42KXTcV6d3zrgtG9Ln/WBbxsM91HOhVrSaE 7xYg== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@efficios.com header.s=smtpout1 header.b=GjReLuVp; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.38 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=efficios.com Return-Path: Received: from fry.vger.email (fry.vger.email. [23.128.96.38]) by mx.google.com with ESMTPS id n8-20020a170903110800b001d0af6323f6si4894538plh.409.2023.12.10.09.29.12 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Sun, 10 Dec 2023 09:29:13 -0800 (PST) Received-SPF: pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.38 as permitted sender) client-ip=23.128.96.38; Authentication-Results: mx.google.com; dkim=pass header.i=@efficios.com header.s=smtpout1 header.b=GjReLuVp; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.38 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=efficios.com Received: from out1.vger.email (depot.vger.email [IPv6:2620:137:e000::3:0]) by fry.vger.email (Postfix) with ESMTP id 83CCA807933E; Sun, 10 Dec 2023 09:29:10 -0800 (PST) X-Virus-Status: Clean X-Virus-Scanned: clamav-milter 0.103.11 at fry.vger.email Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S231784AbjLJR2c (ORCPT + 99 others); Sun, 10 Dec 2023 12:28:32 -0500 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:36778 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S229462AbjLJR2b (ORCPT ); Sun, 10 Dec 2023 12:28:31 -0500 Received: from smtpout.efficios.com (smtpout.efficios.com [167.114.26.122]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id EC165E1; Sun, 10 Dec 2023 09:28:35 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=efficios.com; s=smtpout1; t=1702229313; bh=1sxAue1XcnwrHliRU3dD99r4/Lzb8pcdMONvaCHfTVU=; h=Date:Subject:To:Cc:References:From:In-Reply-To:From; b=GjReLuVpP94+KS1Vlcj4pqXgnF6dqhh8iYWfUa2wjhB2OOxtkqk82gnqkvWCC/UBo IwPIXQ6jmvu/FlBQu16pMPlI9KmRkhUArIxzoI2Lf9ySWQ5c+DC+alg9yU08ATabag li/PamLxlee3uBuXw0D74XYht4TKLx1xbrKFU1wH55xATBfusm/dhUaAEIdSxOCoqW kZ0Hg1R/+lwKYLT7WxHTCJ76Jf963yzjjRYRRl0UDuzEMNiOK95VJnVSgbprscbJcA GQuFWxgQiVa0J80sC24xbepSKAp7uWSU5ByFb2UbJbjOnazfQwwlQiboea7es0uzCK mk0Pp5s7PFK0Q== Received: from [IPV6:2606:6d00:100:4000:cacb:9855:de1f:ded2] (unknown [IPv6:2606:6d00:100:4000:cacb:9855:de1f:ded2]) by smtpout.efficios.com (Postfix) with ESMTPSA id 4SpBg555pvzG4T; Sun, 10 Dec 2023 12:28:33 -0500 (EST) Message-ID: Date: Sun, 10 Dec 2023 12:28:32 -0500 MIME-Version: 1.0 User-Agent: Mozilla Thunderbird Subject: Re: [PATCH] tracing: Allow for max buffer data size trace_marker writes Content-Language: en-US To: Steven Rostedt Cc: LKML , Linux Trace Kernel , Masami Hiramatsu , Mark Rutland References: <20231209175003.63db40ab@gandalf.local.home> <2683467e-cadb-4bb8-8c50-87ef052edacb@efficios.com> <20231210103009.29010d00@gandalf.local.home> <20231210113829.780c7097@gandalf.local.home> From: Mathieu Desnoyers In-Reply-To: <20231210113829.780c7097@gandalf.local.home> Content-Type: text/plain; charset=UTF-8; format=flowed Content-Transfer-Encoding: 7bit X-Spam-Status: No, score=-0.9 required=5.0 tests=DKIM_SIGNED,DKIM_VALID, DKIM_VALID_AU,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 fry.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 (fry.vger.email [0.0.0.0]); Sun, 10 Dec 2023 09:29:10 -0800 (PST) On 2023-12-10 11:38, Steven Rostedt wrote: > 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. My point is that the difference between the new "enhanced" behavior and the previous behavior is not tested for. > >> >> 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. Yes. This is pretty much my point. > But it's always > been allowed to break up that write however it wanted to. And the enhanced behavior extends the amount of data that can get written into a single sub-buffer, and this is not tested. > > 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. Which is why in the following patches you have expressing the subbuffer size as bytes rather than pages is important at the ABI level. It facilitates portability of tests, and decreases documentation / user burden. > Again, it's not a requirement, it's just an enhancement. How does this have anything to do with dispensing from testing the new behavior ? If the new behavior has a bug that causes it to silently truncate the trace marker payloads, how do you catch it with the current tests ? Thanks, Mathieu -- Mathieu Desnoyers EfficiOS Inc. https://www.efficios.com