From d922f5eb1c375ab0445240110656c1d793eaad04 Mon Sep 17 00:00:00 2001 From: "Bjoern B. Brandenburg" Date: Tue, 16 Nov 2010 11:13:10 -0500 Subject: Make TRACE() buffer size configurable Let the user choose an appropriate buffer size (instead of scaling with NR_CPUS). The kfifo api requires the buffer to be a power of two, so enforce this constraint in the configuration. This fixes a previously-existing compile-time error for values of NR_CPU that are not a power of two. Based on a patch by Mac Mollison . --- litmus/Kconfig | 20 ++++++++++++++++++++ 1 file changed, 20 insertions(+) (limited to 'litmus/Kconfig') diff --git a/litmus/Kconfig b/litmus/Kconfig index f1de6fabfc17..a3341021f05c 100644 --- a/litmus/Kconfig +++ b/litmus/Kconfig @@ -149,6 +149,26 @@ config SCHED_DEBUG_TRACE Say Yes for debugging. Say No for overhead tracing. +config SCHED_DEBUG_TRACE_SHIFT + int "Buffer size for TRACE() buffer" + depends on SCHED_DEBUG_TRACE + range 14 22 + default 18 + help + + Select the amount of memory needed per CPU for the TRACE() buffer, as a + power of two. The TRACE() buffer is global and statically allocated. If + the buffer is too small, there will be holes in the TRACE() log if the + buffer-flushing task is starved. + + The default should be sufficient for most systems. Increase the buffer + size if the log contains holes. Reduce the buffer size when running on + a memory-constrained system. + + Examples: 14 => 16KB + 18 => 256KB + 20 => 1MB + endmenu endmenu -- cgit v1.2.2