Implement remote TLB flush on VmSpace

This commit is contained in:
Zhang Junyang
2024-08-30 17:49:18 +08:00
committed by Tate, Hongliang Tian
parent 326ec09169
commit d9eccdcfbe
13 changed files with 391 additions and 338 deletions

View File

@ -24,12 +24,12 @@ impl WorkerScheduler for SimpleScheduler {
fn schedule(&self) {
let worker_pool = self.worker_pool.upgrade().unwrap();
for cpu_id in worker_pool.cpu_set().iter() {
if !worker_pool.heartbeat(cpu_id as u32)
&& worker_pool.has_pending_work_items(cpu_id as u32)
&& !worker_pool.wake_worker(cpu_id as u32)
&& worker_pool.num_workers(cpu_id as u32) < WORKER_LIMIT
if !worker_pool.heartbeat(cpu_id)
&& worker_pool.has_pending_work_items(cpu_id)
&& !worker_pool.wake_worker(cpu_id)
&& worker_pool.num_workers(cpu_id) < WORKER_LIMIT
{
worker_pool.add_worker(cpu_id as u32);
worker_pool.add_worker(cpu_id);
}
}
}

View File

@ -128,10 +128,7 @@ impl WorkerPool {
Arc::new_cyclic(|pool_ref| {
let mut local_pools = Vec::new();
for cpu_id in cpu_set.iter() {
local_pools.push(Arc::new(LocalWorkerPool::new(
pool_ref.clone(),
cpu_id as u32,
)));
local_pools.push(Arc::new(LocalWorkerPool::new(pool_ref.clone(), cpu_id)));
}
WorkerPool {
local_pools,