Groups | Search | Server Info | Keyboard shortcuts | Login | Register [http] [https] [nntp] [nntps]


Groups > linux.kernel > #1338160 > unrolled thread

Question about prio_changed_dl()

Started byluca abeni <luca.abeni@unitn.it>
First post2016-02-19 13:50 +0100
Last post2016-02-19 13:50 +0100
Articles 1 — 1 participant

Back to article view | Back to linux.kernel


Contents

  Question about prio_changed_dl() luca abeni <luca.abeni@unitn.it> - 2016-02-19 13:50 +0100

#1338160 — Question about prio_changed_dl()

Fromluca abeni <luca.abeni@unitn.it>
Date2016-02-19 13:50 +0100
SubjectQuestion about prio_changed_dl()
Message-ID<r3SFr-5b7-3@gated-at.bofh.it>
Hi,

when playing with the __dl_{add,sub}_ac() stuff recently posted by
Juri, I found something that looks strange in prio_changed_dl():

static void prio_changed_dl(struct rq *rq, struct task_struct *p,
			    int oldprio)
{
	if (task_on_rq_queued(p) || rq->curr == p) {
		[...]
	} else
		switched_to_dl(rq, p);
}
but switched_to_dl() does:
static void switched_to_dl(struct rq *rq, struct task_struct *p)
{
	if (task_on_rq_queued(p) && rq->curr != p) {
		[...]
	}
}

so, prio_changed_dl() invokes switched_to_dl() if task_on_rq_queued()
is false, but in this case switched_to_dl() does nothing... Am I
missing something, or the
	} else
		switched_to_dl(rq, p);
is useless?
(BTW, it seems to me that switched_to_dl() is never invoked, for some
reason...)


			Thanks,
				Luca

If you wonder how this is related to __dl_{add,sub}_ac(), I am going to
write an email about it in a short time :)

[toc] | [standalone]


Back to top | Article view | linux.kernel


csiph-web