Skip to content

Commit

Permalink
---
Browse files Browse the repository at this point in the history
yaml
---
r: 146151
b: refs/heads/master
c: 0574ea4
h: refs/heads/master
i:
  146149: 10bf643
  146147: 291a8fa
  146143: 5eb1527
v: v3
  • Loading branch information
Steven Rostedt authored and Steven Rostedt committed May 7, 2009
1 parent 8f3cdae commit c58c7aa
Show file tree
Hide file tree
Showing 2 changed files with 10 additions and 3 deletions.
2 changes: 1 addition & 1 deletion [refs]
Original file line number Diff line number Diff line change
@@ -1,2 +1,2 @@
---
refs/heads/master: 65b77242043f74bca6a0d733c0e48ef03a8c9893
refs/heads/master: 0574ea421b90e0e45a72c447dd3c2c79ffd8c153
11 changes: 9 additions & 2 deletions trunk/kernel/trace/ring_buffer_benchmark.c
Original file line number Diff line number Diff line change
Expand Up @@ -218,16 +218,23 @@ static void ring_buffer_producer(void)
}
do_gettimeofday(&end_tv);

if (consumer && !(++cnt % wakeup_interval))
cnt++;
if (consumer && !(cnt % wakeup_interval))
wake_up_process(consumer);

#ifndef CONFIG_PREEMPT
/*
* If we are a non preempt kernel, the 10 second run will
* stop everything while it runs. Instead, we will call
* cond_resched and also add any time that was lost by a
* rescedule.
*
* Do a cond resched at the same frequency we would wake up
* the reader.
*/
cond_resched();
if (cnt % wakeup_interval)
cond_resched();
#endif

} while (end_tv.tv_sec < (start_tv.tv_sec + RUN_TIME) && !kill_test);
pr_info("End ring buffer hammer\n");
Expand Down

0 comments on commit c58c7aa

Please sign in to comment.