diff options
author | Steven Rostedt (VMware) <rostedt@goodmis.org> | 2018-05-24 18:49:46 -0400 |
---|---|---|
committer | Georg Veichtlbauer <georg@vware.at> | 2023-07-16 13:06:56 +0200 |
commit | 217ab2d0ef91df5539f055c07a7890153c5ce9a2 (patch) | |
tree | 4895c7b64c7d935b3ca4b3e1ed9a7d138f8f7228 /kernel/sched/core.c | |
parent | 997b726bc092e29a9c6bf5f8925c98defc69a6cd (diff) |
rcu: Speed up calling of RCU tasks callbacks
Joel Fernandes found that the synchronize_rcu_tasks() was taking a
significant amount of time. He demonstrated it with the following test:
# cd /sys/kernel/tracing
# while [ 1 ]; do x=1; done &
# echo '__schedule_bug:traceon' > set_ftrace_filter
# time echo '!__schedule_bug:traceon' > set_ftrace_filter;
real 0m1.064s
user 0m0.000s
sys 0m0.004s
Where it takes a little over a second to perform the synchronize,
because there's a loop that waits 1 second at a time for tasks to get
through their quiescent points when there's a task that must be waited
for.
After discussion we came up with a simple way to wait for holdouts but
increase the time for each iteration of the loop but no more than a
full second.
With the new patch we have:
# time echo '!__schedule_bug:traceon' > set_ftrace_filter;
real 0m0.131s
user 0m0.000s
sys 0m0.004s
Which drops it down to 13% of what the original wait time was.
Link: http://lkml.kernel.org/r/20180523063815.198302-2-joel@joelfernandes.org
Reported-by: Joel Fernandes (Google) <joel@joelfernandes.org>
Suggested-by: Joel Fernandes (Google) <joel@joelfernandes.org>
Change-Id: I40bcecdfdb2a1cdae7195f1d3b107455ea4b26b1
Signed-off-by: Steven Rostedt (VMware) <rostedt@goodmis.org>
Signed-off-by: Paul E. McKenney <paulmck@linux.vnet.ibm.com>
Diffstat (limited to 'kernel/sched/core.c')
0 files changed, 0 insertions, 0 deletions