diff options
author | Steven Rostedt <srostedt@redhat.com> | 2009-05-06 18:36:59 -0400 |
---|---|---|
committer | Steven Rostedt <rostedt@goodmis.org> | 2009-05-06 18:36:59 -0400 |
commit | 3e07a4f680adc66dfa175aa5021aedf340251b12 (patch) | |
tree | c245b416cf3d88e4c2f1d0ff43d0021e59b20b47 /samples | |
parent | 6634ff26cce2da04e5c2a5481bcb8888e7d01786 (diff) | |
download | linux-3e07a4f680adc66dfa175aa5021aedf340251b12.tar.gz linux-3e07a4f680adc66dfa175aa5021aedf340251b12.tar.bz2 linux-3e07a4f680adc66dfa175aa5021aedf340251b12.zip |
ring-buffer: change test to be more latency friendly
The ring buffer benchmark/test runs a producer for 10 seconds.
This is done with preemption and interrupts enabled. But if the kernel
is not compiled with CONFIG_PREEMPT, it basically stops everything
but interrupts for 10 seconds.
Although this is just a test and is not for production, this attribute
can be quite annoying. It can also spawn badness elsewhere.
This patch solves the issues by calling "cond_resched" when the system
is not compiled with CONFIG_PREEMPT. It also keeps track of the time
spent to call cond_resched such that it does not go against the
time calculations. That is, if the task schedules away, the time scheduled
out is removed from the test data. Note, this only works for non PREEMPT
because we do not know when the task is scheduled out if we have PREEMPT
enabled.
[ Impact: prevent test from stopping the world for 10 seconds ]
Signed-off-by: Steven Rostedt <rostedt@goodmis.org>
Diffstat (limited to 'samples')
0 files changed, 0 insertions, 0 deletions