Groups | Search | Server Info | Keyboard shortcuts | Login | Register [http] [https] [nntp] [nntps]
Groups > linux.kernel > #1586639 > unrolled thread
| Started by | Joel Fernandes <joelaf@google.com> |
|---|---|
| First post | 2017-02-23 05:20 +0100 |
| Last post | 2017-02-28 14:20 +0100 |
| Articles | 3 — 3 participants |
Back to article view | Back to linux.kernel
[PATCH] sched: deadline: Fix confusing comments about selection of top pi-waiter Joel Fernandes <joelaf@google.com> - 2017-02-23 05:20 +0100
Re: [PATCH] sched: deadline: Fix confusing comments about selection of top pi-waiter Juri Lelli <Juri.Lelli@arm.com> - 2017-02-28 12:40 +0100
Re: [PATCH] sched: deadline: Fix confusing comments about selection of top pi-waiter Daniel Bristot de Oliveira <bristot@redhat.com> - 2017-02-28 14:20 +0100
| From | Joel Fernandes <joelaf@google.com> |
|---|---|
| Date | 2017-02-23 05:20 +0100 |
| Subject | [PATCH] sched: deadline: Fix confusing comments about selection of top pi-waiter |
| Message-ID | <tdT2N-4iH-5@gated-at.bofh.it> |
This comment in the code is incomplete, and I believe it begs a definition of
dl_boosted to make sense of the condition that follows. Rewrite the comment and
also rearrange the condition that follows to reflect the first condition "we
have a top pi-waiter which is a SCHED_DEADLINE task" in that order. Also fix a
typo that follows.
Cc: Juri Lelli <Juri.Lelli@arm.com>
Signed-off-by: Joel Fernandes <joelaf@google.com>
---
kernel/sched/deadline.c | 14 ++++++++------
1 file changed, 8 insertions(+), 6 deletions(-)
diff --git a/kernel/sched/deadline.c b/kernel/sched/deadline.c
index 70ef2b1901e4..4b86abcef135 100644
--- a/kernel/sched/deadline.c
+++ b/kernel/sched/deadline.c
@@ -928,17 +928,19 @@ static void enqueue_task_dl(struct rq *rq, struct task_struct *p, int flags)
struct sched_dl_entity *pi_se = &p->dl;
/*
- * Use the scheduling parameters of the top pi-waiter
- * task if we have one and its (absolute) deadline is
- * smaller than our one... OTW we keep our runtime and
- * deadline.
+ * Use the scheduling parameters of the top pi-waiter task if:
+ * - we have a top pi-waiter which is a SCHED_DEADLINE task AND
+ * - our dl_boosted is set (i.e. the pi-waiter's (absolute) deadline is
+ * smaller than our deadline OR we are a !SCHED_DEADLINE task getting
+ * boosted due to a SCHED_DEADLINE pi-waiter).
+ * Otherwise we keep our runtime and deadline.
*/
- if (pi_task && p->dl.dl_boosted && dl_prio(pi_task->normal_prio)) {
+ if (pi_task && dl_prio(pi_task->normal_prio) && p->dl.dl_boosted) {
pi_se = &pi_task->dl;
} else if (!dl_prio(p->normal_prio)) {
/*
* Special case in which we have a !SCHED_DEADLINE task
- * that is going to be deboosted, but exceedes its
+ * that is going to be deboosted, but exceeds its
* runtime while doing so. No point in replenishing
* it, as it's going to return back to its original
* scheduling class after this.
--
2.11.0.483.g087da7b7c-goog
[toc] | [next] | [standalone]
| From | Juri Lelli <Juri.Lelli@arm.com> |
|---|---|
| Date | 2017-02-28 12:40 +0100 |
| Subject | Re: [PATCH] sched: deadline: Fix confusing comments about selection of top pi-waiter |
| Message-ID | <tfOim-3OY-11@gated-at.bofh.it> |
| In reply to | #1586639 |
Hi, On 22/02/17 20:09, Joel Fernandes wrote: > This comment in the code is incomplete, and I believe it begs a definition of > dl_boosted to make sense of the condition that follows. Rewrite the comment and > also rearrange the condition that follows to reflect the first condition "we > have a top pi-waiter which is a SCHED_DEADLINE task" in that order. Also fix a > typo that follows. > > Cc: Juri Lelli <Juri.Lelli@arm.com> > Signed-off-by: Joel Fernandes <joelaf@google.com> Looks good to me. Acked-by: Juri Lelli <juri.lelli@arm.com> Thanks, - Juri
[toc] | [prev] | [next] | [standalone]
| From | Daniel Bristot de Oliveira <bristot@redhat.com> |
|---|---|
| Date | 2017-02-28 14:20 +0100 |
| Subject | Re: [PATCH] sched: deadline: Fix confusing comments about selection of top pi-waiter |
| Message-ID | <tfPR7-4Up-3@gated-at.bofh.it> |
| In reply to | #1586639 |
On 02/23/2017 05:09 AM, Joel Fernandes wrote: > This comment in the code is incomplete, and I believe it begs a definition of > dl_boosted to make sense of the condition that follows. Rewrite the comment and > also rearrange the condition that follows to reflect the first condition "we > have a top pi-waiter which is a SCHED_DEADLINE task" in that order. Also fix a > typo that follows. > > Cc: Juri Lelli <Juri.Lelli@arm.com> > Signed-off-by: Joel Fernandes <joelaf@google.com> Reviewed-by: Daniel Bristot de Oliveira <bristot@redhat.com> -- Daniel
[toc] | [prev] | [standalone]
Back to top | Article view | linux.kernel
csiph-web