Skip to contentSkip to conversation

sched/deadline: don't need to check throttled status when switched to dl

PATCH RESEND Superseded Wanpeng Li 3 participants 6 messages Mar 13, 2015 – Mar 17, 2015 Scheduler

v1 of 3 Superseded Latest is v3 →

lore
Share & tools
lore

Wanpeng Li

author
#0 lore raw

PATCH RESEND 1/1 sched/deadline: don't need to check throttled status when switched to dl

After commit 40767b0dc768 ("sched/deadline: Fix deadline parameter modification handling"), deadline task throttled status is cleared each time switch from dl, so throttled status always unset when switch back, there is no need to check throttled status, this patch drop the check.

---
 kernel/sched/deadline.c | 8 --------
 1 file changed, 8 deletions(-)
kernel/sched/deadline.c +0 -8
index 3fa8fa6..5cb5c9c 100644
@@ -1659,14 +1659,6 @@ static void switched_to_dl(struct rq *rq, struct task_struct *p)
 {
 	int check_resched = 1;
 
-	/*
-	 * If p is throttled, don't consider the possibility
-	 * of preempting rq->curr, the check will be done right
-	 * after its runtime will get replenished.
-	 */
-	if (unlikely(p->dl.dl_throttled))
-		return;
-
 	if (task_on_rq_queued(p) && rq->curr != p) {
 #ifdef CONFIG_SMP
 		if (p->nr_cpus_allowed > 1 && rq->dl.overloaded &&
Signature · 1 line
1.9.1
author
#1 lore raw

Ping Ingo, ;-)

Quoted 33 lines · Wanpeng Li

After commit 40767b0dc768 ("sched/deadline: Fix deadline parameter modification handling"), deadline task throttled status is cleared each time switch from dl, so throttled status always unset when switch back, there is no need to check throttled status, this patch drop the check.

---
kernel/sched/deadline.c | 8 --------

1 file changed, 8 deletions(-)
kernel/sched/deadline.c +0 -8
index 3fa8fa6..5cb5c9c 100644
@@ -1659,14 +1659,6 @@ static void switched_to_dl(struct rq *rq, struct task_struct *p)
 {
 	int check_resched = 1;
 
-	/*
-	 * If p is throttled, don't consider the possibility
-	 * of preempting rq->curr, the check will be done right
-	 * after its runtime will get replenished.
-	 */
-	if (unlikely(p->dl.dl_throttled))
-		return;
-
 	if (task_on_rq_queued(p) && rq->curr != p) {
 #ifdef CONFIG_SMP
 		if (p->nr_cpus_allowed > 1 && rq->dl.overloaded &&
Signature · 1 line
1.9.1
#2 lore raw
Quoted 1 line · Wanpeng Li

Ping Ingo, ;-)

So the changelog is not very readable to me, it has various spelling mistakes that make it hard to read. Seems like Juri acked the patch, mind asking him to fix the changelog to be readable?

Thanks,

Ingo

author
#3 lore raw
Quoted 8 lines · Ingo Molnar
Quoted 1 line · Wanpeng Li

Ping Ingo, ;-)

So the changelog is not very readable to me, it has various spelling mistakes that make it hard to read. Seems like Juri acked the patch, mind asking him to fix the changelog to be readable?

Oh, sorry for my bad english, I will update these two patches soon.

Regards,
Wanpeng Li

Quoted 4 lines

Thanks,

Ingo

#4 lore raw
In reply to Ingo Molnar

Hi Ingo,

Quoted 9 lines · Ingo Molnar
Quoted 1 line · Wanpeng Li

Ping Ingo, ;-)

So the changelog is not very readable to me, it has various spelling mistakes that make it hard to read. Seems like Juri acked the patch, mind asking him to fix the changelog to be readable?

Yes, sure. I'll go over the changelog of this and the other patches.

Thanks,

- Juri

Quoted 4 lines

Thanks,

Ingo

author
#5 lore raw
Quoted 6 lines · Juri Lelli

Hi Ingo,

Quoted 3 lines · Ingo Molnar

* Wanpeng Li <[email protected]> wrote:

Quoted 8 lines
Quoted 6 lines
Quoted 1 line

Ping Ingo, ;-)

So the changelog is not very readable to me, it has various spelling mistakes that make it hard to read. Seems like Juri acked the patch, mind asking him to fix the changelog to be readable?

Yes, sure. I'll go over the changelog of this and the other patches.

Thanks, ;-)

Regards,
Wanpeng Li

Quoted 9 lines

Thanks,

- Juri

Quoted 4 lines

Thanks,

Ingo