Return-Path: Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1751610AbdCCIQQ (ORCPT ); Fri, 3 Mar 2017 03:16:16 -0500 Received: from mail.kernel.org ([198.145.29.136]:60384 "EHLO mail.kernel.org" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1751333AbdCCIQO (ORCPT ); Fri, 3 Mar 2017 03:16:14 -0500 Date: Thu, 2 Mar 2017 20:09:50 -0500 From: Steven Rostedt To: Todd Brandt Cc: linux-kernel@vger.kernel.org, todd.e.brandt@intel.com Subject: Re: [PATCH] ftrace: add ftrace_graph_max_depth kernel parameter Message-ID: <20170302200950.6d16c91a@gandalf.local.home> In-Reply-To: <1488502497.7212.24.camel@linux.intel.com> References: <1488499935-23216-1-git-send-email-todd.e.brandt@linux.intel.com> <20170302193827.6f5ee2eb@gandalf.local.home> <20170302193943.3117fca7@gandalf.local.home> <1488502497.7212.24.camel@linux.intel.com> X-Mailer: Claws Mail 3.14.0 (GTK+ 2.24.31; x86_64-pc-linux-gnu) MIME-Version: 1.0 Content-Type: text/plain; charset=US-ASCII Content-Transfer-Encoding: 7bit Sender: linux-kernel-owner@vger.kernel.org List-ID: X-Mailing-List: linux-kernel@vger.kernel.org Content-Length: 1071 Lines: 32 On Thu, 02 Mar 2017 16:54:57 -0800 Todd Brandt wrote: > BTW I had one other question for you, is it possible to move the ftrace > module's initialization further up the queue? ATM it initializes at > about 600ms into boot, which is fine since most of the performance > issues are happening at 1000ms+. But eventually it might be nice to > trace some of the earlier init code. module initialization? Or you mean boot up initialization? For boot up, we have this: mm_init(); sched_init(); idr_init_cache(); workqueue_init_early(); rcu_init(); trace_init(); Now, going before mm_init() will definitely be quite a pain, as we that would require making the ring buffer out of early boot memory. We could add a early_trace_init() just before sched_init(), with some limited tracing. Tracepoints require rcu, although we could make hooks to just do hard coded changes (no rcu synchronization) with a flag that denotes that trace_init() hasn't been called yet. I could toy with the idea, implement it, and see what breaks. -- Steve