Re: Staircase v7.4 question.

Con Kolivas
2004-06-26T01:13:22Z

-----BEGIN PGP SIGNED MESSAGE-----
Hash: SHA1

Adrian Drzewiecki wrote:
| Hi Con,
| Wonderful job on the scheduler! I really like the simplicity of
staircase
| vs mainline, and am very happy with its behaviour.
| I was hand-applying the patch from 7.3 to 7.4, and 'enqueue_task' seemed
| inconsistant from your description:
|
| "Preempted tasks [...] will go ahead of other tasks [...]"
|
| The code is:
|
| static void enqueue_task(struct task_struct *p, runqueue_t *rq)
| {
| if (rq->curr->flags & PF_PREEMPTED) {
| rq->curr->flags &= ~PF_PREEMPTED;
| list_add(&p->run_list, rq->queue + p->prio);
| } else
| list_add_tail(&p->run_list, rq->queue + p->prio);
| __set_bit(p->prio, rq->bitmap);
| }
|
| This would insert other tasks in front of a task which was just preempted.
| Shouldn't the code be:
|
| if (p->flags & PF_PREEMPTED) {
| p->flags &= ~PF_PREEMPTED;
| ....

Eeek!

Indeed. Brain fart. Looks like I introduced a couple of bugs here after
all :P

Con
-----BEGIN PGP SIGNATURE-----
Version: GnuPG v1.2.4 (GNU/Linux)
Comment: Using GnuPG with Thunderbird - http://enigmail.mozdev.org

iD8DBQFA3M2bZUg7+tp6mRURAmmCAJwKw7GnQ73CMgj8k6a5dmbpRKwN3QCeMDQ9
dxSUhYXd2yj2XxygEc4p2Vg=
=/APw
-----END PGP SIGNATURE-----