Scheduler patch recoding ...

fsawd en uaf.edu fsawd en uaf.edu
Sab Ene 22 01:24:16 CST 2000


I'm just courious if anybody tried a multiple-run queue scheduler.
More precisely, when a process belongs to a run queue which represents
it's priority in some way.
For example in functions add_to_runqueue, move_last_runqueue,
move_first_runqueue instead of doing

	list_add(&p->run_list, &runqueue_head);

do
	list_add(&p->run_list, &runqueue_head[p->priority]);

and then in schedule():

for (q=MAX_PRIORITY; q>=0 && !found; --q) {
	tmp = runqueue_head[q].next;
	while (tmp != &runqueue_head[q]); {
		p = list_entry(tmp, struct task_struct, run_list);
		if (can_schedule(p)) {
			int weight = goodness(p, this_cpu, prev->active_mm);
			if (weight > c)
				c = weight, next = p, found = 1;
		}
		tmp = tmp->next;
	}
}

.has anybody tried something similar?

-Adrian Drzewiecki

-
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo en vger.rutgers.edu
Please read the FAQ at http://www.tux.org/lkml/



Más información sobre la lista de distribución Ayuda