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 16BEEC4167B for ; Mon, 11 Dec 2023 18:28:02 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1345128AbjLKS1x (ORCPT ); Mon, 11 Dec 2023 13:27:53 -0500 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:32892 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S229785AbjLKS1w (ORCPT ); Mon, 11 Dec 2023 13:27:52 -0500 Received: from smtp.kernel.org (relay.kernel.org [52.25.139.140]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id B96F3E8 for ; Mon, 11 Dec 2023 10:27:58 -0800 (PST) Received: by smtp.kernel.org (Postfix) with ESMTPSA id C9ADBC433C8; Mon, 11 Dec 2023 18:27:57 +0000 (UTC) Date: Mon, 11 Dec 2023 13:28:37 -0500 From: Steven Rostedt To: "Masami Hiramatsu (Google)" Cc: LKML , Linux Trace Kernel , Mark Rutland , Mathieu Desnoyers Subject: Re: [PATCH] trace_seq: Increase the buffer size to almost two pages Message-ID: <20231211132837.24488ec1@gandalf.local.home> In-Reply-To: <20231211214627.cff4ecfead14029ef22cd3ef@kernel.org> References: <20231209175220.19867af4@gandalf.local.home> <20231211214627.cff4ecfead14029ef22cd3ef@kernel.org> 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 Mon, 11 Dec 2023 21:46:27 +0900 Masami Hiramatsu (Google) wrote: > > > > By increasing the trace_seq buffer to almost two pages, it can now print > > out the first line. > > > > This also subtracts the rest of the trace_seq fields from the buffer, so > > that the entire trace_seq is now PAGE_SIZE aligned. > > Ok, but I just a bit concern about the memory consumption. > Since this is very specific case, can we make it configurable later? I was concerned about this too, but it looks like it's allocated and later freed in every location except for a couple of instances. One is "tracepoint_print_iter" which is used to pipe tracepoints to printk. I think we can possibly make that allocated too. The other is in ftrace_dump, which I don't think we can easily allocate that. Although, we could have it allocated at boot up if ftrace_dump_on_oops() is enabled. Another KTODO? > > Reviewed-by: Masami Hiramatsu (Google) > Thanks! -- Steve