]> git.baikalelectronics.ru Git - kernel.git/commit
tracing: Fix wakeup_rt self test on virtual machines
authorSteven Rostedt <srostedt@redhat.com>
Tue, 31 Jul 2012 14:23:37 +0000 (10:23 -0400)
committerSteven Rostedt <rostedt@goodmis.org>
Tue, 7 Aug 2012 13:40:51 +0000 (09:40 -0400)
commit1de4556d6f39f8a699a9f4f6e1128c7e60118195
tree9b4545c063560d6986d03d7959793591d1eef118
parente08bf84001c30909cb6d38e804e590b42b33b25d
tracing: Fix wakeup_rt self test on virtual machines

The warkeup_rt self test used msleep() calls to wait for real time
tasks to wake up and run. On bare-metal hardware, this was enough as
the scheduler should let the RT task run way before the non-RT task
wakes up from the msleep(). If it did not, then that would mean the
scheduler was broken.

But when dealing with virtual machines, this is a different story.
If the RT task wakes up on a VCPU, it's up to the host to decide when
that task gets to schedule, which can be far behind the time that the
non-RT task wakes up. In this case, the test would fail incorrectly.

As we are not testing the scheduler, but instead the wake up tracing,
we can use completions to wait and not depend on scheduler timings
to see if events happen on time.

Link: http://lkml.kernel.org/r/1343663105.3847.7.camel@fedora
Reported-by: Fengguang Wu <fengguang.wu@intel.com>
Tested-by: Fengguang Wu <fengguang.wu@intel.com>
Signed-off-by: Steven Rostedt <rostedt@goodmis.org>
kernel/trace/trace_selftest.c