From: Ingo Molnar <mingo@elte.hu>
To: Dmitry Adamushko <dmitry.adamushko@gmail.com>
Cc: Andrew Morton <akpm@linux-foundation.org>,
Linux Kernel <linux-kernel@vger.kernel.org>
Subject: Re: [sched] redundant reschedule when set_user_nice() boosts a prio of a task from the "expired" array
Date: Wed, 4 Apr 2007 16:15:46 +0200 [thread overview]
Message-ID: <20070404141546.GA862@elte.hu> (raw)
In-Reply-To: <b647ffbd0704040704k2e4b3abcyfadc7662dff37f5b@mail.gmail.com>
* Dmitry Adamushko <dmitry.adamushko@gmail.com> wrote:
> Hello,
>
> Scenario:
>
> Currently running [task1] boosts a priority (lowers a static_prio) of
> [task2] via { setpriority -> set_user_nice } and [task2] happens to be
> in the "expired" array at the moment.
>
> According to the set_user_nice(), "delta" is negative (the prio is
> boosted) and, hence, resched_task(rq->curr) is called.
>
> As the [task2] is in the "expired" array and there are still tasks (at
> least [task1]) in the "active" one, the triggered reschedule is just
> useless (e.g. gets control back to [task1]).
>
> Am I missing something?
>
> The same is applicable to rt_mutex_setprio().
>
> Of course, not a big deal, but it's easily avoidable, e.g. (delta < 0
> && array == rq->active).
i think you are right and a micro-optimization could be done here. Would
you like to do a patch for this?
Ingo
next prev parent reply other threads:[~2007-04-04 14:15 UTC|newest]
Thread overview: 14+ messages / expand[flat|nested] mbox.gz Atom feed top
2007-04-04 14:04 [sched] redundant reschedule when set_user_nice() boosts a prio of a task from the "expired" array Dmitry Adamushko
2007-04-04 14:15 ` Ingo Molnar [this message]
2007-04-04 15:23 ` Dmitry Adamushko
2007-04-04 20:05 ` [PATCH] " Dmitry Adamushko
2007-04-07 0:03 ` Andrew Morton
2007-04-07 9:16 ` Dmitry Adamushko
2007-04-07 9:24 ` Ingo Molnar
2007-04-07 16:20 ` SD scheduler testing hitch Mike Galbraith
2007-04-07 17:17 ` Mike Galbraith
2007-04-08 8:02 ` Mike Galbraith
2007-04-09 0:14 ` Dmitry Adamushko
2007-04-09 0:23 ` Dmitry Adamushko
2007-04-09 5:54 ` Mike Galbraith
2007-04-07 9:19 ` [PATCH] [sched] redundant reschedule when set_user_nice() boosts a prio of a task from the "expired" array Ingo Molnar
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=20070404141546.GA862@elte.hu \
--to=mingo@elte.hu \
--cc=akpm@linux-foundation.org \
--cc=dmitry.adamushko@gmail.com \
--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