diff options
author | Bjoern B. Brandenburg <bbb@cs.unc.edu> | 2010-11-16 11:13:10 -0500 |
---|---|---|
committer | Bjoern B. Brandenburg <bbb@cs.unc.edu> | 2010-11-16 11:22:45 -0500 |
commit | d922f5eb1c375ab0445240110656c1d793eaad04 (patch) | |
tree | b690dc794494a454468698c8e15c8f7d9ffad1fb /litmus/Kconfig | |
parent | 6fbc3b495cccf2e4ab7d4ab674b5c576e9946bed (diff) |
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 <mollison@cs.unc.edu>.
Diffstat (limited to 'litmus/Kconfig')
-rw-r--r-- | litmus/Kconfig | 20 |
1 files changed, 20 insertions, 0 deletions
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 | |||
149 | Say Yes for debugging. | 149 | Say Yes for debugging. |
150 | Say No for overhead tracing. | 150 | Say No for overhead tracing. |
151 | 151 | ||
152 | config SCHED_DEBUG_TRACE_SHIFT | ||
153 | int "Buffer size for TRACE() buffer" | ||
154 | depends on SCHED_DEBUG_TRACE | ||
155 | range 14 22 | ||
156 | default 18 | ||
157 | help | ||
158 | |||
159 | Select the amount of memory needed per CPU for the TRACE() buffer, as a | ||
160 | power of two. The TRACE() buffer is global and statically allocated. If | ||
161 | the buffer is too small, there will be holes in the TRACE() log if the | ||
162 | buffer-flushing task is starved. | ||
163 | |||
164 | The default should be sufficient for most systems. Increase the buffer | ||
165 | size if the log contains holes. Reduce the buffer size when running on | ||
166 | a memory-constrained system. | ||
167 | |||
168 | Examples: 14 => 16KB | ||
169 | 18 => 256KB | ||
170 | 20 => 1MB | ||
171 | |||
152 | endmenu | 172 | endmenu |
153 | 173 | ||
154 | endmenu | 174 | endmenu |