/DragonOS-0.1.8/kernel/src/sched/ |
D | rt.rs | 116 for cpu_id in 0..MAX_CPU_NUM { in new() 120 result.cpu_queue[cpu_id as usize].push(Box::leak(Box::new(RTQueue::new()))); in new() 133 pub fn pick_next_task_rt(&mut self, cpu_id: u32) -> Option<&'static mut process_control_block> { in pick_next_task_rt() 137 let cpu_queue_i: &mut RTQueue = self.cpu_queue[cpu_id as usize][i as usize]; in pick_next_task_rt() 147 pub fn rt_queue_len(&mut self, cpu_id: u32) -> usize { in rt_queue_len() 150 sum += self.cpu_queue[cpu_id as usize][prio as usize].get_rt_queue_size(); in rt_queue_len() 157 pub fn load_list_len(&mut self, cpu_id: u32) -> usize { in load_list_len() 158 return self.load_list[cpu_id as usize].len(); in load_list_len() 162 self.cpu_queue[pcb.cpu_id as usize][pcb.priority as usize].enqueue_front(pcb); in enqueue_front() 172 let cpu_id = current_pcb().cpu_id; in sched() localVariable [all …]
|
D | core.rs | 20 pub fn cpu_executing(cpu_id: u32) -> &'static mut process_control_block { in cpu_executing() 23 if cpu_id == process_cpu(current_pcb()) { in cpu_executing() 31 pub fn get_cpu_loads(cpu_id: u32) -> u32 { in get_cpu_loads() 34 let len_cfs = cfs_scheduler.get_cfs_queue_len(cpu_id); in get_cpu_loads() 35 let len_rt = rt_scheduler.rt_queue_len(cpu_id); in get_cpu_loads() 47 let mut min_loads_cpu_id = pcb.cpu_id; in loads_balance() 48 let mut min_loads = get_cpu_loads(pcb.cpu_id); in loads_balance() 49 for cpu_id in 0..cpu_num { in loads_balance() 50 let tmp_cpu_loads = get_cpu_loads(cpu_id); in loads_balance() 52 min_loads_cpu_id = cpu_id; in loads_balance() [all …]
|
D | cfs.rs | 143 let current_cpu_queue: &mut CFSQueue = self.cpu_queue[current_pcb().cpu_id as usize]; in timer_update_jiffies() 161 let cpu_queue = &mut self.cpu_queue[pcb.cpu_id as usize]; in enqueue_reset_vruntime() 170 pub fn set_cpu_idle(&mut self, cpu_id: usize, pcb: *mut process_control_block) { in set_cpu_idle() 172 self.cpu_queue[cpu_id].idle_pcb = pcb; in set_cpu_idle() 175 pub fn get_cfs_queue_len(&mut self, cpu_id: u32) -> usize { in get_cfs_queue_len() 176 return self.cpu_queue[cpu_id as usize].get_cfs_queue_size(); in get_cfs_queue_len() 233 let cpu_queue = &mut self.cpu_queue[pcb.cpu_id as usize]; in enqueue()
|
D | sched.h | 66 extern void sched_set_cpu_idle(uint64_t cpu_id, struct process_control_block *pcb);
|
/DragonOS-0.1.8/kernel/src/smp/ |
D | c_adapter.rs | 4 pub extern "C" fn rs_kick_cpu(cpu_id: usize) -> usize { in rs_kick_cpu() 5 return kick_cpu(cpu_id) in rs_kick_cpu()
|
D | mod.rs | 11 pub fn kick_cpu(cpu_id: usize) -> Result<(), SystemError> { in kick_cpu() 14 send_ipi(IpiKind::KickCpu, IpiTarget::Specified(cpu_id)); in kick_cpu()
|
D | smp.h | 18 extern int64_t rs_kick_cpu(uint32_t cpu_id);
|
D | smp.c | 110 …t process_control_block *)(cpu_core_info[current_starting_cpu].stack_start - STACK_SIZE))->cpu_id = in smp_init() 112 …ocess_control_block *)(cpu_core_info[current_starting_cpu].ist_stack_start - STACK_SIZE))->cpu_id = in smp_init() 190 current_pcb->cpu_id = current_starting_cpu; in smp_ap_start()
|
/DragonOS-0.1.8/kernel/src/mm/ |
D | percpu.rs | 78 let cpu_id = smp_get_processor_id(); in get() localVariable 79 &self.inner[cpu_id as usize] in get() 83 let cpu_id = smp_get_processor_id(); in get_mut() localVariable 84 &mut self.inner[cpu_id as usize] in get_mut()
|
/DragonOS-0.1.8/kernel/src/arch/x86_64/ |
D | cpu.rs | 9 let cpu_id = (cpuid_res.ebx >> 24) & 0xff; in current_cpu_id() localVariable 10 return cpu_id; in current_cpu_id()
|
/DragonOS-0.1.8/kernel/src/arch/x86_64/interrupt/ |
D | ipi.rs | 44 IpiTarget::Specified(cpu_id) => ArchIpiTarget::Specified(cpu_id), in from() 74 ArchIpiTarget::Specified(cpu_id) => cpu_id, in into()
|
/DragonOS-0.1.8/kernel/src/exception/ |
D | softirq.rs | 60 fn cpu_pending(cpu_id: usize) -> &'static mut VecStatus { in cpu_pending() 62 return &mut __CPU_PENDING.as_mut().unwrap()[cpu_id]; in cpu_pending() 174 let cpu_id = smp_get_processor_id(); in do_softirq() localVariable 178 let pending = cpu_pending(cpu_id as usize).bits; in do_softirq() 179 cpu_pending(cpu_id as usize).bits = 0; in do_softirq() 213 if cpu_pending(cpu_id as usize).is_empty() { in do_softirq()
|
/DragonOS-0.1.8/kernel/src/process/ |
D | process.c | 57 …OC_UNINTERRUPTIBLE, .flags = PF_KTHREAD, .preempt_count = 0, .signal = 0, .cpu_id = 0, \ 353 initial_proc_union.pcb.cpu_id = 0; in process_init() 418 if (pcb->cpu_id == current_pcb->cpu_id) in process_wakeup_immediately() 421 rs_kick_cpu(pcb->cpu_id); in process_wakeup_immediately()
|
D | proc-types.h | 86 uint32_t cpu_id; // 当前进程在哪个CPU核心上运行 member
|
D | process.h | 167 #define proc_current_cpu_id (current_pcb->cpu_id)
|
D | fork.c | 95 tsk->cpu_id = proc_current_cpu_id; in do_fork()
|
D | process.rs | 109 unsafe { read_volatile(&(*pcb).cpu_id) } in process_cpu()
|
/DragonOS-0.1.8/kernel/src/ |
D | main.c | 108 ((struct process_control_block *)(ptr - STACK_SIZE))->cpu_id = 0; in system_initialize() 129 current_pcb->cpu_id = 0; in system_initialize()
|
/DragonOS-0.1.8/kernel/src/filesystem/procfs/ |
D | mod.rs | 155 pdata.append(&mut format!("\ncpu_id:\t{}", pcb.cpu_id).as_bytes().to_owned()); in open_status()
|