mirror of
https://github.com/asterinas/asterinas.git
synced 2025-06-28 20:03:22 +00:00
Implement remote TLB flush on VmSpace
This commit is contained in:
committed by
Tate, Hongliang Tian
parent
326ec09169
commit
d9eccdcfbe
@ -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);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
@ -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,
|
||||
|
Reference in New Issue
Block a user