File tree Expand file tree Collapse file tree 1 file changed +0
-32
lines changed
scheds/rust/scx_lavd/src/bpf Expand file tree Collapse file tree 1 file changed +0
-32
lines changed Original file line number Diff line number Diff line change @@ -215,38 +215,6 @@ static int pick_cpu_with_lowest_vtime(struct cpdom_ctx *cpdomc)
215215 return pick_cpu ;
216216}
217217
218- /*
219- * For simplicity, try to just steal from the CPU with
220- * the highest number of queued_tasks in this domain.
221- */
222- static int pick_most_loaded_cpu (struct cpdom_ctx * cpdomc ) {
223- u64 highest_queued = 0 ;
224- int pick_cpu = - ENOENT ;
225- int cpu , i , j ;
226-
227- if (!per_cpu_dsq )
228- return - ENOENT ;
229-
230- bpf_for (i , 0 , LAVD_CPU_ID_MAX /64 ) {
231- u64 cpumask = cpdomc -> __cpumask [i ];
232- bpf_for (j , 0 , 64 ) {
233- if (cpumask & 0x1LLU << j ) {
234- u64 queued ;
235- cpu = (i * 64 ) + j ;
236- if (cpu >= __nr_cpu_ids )
237- break ;
238- queued = scx_bpf_dsq_nr_queued (cpu_to_dsq (cpu ));
239- if (queued > highest_queued ) {
240- highest_queued = queued ;
241- pick_cpu = cpu ;
242- }
243- }
244- }
245- }
246-
247- return pick_cpu ;
248- }
249-
250218static bool try_to_steal_task (struct cpdom_ctx * cpdomc )
251219{
252220 struct cpdom_ctx * cpdomc_pick ;
You can’t perform that action at this time.
0 commit comments