Received: by 2002:a89:2c3:0:b0:1ed:23cc:44d1 with SMTP id d3csp117880lqs; Mon, 4 Mar 2024 17:41:03 -0800 (PST) X-Forwarded-Encrypted: i=3; AJvYcCV2CQVCYcuhn+CgJEbOSq+SGEXCb1+drp6fKI/C95N0YYS/iD0KGT9ezZ486j2HSFApiJ+3mfhgsNGbLo/esV3cP0ItWtX0yJbTRRTIwQ== X-Google-Smtp-Source: AGHT+IEKnbH3C2uSr2hSOa51W4/1UDTXL+Nfj5jgPr47YwIfYy30+m89UOoE59fkLnCWEsWPBek4 X-Received: by 2002:a05:6808:187:b0:3c1:ea77:918 with SMTP id w7-20020a056808018700b003c1ea770918mr462163oic.32.1709602863666; Mon, 04 Mar 2024 17:41:03 -0800 (PST) ARC-Seal: i=2; a=rsa-sha256; t=1709602863; cv=pass; d=google.com; s=arc-20160816; b=F6xyfC2S8eKAflkDBUKYXBTBnf0ZYWzLndACtbOXCTF658pOT0ewpRjf+C8NrmQfI5 0jyRmNRtvACMUXGekab/AErRgTAbKCyNEfNskWJAXKa6NqiwBVz1heKX8NzmRQghCbkP yXOT8HEVuExP3b6VKK3LugSuqeiS0giLnEol8FGiLThUT+1l0NsIUbuLG4MG88msn92d 84rXsIFwOc3UTTzKqrI0PICzW7h2a5df+AxDonJkNpeEpjPy4fAnOLghXFJxAyeZ41nD 8wHh9JPDhDIHt+8wREsAry9o3W8ffjufdIjxVLfrEe9eQXdRwY+D4HgTWTTdNcZRvGL5 OKJQ== ARC-Message-Signature: i=2; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=content-transfer-encoding:mime-version:list-unsubscribe :list-subscribe:list-id:precedence:references:in-reply-to:message-id :subject:cc:to:from:date; bh=u1Zi6fnDLs6f9DBubmRfShs5/PuYhe0a3x2wfNevu3Y=; fh=5GSL8iMgAyuzpToQ7VTfMGDhy7T5RKF49tB9TFqJckE=; b=MRhQht2S4oeVrJPaGaxkR+w7aY7VWWt+HAqh1+S3c6TqKLdpmcbB5Vat4p4YCimZtZ 9YywwdsxHsWH4tJSKfss9cKBFegG8J6J6wbOn0o6SFBghFeqBRdZzytkoT3YuSBuUCSy Xztt1MXrC27HDxgkf86Tx3fGP4E9zcV4pB1+DNh4Zq0i7IjovIw0cOy9adogzjFXdKW/ /73QFwKC34FSsZVfKIyppgBXtr/7juSdn08Drx2pbkzaJUJrWgBm/6ztkGKnALplqI0D ztutA+jTb49EeR8AL5KcG5jz+jRF4ILYmpI70E+HFS6NUqFfQrAyHjpfUSw7+UmkE+yo 84YQ==; dara=google.com ARC-Authentication-Results: i=2; mx.google.com; arc=pass (i=1); spf=pass (google.com: domain of linux-kernel+bounces-91506-linux.lists.archive=gmail.com@vger.kernel.org designates 2604:1380:45e3:2400::1 as permitted sender) smtp.mailfrom="linux-kernel+bounces-91506-linux.lists.archive=gmail.com@vger.kernel.org" Return-Path: Received: from sv.mirrors.kernel.org (sv.mirrors.kernel.org. [2604:1380:45e3:2400::1]) by mx.google.com with ESMTPS id h12-20020a63e14c000000b005dc89957de5si9105628pgk.497.2024.03.04.17.41.03 for (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Mon, 04 Mar 2024 17:41:03 -0800 (PST) Received-SPF: pass (google.com: domain of linux-kernel+bounces-91506-linux.lists.archive=gmail.com@vger.kernel.org designates 2604:1380:45e3:2400::1 as permitted sender) client-ip=2604:1380:45e3:2400::1; Authentication-Results: mx.google.com; arc=pass (i=1); spf=pass (google.com: domain of linux-kernel+bounces-91506-linux.lists.archive=gmail.com@vger.kernel.org designates 2604:1380:45e3:2400::1 as permitted sender) smtp.mailfrom="linux-kernel+bounces-91506-linux.lists.archive=gmail.com@vger.kernel.org" Received: from smtp.subspace.kernel.org (wormhole.subspace.kernel.org [52.25.139.140]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by sv.mirrors.kernel.org (Postfix) with ESMTPS id 8F5202862CA for ; Tue, 5 Mar 2024 01:40:42 +0000 (UTC) Received: from localhost.localdomain (localhost.localdomain [127.0.0.1]) by smtp.subspace.kernel.org (Postfix) with ESMTP id 56FB21B81B; Tue, 5 Mar 2024 01:39:32 +0000 (UTC) Received: from smtp.kernel.org (aws-us-west-2-korg-mail-1.web.codeaurora.org [10.30.226.201]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by smtp.subspace.kernel.org (Postfix) with ESMTPS id CE6F61B59F; Tue, 5 Mar 2024 01:39:31 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.client-ip=10.30.226.201 ARC-Seal:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1709602771; cv=none; b=sdIjPARkRmUAyp/YMVddXwTsdHaJKmTWu2uyhQGBZbuejQg773ZgPfxvaE8hmuYRhq12fYmz/mN7lex6uDdUBUqFLoWGP6FZWry9JPRQAhKU/G8mzCGVRhdFKyv/P5WYv2p+mQuiZ14cixoO25uQTRWKhgFGDPps2P2kG7+BC0Q= ARC-Message-Signature:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1709602771; c=relaxed/simple; bh=qwpwKk8tlx8nJHIDbw8e1ykeTGkv4/vm5C/QYqIaks0=; h=Date:From:To:Cc:Subject:Message-ID:In-Reply-To:References: MIME-Version:Content-Type; b=WlbEm6Yz1VMu8kso1yjC5InADZQ/9mPRpnUOTpU/NFufWr3P4kscfOSL4gulDUCave9Sc3RgmtMmCoXeN1X08QJWsCHrUGcss2E4NPQ5FfQwTdNNOBqcTgdLPLs7CRd8gppKECOfODIUQxwCk6yjrBcngncsV1v4r+oL2sRVuZU= ARC-Authentication-Results:i=1; smtp.subspace.kernel.org; arc=none smtp.client-ip=10.30.226.201 Received: by smtp.kernel.org (Postfix) with ESMTPSA id A4872C433F1; Tue, 5 Mar 2024 01:39:30 +0000 (UTC) Date: Mon, 4 Mar 2024 20:41:19 -0500 From: Steven Rostedt To: Mathieu Desnoyers Cc: LKML , Linux Trace Kernel , Masami Hiramatsu , Linus Torvalds , Sachin Sant Subject: Re: [PATCH] tracing: Have trace_marker writes be just half of TRACE_SEQ_SIZE Message-ID: <20240304204119.7503ab0b@gandalf.local.home> In-Reply-To: <20240304203516.45b7a551@gandalf.local.home> References: <20240304192710.4c99677c@gandalf.local.home> <469d31a7-f358-4547-bb17-0979b3515924@efficios.com> <20240304203516.45b7a551@gandalf.local.home> X-Mailer: Claws Mail 3.19.1 (GTK+ 2.24.33; x86_64-pc-linux-gnu) Precedence: bulk X-Mailing-List: linux-kernel@vger.kernel.org List-Id: List-Subscribe: List-Unsubscribe: MIME-Version: 1.0 Content-Type: text/plain; charset=US-ASCII Content-Transfer-Encoding: 7bit On Mon, 4 Mar 2024 20:35:16 -0500 Steven Rostedt wrote: > > BUILD_BUG_ON(TRACING_MARK_MAX_SIZE + sizeof(meta data stuff...) > TRACE_SEQ_SIZE); > > That's not the meta size I'm worried about. The sizeof(meta data) is the > raw event binary data, which is not related to the size of the event output. > > # cd /sys/kernel/tracing > # echo hello > trace_marker > # cat trace > [..] > <...>-999 [001] ..... 2296.140373: tracing_mark_write: hello > ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ > This is the meta data that is added to trace_seq That said, the meta data is most likely not going to be more than 128 bytes (it shouldn't be more than 80). I could do as you suggest and create a separate TRACE_MARKER_SIZE and just make sure that it's less than TRACE_SEQ_BUFFER_SIZE (as that's the size of the content) by 128 bytes. /* Added meta data should not be more than 128 bytes */ BUILD_BUG_ON((TRACE_MARKER_MAX_SIZE + 128) > TRACE_SEQ_BUFFER_SIZE); -- Steve