Conversation
d7a5825 to
aa03033
Compare
2681d13 to
a01c51e
Compare
* mutex and cond should call `sched_dequeue` to remove `cur->ti_q` from its list when want to add `cur->ti_q` to another list. * Change itt (thumb instruction) to normal instruction, due to the problem on QEMU.
bf2a605 to
430a3bd
Compare
|
|
||
| ## Makefile | ||
|
|
||
| You can switch scheduler by makefile flags: |
There was a problem hiding this comment.
We should make scheduler pluggable as Linux does instead of configuring it at build time.
There was a problem hiding this comment.
It is possible to change scheduler in runtime using sched_select for now. But this is an easy step for running test and debugging.
430a3bd to
7e298bf
Compare
7e298bf to
f5d69e6
Compare
|
|
||
| int sched_select(int sched_type, struct thread_info *thread) | ||
| { | ||
| printk("Scheduler: "); |
There was a problem hiding this comment.
We don't need the invocation of printk in order to display scheduler internals literally. Instead, we can always deploy custom GDB script to perform deeper and effective tracing over existing framework.
There was a problem hiding this comment.
Sure, I'll take a reference from f9-kernel, except gdb script, maybe some probe can be plugin.
| int sched_rr_init(void) | ||
| int sched_rr_init(struct thread_info *thread) | ||
| { | ||
| if (thread) |
There was a problem hiding this comment.
Can we initialize without checking thread? That is, we can explicitly arrange the order.
There was a problem hiding this comment.
Why not check about thread is NULL or not (or maybe checking the type is struct thread_info), is there any benefit to put a NULL into runqueue?
5e65244 to
04a4478
Compare
This PR include three major fixed:
make SCHED=RR)