public inbox for linux-kernel@vger.kernel.org
 help / color / mirror / Atom feed
* [PATCH 0/3][RFC] trace_printk() using percpu buffers
@ 2011-10-08 17:02 Steven Rostedt
  2011-10-08 17:02 ` [PATCH 1/3][RFC] tracing: Do not allocate buffer for trace_marker Steven Rostedt
                   ` (3 more replies)
  0 siblings, 4 replies; 12+ messages in thread
From: Steven Rostedt @ 2011-10-08 17:02 UTC (permalink / raw)
  To: linux-kernel
  Cc: Ingo Molnar, Andrew Morton, Thomas Gleixner, Peter Zijlstra,
	Frederic Weisbecker

[-- Attachment #1: Type: text/plain, Size: 1469 bytes --]

Peter,

You had issues with the previous version of my trace_printk() code.
I rewrote it to do the following.

By default, it still uses the single buffer protected by a spinlock
and an atomic (for NMIs). The NMI case can cause dropped prints if
the NMI happens while a trace_printk() is processing.

When trace_printk_percpu is enabled, either via the trace options or
the kernel command line, then two sets of percpu buffers are made,
one for normal and irqs (interrupts are still disabled), and the other
is for NMIs. These can be added or removed at anytime.

The last patch adds a CONFIG_TRACE_PRINTK_PERCPU that makes trace_printk()
permanently use two sets of per_cpu buffers, and these can not be
removed. This will give the least amount of overhead for trace_printk()
with the sacrifice of memory overhead. This is an option I could imagine
you would just set and forget about.

Let me know your thoughts.

Thanks,

-- Steve


Steven Rostedt (3):
      tracing: Do not allocate buffer for trace_marker
      tracing: Add optional percpu buffers for trace_printk()
      tracing: Add config to permanently have trace_printk() use percpu buffers

----
 Documentation/kernel-parameters.txt |   11 +
 kernel/trace/Kconfig                |   18 ++
 kernel/trace/trace.c                |  360 ++++++++++++++++++++++++++++-------
 kernel/trace/trace.h                |    1 +
 4 files changed, 320 insertions(+), 70 deletions(-)

[-- Attachment #2: This is a digitally signed message part --]
[-- Type: application/pgp-signature, Size: 836 bytes --]

^ permalink raw reply	[flat|nested] 12+ messages in thread

end of thread, other threads:[~2011-10-10 13:17 UTC | newest]

Thread overview: 12+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2011-10-08 17:02 [PATCH 0/3][RFC] trace_printk() using percpu buffers Steven Rostedt
2011-10-08 17:02 ` [PATCH 1/3][RFC] tracing: Do not allocate buffer for trace_marker Steven Rostedt
2011-10-08 17:02 ` [PATCH 2/3][RFC] tracing: Add optional percpu buffers for trace_printk() Steven Rostedt
2011-10-10 11:08   ` Peter Zijlstra
2011-10-10 12:37     ` Steven Rostedt
2011-10-10 13:04       ` Peter Zijlstra
2011-10-10 13:17         ` Steven Rostedt
2011-10-08 17:02 ` [PATCH 3/3][RFC] tracing: Add config to permanently have trace_printk() use percpu Steven Rostedt
2011-10-10 11:04 ` [PATCH 0/3][RFC] trace_printk() using percpu buffers Peter Zijlstra
2011-10-10 12:31   ` Steven Rostedt
2011-10-10 13:03     ` Peter Zijlstra
2011-10-10 13:06       ` Steven Rostedt

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox