From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org Received: from vger.kernel.org (vger.kernel.org [23.128.96.18]) by smtp.lore.kernel.org (Postfix) with ESMTP id 4C731C4167B for ; Tue, 5 Dec 2023 17:34:53 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1346176AbjLEReo (ORCPT ); Tue, 5 Dec 2023 12:34:44 -0500 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:43124 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S229710AbjLERem (ORCPT ); Tue, 5 Dec 2023 12:34:42 -0500 Received: from smtp.kernel.org (relay.kernel.org [52.25.139.140]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 7482CCA for ; Tue, 5 Dec 2023 09:34:49 -0800 (PST) Received: by smtp.kernel.org (Postfix) with ESMTPSA id 7C9D3C433C8; Tue, 5 Dec 2023 17:34:48 +0000 (UTC) Date: Tue, 5 Dec 2023 12:35:14 -0500 From: Steven Rostedt To: LKML , Linux Trace Kernel Cc: Masami Hiramatsu , Mark Rutland , Mathieu Desnoyers Subject: Re: [PATCH] tracing: Always update snapshot buffer size Message-ID: <20231205123514.03244a4e@gandalf.local.home> In-Reply-To: <20231205115223.5256e1a1@gandalf.local.home> References: <20231205115223.5256e1a1@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 Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On Tue, 5 Dec 2023 11:52:23 -0500 Steven Rostedt wrote: > From: "Steven Rostedt (Google)" > > It use to be that only the top level instance had a snapshot buffer (for > latency tracers like wakeup and irqsoff). The update of the ring buffer > size would check if the instance was the top level and if so, it would > also update the snapshot buffer as it needs to be the same as the main > buffer. > > Now that lower level instances also has a snapshot buffer, they too need > to update their snapshot buffer sizes when the main buffer is changed, > otherwise the following can be triggered: > > # cd /sys/kernel/tracing > # echo 1500 > buffer_size_kb > # mkdir instances/foo > # echo irqsoff > instances/foo/current_tracer > # echo 1000 > instances/foo/buffer_size_kb > Bah, this is only a partial patch, in fact it doesn't even fix the issue. It fixes another issue that this issue is dependent on. I'll send out a v2 shortly. -- Steve