public inbox for linux-kernel@vger.kernel.org
 help / color / mirror / Atom feed
* Re: Staircase v7.4 question.
       [not found] <Pine.LNX.4.44.0406251410190.13512-100000@truch.net>
@ 2004-06-26  1:13 ` Con Kolivas
  0 siblings, 0 replies; only message in thread
From: Con Kolivas @ 2004-06-26  1:13 UTC (permalink / raw)
  To: Adrian Drzewiecki; +Cc: linux kernel mailing list

-----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-----

^ permalink raw reply	[flat|nested] only message in thread

only message in thread, other threads:[~2004-06-26  1:13 UTC | newest]

Thread overview: (only message) (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
     [not found] <Pine.LNX.4.44.0406251410190.13512-100000@truch.net>
2004-06-26  1:13 ` Staircase v7.4 question Con Kolivas

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox