[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Date: Wed, 4 Apr 2007 16:15:46 +0200
From: Ingo Molnar <mingo@...e.hu>
To: Dmitry Adamushko <dmitry.adamushko@...il.com>
Cc: Andrew Morton <akpm@...ux-foundation.org>,
Linux Kernel <linux-kernel@...r.kernel.org>
Subject: Re: [sched] redundant reschedule when set_user_nice() boosts a prio of a task from the "expired" array
* Dmitry Adamushko <dmitry.adamushko@...il.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
-
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@...r.kernel.org
More majordomo info at http://vger.kernel.org/majordomo-info.html
Please read the FAQ at http://www.tux.org/lkml/
Powered by blists - more mailing lists