From: Der Herr Hofrat <der.herr@hofr.at>
To: linux-kernel@vger.kernel.org
Subject: 2.6.0 schedule_tick question
Date: Sat, 10 Jan 2004 13:35:30 +0100 (CET) [thread overview]
Message-ID: <200401101235.i0ACZUS12298@hofr.at> (raw)
HI !
in 2.6.0 kernel/sched.c scheduler_tick currently the
case of rt_tasks for SCHED_RR is doing
if ((p->policy == SCHED_RR) && !--p->time_slice) {
...
dequeue_task(p, rq->active);
enqueue_task(p, rq->active);
which is:
static inline void dequeue_task(struct task_struct *p, prio_array_t *array)
{
array->nr_active--;
list_del(&p->run_list);
if (list_empty(array->queue + p->prio))
__clear_bit(p->prio, array->bitmap);
}
static inline void enqueue_task(struct task_struct *p, prio_array_t *array)
{
list_add_tail(&p->run_list, array->queue + p->prio);
__set_bit(p->prio, array->bitmap);
array->nr_active++;
p->array = array;
}
looking at these two functions this looks like quite some overhead as it
actually could be reduced to:
list_del(&p->run_list);
list_add_tail(&p->run_list, array->queue + p->prio);
for the rest I don't see any effect it would have ?
hofrat
next reply other threads:[~2004-01-11 12:36 UTC|newest]
Thread overview: 4+ messages / expand[flat|nested] mbox.gz Atom feed top
2004-01-10 12:35 Der Herr Hofrat [this message]
2004-01-11 16:57 ` Davide Libenzi
2004-01-10 17:22 ` Der Herr Hofrat
2004-01-11 17:32 ` Davide Libenzi
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=200401101235.i0ACZUS12298@hofr.at \
--to=der.herr@hofr.at \
--cc=linux-kernel@vger.kernel.org \
/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
all inboxes | Powered by JetHome®