From 8f07a33f17b5a87a08cb261007b47ded62ee97f9 Mon Sep 17 00:00:00 2001 From: Ryo Onodera Date: Sun, 22 Sep 2024 12:14:47 +0000 Subject: [PATCH] Use OctonaryHeap --- unified-scheduler-logic/src/lib.rs | 12 ++++++------ 1 file changed, 6 insertions(+), 6 deletions(-) diff --git a/unified-scheduler-logic/src/lib.rs b/unified-scheduler-logic/src/lib.rs index 19f02b50ed1155..c7ef22d551ee70 100644 --- a/unified-scheduler-logic/src/lib.rs +++ b/unified-scheduler-logic/src/lib.rs @@ -621,8 +621,8 @@ use dary_heap::PeekMut; #[derive(Debug)] struct UsageQueueInner { current_usage: Option, - current_readonly_tasks: dary_heap::SenaryHeap>, - blocked_usages_from_tasks: dary_heap::SenaryHeap>, + current_readonly_tasks: dary_heap::OctonaryHeap>, + blocked_usages_from_tasks: dary_heap::OctonaryHeap>, } use enum_ptr::EnumPtr; @@ -721,8 +721,8 @@ impl Default for UsageQueueInner { // // Note that large cap should be accompanied with proper scheduler cleaning after use, // which should be handled by higher layers (i.e. scheduler pool). - current_readonly_tasks: dary_heap::SenaryHeap::with_capacity(128), - blocked_usages_from_tasks: dary_heap::SenaryHeap::with_capacity(128), + current_readonly_tasks: dary_heap::OctonaryHeap::with_capacity(128), + blocked_usages_from_tasks: dary_heap::OctonaryHeap::with_capacity(128), } } } @@ -855,7 +855,7 @@ unsafe impl enum_ptr::Aligned for UsageQueue { /// `solana-unified-scheduler-pool`. #[derive(Debug)] pub struct SchedulingStateMachine { - buffered_task_queue: dary_heap::SenaryHeap, + buffered_task_queue: dary_heap::OctonaryHeap, alive_task_count: ShortCounter, executing_task_count: ShortCounter, max_executing_task_count: u32, @@ -1351,7 +1351,7 @@ impl SchedulingStateMachine { Self { // It's very unlikely this is desired to be configurable, like // `UsageQueueInner::blocked_usages_from_tasks`'s cap. - buffered_task_queue: dary_heap::SenaryHeap::with_capacity(1024), // BTreeMap::new(), //VecDeque::with_capacity(1024), + buffered_task_queue: dary_heap::OctonaryHeap::with_capacity(1024), // BTreeMap::new(), //VecDeque::with_capacity(1024), alive_task_count: ShortCounter::zero(), executing_task_count: ShortCounter::zero(), max_executing_task_count: 200,