mirror of https://lore.kernel.org/lkml/
 help / color / mirror / Atom feed
* [Question] sched/rt_mutex: re-enqueue_task on rt_mutex_setprio()
@ 2012-07-07  5:44 Namhyung Kim
  2012-07-08  1:29 ` Steven Rostedt
  0 siblings, 1 reply; 5+ messages in thread
From: Namhyung Kim @ 2012-07-07  5:44 UTC (permalink / raw)
  To: Ingo Molnar, Peter Zijlstra; +Cc: Steven Rostedt, LKML

Hi,

I have a question on the code below:

void rt_mutex_setprio(struct task_struct *p, int prio)
{
        ...
	if (on_rq)
		enqueue_task(rq, p, oldprio < prio ? ENQUEUE_HEAD : 0);

When enqueueing @p with new @prio, it seems put @p at the head of a
rq if appropriate. I guess it's the case of boosting @p with higher
priority, right? So Should the conditional be a reverse form (provided
that less number means higher priority)? Please shed some light on me.

Thanks,
Namhyung


^ permalink raw reply	[flat|nested] 5+ messages in thread

end of thread, other threads:[~2012-07-09  7:07 UTC | newest]

Thread overview: 5+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2012-07-07  5:44 [Question] sched/rt_mutex: re-enqueue_task on rt_mutex_setprio() Namhyung Kim
2012-07-08  1:29 ` Steven Rostedt
2012-07-09  0:50   ` Namhyung Kim
2012-07-09  6:48     ` Peter Zijlstra
2012-07-09  7:07       ` Namhyung Kim

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®