From: Con Kolivas <kernel@kolivas.org>
To: Adrian Drzewiecki <z@drze.net>
Cc: linux kernel mailing list <linux-kernel@vger.kernel.org>
Subject: Re: Staircase v7.4 question.
Date: Sat, 26 Jun 2004 11:13:00 +1000 [thread overview]
Message-ID: <40DCCD9C.9020402@kolivas.org> (raw)
In-Reply-To: <Pine.LNX.4.44.0406251410190.13512-100000@truch.net>
-----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-----
parent reply other threads:[~2004-06-26 1:13 UTC|newest]
Thread overview: expand[flat|nested] mbox.gz Atom feed
[parent not found: <Pine.LNX.4.44.0406251410190.13512-100000@truch.net>]
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=40DCCD9C.9020402@kolivas.org \
--to=kernel@kolivas.org \
--cc=linux-kernel@vger.kernel.org \
--cc=z@drze.net \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox