2015-06-15 03:21:11

by Zhiqiang Zhang

[permalink] [raw]
Subject: [PATCH] sched/deadline: remove needless parameter in dl_runtime_exceeded()

Sine commit 269ad80(sched/deadline: Avoid double-accounting in
case of missed deadlines), parameter rq is no longer used, so
remove it.

Signed-off-by: Zhiqiang Zhang <[email protected]>
---
kernel/sched/deadline.c | 4 ++--
1 file changed, 2 insertions(+), 2 deletions(-)

diff --git a/kernel/sched/deadline.c b/kernel/sched/deadline.c
index 5e95145..437ecdc 100644
--- a/kernel/sched/deadline.c
+++ b/kernel/sched/deadline.c
@@ -640,7 +640,7 @@ void init_dl_task_timer(struct sched_dl_entity *dl_se)
}

static
-int dl_runtime_exceeded(struct rq *rq, struct sched_dl_entity *dl_se)
+int dl_runtime_exceeded(struct sched_dl_entity *dl_se)
{
return (dl_se->runtime <= 0);
}
@@ -684,7 +684,7 @@ static void update_curr_dl(struct rq *rq)
sched_rt_avg_update(rq, delta_exec);

dl_se->runtime -= dl_se->dl_yielded ? 0 : delta_exec;
- if (dl_runtime_exceeded(rq, dl_se)) {
+ if (dl_runtime_exceeded(dl_se)) {
dl_se->dl_throttled = 1;
__dequeue_task_dl(rq, curr, 0);
if (unlikely(!start_dl_timer(dl_se, curr->dl.dl_boosted)))
--
1.9.0


2015-06-16 09:28:11

by Luca Abeni

[permalink] [raw]
Subject: Re: [PATCH] sched/deadline: remove needless parameter in dl_runtime_exceeded()

Hello,

On 06/15/2015 05:15 AM, Zhiqiang Zhang wrote:
> Sine commit 269ad80(sched/deadline: Avoid double-accounting in
> case of missed deadlines), parameter rq is no longer used, so
> remove it.
I do not know if other people have plans to use this "rq" parameter,
but the patch looks ok to me.


Thanks,
Luca


>
> Signed-off-by: Zhiqiang Zhang <[email protected]>
> ---
> kernel/sched/deadline.c | 4 ++--
> 1 file changed, 2 insertions(+), 2 deletions(-)
>
> diff --git a/kernel/sched/deadline.c b/kernel/sched/deadline.c
> index 5e95145..437ecdc 100644
> --- a/kernel/sched/deadline.c
> +++ b/kernel/sched/deadline.c
> @@ -640,7 +640,7 @@ void init_dl_task_timer(struct sched_dl_entity *dl_se)
> }
>
> static
> -int dl_runtime_exceeded(struct rq *rq, struct sched_dl_entity *dl_se)
> +int dl_runtime_exceeded(struct sched_dl_entity *dl_se)
> {
> return (dl_se->runtime <= 0);
> }
> @@ -684,7 +684,7 @@ static void update_curr_dl(struct rq *rq)
> sched_rt_avg_update(rq, delta_exec);
>
> dl_se->runtime -= dl_se->dl_yielded ? 0 : delta_exec;
> - if (dl_runtime_exceeded(rq, dl_se)) {
> + if (dl_runtime_exceeded(dl_se)) {
> dl_se->dl_throttled = 1;
> __dequeue_task_dl(rq, curr, 0);
> if (unlikely(!start_dl_timer(dl_se, curr->dl.dl_boosted)))
>

Subject: [tip:sched/core] sched/deadline: Remove needless parameter in dl_runtime_exceeded()

Commit-ID: 6fab54101923044712baee429ff573f03b99fc47
Gitweb: http://git.kernel.org/tip/6fab54101923044712baee429ff573f03b99fc47
Author: Zhiqiang Zhang <[email protected]>
AuthorDate: Mon, 15 Jun 2015 11:15:20 +0800
Committer: Ingo Molnar <[email protected]>
CommitDate: Fri, 19 Jun 2015 10:06:48 +0200

sched/deadline: Remove needless parameter in dl_runtime_exceeded()

Sine commit 269ad8015a6b ("sched/deadline: Avoid double-accounting in
case of missed deadlines), parameter 'rq' is no longer used, so
remove it.

Signed-off-by: Zhiqiang Zhang <[email protected]>
Signed-off-by: Peter Zijlstra (Intel) <[email protected]>
Cc: <[email protected]>
Cc: <[email protected]>
Cc: Andrew Morton <[email protected]>
Cc: Borislav Petkov <[email protected]>
Cc: H. Peter Anvin <[email protected]>
Cc: Linus Torvalds <[email protected]>
Cc: Peter Zijlstra <[email protected]>
Cc: Thomas Gleixner <[email protected]>
Link: http://lkml.kernel.org/r/[email protected]
Signed-off-by: Ingo Molnar <[email protected]>
---
kernel/sched/deadline.c | 4 ++--
1 file changed, 2 insertions(+), 2 deletions(-)

diff --git a/kernel/sched/deadline.c b/kernel/sched/deadline.c
index 98f7871..392e8fb 100644
--- a/kernel/sched/deadline.c
+++ b/kernel/sched/deadline.c
@@ -640,7 +640,7 @@ void init_dl_task_timer(struct sched_dl_entity *dl_se)
}

static
-int dl_runtime_exceeded(struct rq *rq, struct sched_dl_entity *dl_se)
+int dl_runtime_exceeded(struct sched_dl_entity *dl_se)
{
return (dl_se->runtime <= 0);
}
@@ -684,7 +684,7 @@ static void update_curr_dl(struct rq *rq)
sched_rt_avg_update(rq, delta_exec);

dl_se->runtime -= dl_se->dl_yielded ? 0 : delta_exec;
- if (dl_runtime_exceeded(rq, dl_se)) {
+ if (dl_runtime_exceeded(dl_se)) {
dl_se->dl_throttled = 1;
__dequeue_task_dl(rq, curr, 0);
if (unlikely(!start_dl_timer(dl_se, curr->dl.dl_boosted)))