scheduler_affine: Add logic shared with simple scheduler

The scheduler is in very early stage. There is no thread migration and
the algorithms choosing CPU for thread are very simple.

Since affine scheduler is going to use one run queue per core simple on
single core machines it will work exactly the same as simple scheduler.
That would allow us to have only one scheduler implementation usable
on all kinds of machines.
This commit is contained in:
Pawel Dziepak
2013-10-16 23:50:18 +02:00
parent 824ed26c51
commit 3ec1d8da42
2 changed files with 606 additions and 215 deletions
File diff suppressed because it is too large Load Diff
@@ -162,9 +162,12 @@ dump_run_queue(int argc, char** argv)
return 0; return 0;
for (int32 i = 0; i < cpuCount; i++) { for (int32 i = 0; i < cpuCount; i++) {
kprintf("\nCPU %d run queue:\n", i); iterator = sCPURunQueues[i].GetConstIterator();
sCPURunQueues[i].GetConstIterator();
dump_queue(iterator); if (iterator.HasNext()) {
kprintf("\nCPU %" B_PRId32 " run queue:\n", i);
dump_queue(iterator);
}
} }
return 0; return 0;