Skip to contentSkip to conversation

50x speedup for synchronize_rcu_tasks_trace()

GIT PULL Paul E. McKenney 2 participants 3 messages Sep 22, 2020 – Sep 24, 2020

Subsystems (2)
lore
Share & tools
lore

Paul E. McKenney

author maintainer
#0 lore raw

Hello, Alexei,

This pull request contains eight commits that speed up RCU Tasks Trace grace periods by a factor of 50, fix a few race conditions exposed by this speedup, and clean up a couple of minor issues. These have been exposed to 0day and -next testing, and have passed well over 1,000 hours of rcutorture testing, some of which has contained ad-hoc changes to further increase race probabilities. So they should be solid! (Famous last words...)

I would normally have sent this series up through -tip, but as we discussed, going up through the BFP and networking trees provides the needed exposure to real-world testing of these changes. Please note that the first patch is already in mainline, but given identical SHA-1 commit IDs, git should have no problem figuring this out. I will also be retaining these commits in -rcu in order to continue exposing them to rcutorture testing, but again the identical SHA-1 commit IDs will make everything work out.

The fact that these commits will reside in multiple trees is of course what motivates inclusion of the otherwise unrelated minor-issue cleanups. Including these cleanups allows all the various trees to keep synchronized SHA-1 commit IDs. And so, without further ado:

The following changes since commit 9123e3a74ec7b934a4a099e98af6a61c2f80bbf5:

Linux 5.9-rc1 (2020-08-16 13:04:57 -0700)

are available in the git repository at:

git://git.kernel.org/pub/scm/linux/kernel/git/paulmck/linux-rcu.git rtt-speedup.2020.09.16a

for you to fetch changes up to f747c7e15d7bc71a967a94ceda686cf2460b69e8:

rcu-tasks: Enclose task-list scan in rcu_read_lock() (2020-09-16 16:32:38 -0700)

----------------------------------------------------------------
Paul E. McKenney (8):
rcu-tasks: Prevent complaints of unused show_rcu_tasks_classic_gp_kthread()
rcu-tasks: Mark variables static
rcu-tasks: Use more aggressive polling for RCU Tasks Trace
rcu-tasks: Selectively enable more RCU Tasks Trace IPIs
rcu-tasks: Shorten per-grace-period sleep for RCU Tasks Trace
rcu-tasks: Fix grace-period/unlock race in RCU Tasks Trace
rcu-tasks: Fix low-probability task_struct leak
rcu-tasks: Enclose task-list scan in rcu_read_lock()

 include/linux/rcupdate_trace.h |  4 +++
 kernel/rcu/tasks.h             | 55 ++++++++++++++++++++++++++++++++----------
 2 files changed, 46 insertions(+), 13 deletions(-)
#1 lore raw
Quoted 11 lines · Paul E. McKenney

Hello, Alexei,

This pull request contains eight commits that speed up RCU Tasks Trace grace periods by a factor of 50, fix a few race conditions exposed by this speedup, and clean up a couple of minor issues. These have been exposed to 0day and -next testing, and have passed well over 1,000 hours of rcutorture testing, some of which has contained ad-hoc changes to further increase race probabilities. So they should be solid! (Famous last words...)

Quoted 8 lines

I would normally have sent this series up through -tip, but as we discussed, going up through the BFP and networking trees provides the needed exposure to real-world testing of these changes. Please note that the first patch is already in mainline, but given identical SHA-1 commit IDs, git should have no problem figuring this out. I will also be retaining these commits in -rcu in order to continue exposing them to rcutorture testing, but again the identical SHA-1 commit IDs will make everything work out.

Pulled into bpf-next. Thanks a lot.

Also confirming 50x speedup.
Really nice to see that selftests/bpf are now fast again.

Not only all bpf developers will be running these patches now, but the bpf CI system will be exercising them as well.

author maintainer
#2 lore raw
Quoted 21 lines · Alexei Starovoitov
Quoted 11 lines · Paul E. McKenney

Hello, Alexei,

This pull request contains eight commits that speed up RCU Tasks Trace grace periods by a factor of 50, fix a few race conditions exposed by this speedup, and clean up a couple of minor issues. These have been exposed to 0day and -next testing, and have passed well over 1,000 hours of rcutorture testing, some of which has contained ad-hoc changes to further increase race probabilities. So they should be solid! (Famous last words...)

Quoted 8 lines

I would normally have sent this series up through -tip, but as we discussed, going up through the BFP and networking trees provides the needed exposure to real-world testing of these changes. Please note that the first patch is already in mainline, but given identical SHA-1 commit IDs, git should have no problem figuring this out. I will also be retaining these commits in -rcu in order to continue exposing them to rcutorture testing, but again the identical SHA-1 commit IDs will make everything work out.

Quoted 7 lines

Pulled into bpf-next. Thanks a lot.

Also confirming 50x speedup.
Really nice to see that selftests/bpf are now fast again.

Not only all bpf developers will be running these patches now, but the bpf CI system will be exercising them as well.

Sounds very good, thank you! If problems arise, you know where to find me. As do most of the people running these patches, I would guess. ;-)

Thanx, Paul