-
Notifications
You must be signed in to change notification settings - Fork 380
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Carry over buffered tasks across BP sessions #5169
base: master
Are you sure you want to change the base?
Conversation
@@ -1487,7 +1548,9 @@ impl<S: SpawnableScheduler<TH>, TH: TaskHandler> ThreadManager<S, TH> { | |||
session_result_sender | |||
.send(result_with_timings) | |||
.expect("always outlived receiver"); | |||
state_machine.reinitialize(); | |||
if matches!(scheduling_mode, BlockVerification) { | |||
state_machine.reinitialize(); |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
so, state_machine
won't be reinitialize()
-d for BlockProduction
anymore. along with this, proper (Task
s-related) oom mitigation will be addressed by later pr, while that concern is temporarily becoming more prominent as of this pr.
@@ -3014,17 +3082,53 @@ mod tests { | |||
let bank = Bank::new_for_tests(&genesis_config); | |||
let (bank, _bank_forks) = setup_dummy_fork_graph(bank); | |||
let ignored_prioritization_fee_cache = Arc::new(PrioritizationFeeCache::new(0u64)); | |||
let pool = SchedulerPool::<PooledScheduler<StallingHandler>, _>::new_dyn( | |||
let pool = SchedulerPool::<PooledScheduler<StallingHandler>, _>::new( |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
needed to call .register_banking_stage()
, which is outside the dyn trait definition.
ede407c
to
9b3163f
Compare
9b3163f
to
1851179
Compare
Problem
because leader scheduler is grouped by 4 consecutive slots, special treatment is needed for very efficient hangover across banks.
Summary of Changes
Now that #4949 has landed, it's now possible for the (singleton) block production unified scheduler to carry over buffered tasks to next bank (= session) seamlessly with customized session switching conditions.
also note that there should be no functional change to block verification scheduler behavior.
extracted from #3946