Skip to content

Commit

Permalink
Introduce primitive threading in unified scheduler (#34676)
Browse files Browse the repository at this point in the history
* Introduce primitive threading in unified scheduler

* Make the internal struct ExecutedTask not pub

* Improve wording a bit

* Explain scheduler main loop's overhead sensitivity

* Improve wording a bit

* Define ChainedChannel{Sender, Receiver} wrappers

* Clean up a bit

* Use derivative to avoid manual Clone impl

* Clarify comment

* Remove extra whitespace in comment

* Remove unneeded dyn trait for ChainedChannel

* Remove the accumulator thread for now

* Fix typo

* Use unimplemented!() to convey intention better
  • Loading branch information
ryoqun authored Jan 24, 2024
1 parent bfbe03a commit bd10386
Show file tree
Hide file tree
Showing 7 changed files with 535 additions and 60 deletions.
6 changes: 6 additions & 0 deletions Cargo.lock

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

1 change: 1 addition & 0 deletions Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -185,6 +185,7 @@ ctrlc = "3.4.2"
curve25519-dalek = "3.2.1"
dashmap = "5.5.3"
derivation-path = { version = "0.2.0", default-features = false }
derivative = "2.2.0"
dialoguer = "0.10.4"
digest = "0.10.7"
dir-diff = "0.3.3"
Expand Down
7 changes: 7 additions & 0 deletions programs/sbf/Cargo.lock

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

3 changes: 3 additions & 0 deletions unified-scheduler-logic/Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -8,3 +8,6 @@ repository = { workspace = true }
homepage = { workspace = true }
license = { workspace = true }
edition = { workspace = true }

[dependencies]
solana-sdk = { workspace = true }
21 changes: 20 additions & 1 deletion unified-scheduler-logic/src/lib.rs
Original file line number Diff line number Diff line change
@@ -1 +1,20 @@
// This file will be populated with actual implementation later.
use solana_sdk::transaction::SanitizedTransaction;

pub struct Task {
transaction: SanitizedTransaction,
index: usize,
}

impl Task {
pub fn create_task(transaction: SanitizedTransaction, index: usize) -> Self {
Task { transaction, index }
}

pub fn task_index(&self) -> usize {
self.index
}

pub fn transaction(&self) -> &SanitizedTransaction {
&self.transaction
}
}
4 changes: 4 additions & 0 deletions unified-scheduler-pool/Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -10,6 +10,10 @@ license = { workspace = true }
edition = { workspace = true }

[dependencies]
assert_matches = { workspace = true }
crossbeam-channel = { workspace = true }
derivative = { workspace = true }
log = { workspace = true }
solana-ledger = { workspace = true }
solana-program-runtime = { workspace = true }
solana-runtime = { workspace = true }
Expand Down
Loading

0 comments on commit bd10386

Please sign in to comment.