* [PATCH]sched/stop_task: Do not account zero delta_exec in put_prev_task_stop
@ 2013-02-11 21:40 Kirill Tkhai
2013-02-13 6:15 ` Namhyung Kim
2013-02-14 19:23 ` Steven Rostedt
0 siblings, 2 replies; 4+ messages in thread
From: Kirill Tkhai @ 2013-02-11 21:40 UTC (permalink / raw)
To: linux-kernel@vger.kernel.org
Cc: Steven Rostedt, Ingo Molnar, Peter Zijlstra, linux-rt-users
Simple return
Signed-off-by: Kirill V Tkhai <tkhai@yandex.ru>
CC: Steven Rostedt <rostedt@goodmis.org>
CC: Ingo Molnar <mingo@kernel.org>
CC: Peter Zijlstra <peterz@infradead.org>
CC: linux-rt-users <linux-rt-users@vger.kernel.org>
---
kernel/sched/stop_task.c | 4 ++--
1 file changed, 2 insertions(+), 2 deletions(-)
diff --git a/kernel/sched/stop_task.c b/kernel/sched/stop_task.c
index da5eb5b..78d0458 100644
--- a/kernel/sched/stop_task.c
+++ b/kernel/sched/stop_task.c
@@ -58,8 +58,8 @@ static void put_prev_task_stop(struct rq *rq, struct task_struct *prev)
u64 delta_exec;
delta_exec = rq->clock_task - curr->se.exec_start;
- if (unlikely((s64)delta_exec < 0))
- delta_exec = 0;
+ if (unlikely((s64)delta_exec <= 0))
+ return;
schedstat_set(curr->se.statistics.exec_max,
max(curr->se.statistics.exec_max, delta_exec));
^ permalink raw reply related [flat|nested] 4+ messages in thread
* Re: [PATCH]sched/stop_task: Do not account zero delta_exec in put_prev_task_stop
2013-02-11 21:40 [PATCH]sched/stop_task: Do not account zero delta_exec in put_prev_task_stop Kirill Tkhai
@ 2013-02-13 6:15 ` Namhyung Kim
2013-02-14 19:25 ` Steven Rostedt
2013-02-14 19:23 ` Steven Rostedt
1 sibling, 1 reply; 4+ messages in thread
From: Namhyung Kim @ 2013-02-13 6:15 UTC (permalink / raw)
To: Kirill Tkhai
Cc: linux-kernel@vger.kernel.org, Steven Rostedt, Ingo Molnar,
Peter Zijlstra, linux-rt-users
Hi Kirill,
On Tue, 12 Feb 2013 01:40:04 +0400, Kirill Tkhai wrote:
> Simple return
>
> Signed-off-by: Kirill V Tkhai <tkhai@yandex.ru>
> CC: Steven Rostedt <rostedt@goodmis.org>
> CC: Ingo Molnar <mingo@kernel.org>
> CC: Peter Zijlstra <peterz@infradead.org>
> CC: linux-rt-users <linux-rt-users@vger.kernel.org>
> ---
> kernel/sched/stop_task.c | 4 ++--
> 1 file changed, 2 insertions(+), 2 deletions(-)
> diff --git a/kernel/sched/stop_task.c b/kernel/sched/stop_task.c
> index da5eb5b..78d0458 100644
> --- a/kernel/sched/stop_task.c
> +++ b/kernel/sched/stop_task.c
> @@ -58,8 +58,8 @@ static void put_prev_task_stop(struct rq *rq, struct task_struct *prev)
> u64 delta_exec;
>
> delta_exec = rq->clock_task - curr->se.exec_start;
> - if (unlikely((s64)delta_exec < 0))
> - delta_exec = 0;
> + if (unlikely((s64)delta_exec <= 0))
> + return;
It seems it needs to update curr->se.exec_start then.
Thanks,
Namhyung
>
> schedstat_set(curr->se.statistics.exec_max,
> max(curr->se.statistics.exec_max, delta_exec));
> --
> To unsubscribe from this list: send the line "unsubscribe linux-rt-users" in
> the body of a message to majordomo@vger.kernel.org
> More majordomo info at http://vger.kernel.org/majordomo-info.html
^ permalink raw reply [flat|nested] 4+ messages in thread
* Re: [PATCH]sched/stop_task: Do not account zero delta_exec in put_prev_task_stop
2013-02-11 21:40 [PATCH]sched/stop_task: Do not account zero delta_exec in put_prev_task_stop Kirill Tkhai
2013-02-13 6:15 ` Namhyung Kim
@ 2013-02-14 19:23 ` Steven Rostedt
1 sibling, 0 replies; 4+ messages in thread
From: Steven Rostedt @ 2013-02-14 19:23 UTC (permalink / raw)
To: Kirill Tkhai
Cc: linux-kernel@vger.kernel.org, Ingo Molnar, Peter Zijlstra,
linux-rt-users
On Tue, 2013-02-12 at 01:40 +0400, Kirill Tkhai wrote:
> Simple return
>
I'll ack the patch, but I nack the change log. Please write something up
that's a little more descriptive.
Thanks,
-- Steve
> Signed-off-by: Kirill V Tkhai <tkhai@yandex.ru>
> CC: Steven Rostedt <rostedt@goodmis.org>
> CC: Ingo Molnar <mingo@kernel.org>
> CC: Peter Zijlstra <peterz@infradead.org>
> CC: linux-rt-users <linux-rt-users@vger.kernel.org>
> ---
> kernel/sched/stop_task.c | 4 ++--
> 1 file changed, 2 insertions(+), 2 deletions(-)
> diff --git a/kernel/sched/stop_task.c b/kernel/sched/stop_task.c
> index da5eb5b..78d0458 100644
> --- a/kernel/sched/stop_task.c
> +++ b/kernel/sched/stop_task.c
> @@ -58,8 +58,8 @@ static void put_prev_task_stop(struct rq *rq, struct task_struct *prev)
> u64 delta_exec;
>
> delta_exec = rq->clock_task - curr->se.exec_start;
> - if (unlikely((s64)delta_exec < 0))
> - delta_exec = 0;
> + if (unlikely((s64)delta_exec <= 0))
> + return;
>
> schedstat_set(curr->se.statistics.exec_max,
> max(curr->se.statistics.exec_max, delta_exec));
^ permalink raw reply [flat|nested] 4+ messages in thread
* Re: [PATCH]sched/stop_task: Do not account zero delta_exec in put_prev_task_stop
2013-02-13 6:15 ` Namhyung Kim
@ 2013-02-14 19:25 ` Steven Rostedt
0 siblings, 0 replies; 4+ messages in thread
From: Steven Rostedt @ 2013-02-14 19:25 UTC (permalink / raw)
To: Namhyung Kim
Cc: Kirill Tkhai, linux-kernel@vger.kernel.org, Ingo Molnar,
Peter Zijlstra, linux-rt-users
On Wed, 2013-02-13 at 15:15 +0900, Namhyung Kim wrote:
> ---
> > kernel/sched/stop_task.c | 4 ++--
> > 1 file changed, 2 insertions(+), 2 deletions(-)
> > diff --git a/kernel/sched/stop_task.c b/kernel/sched/stop_task.c
> > index da5eb5b..78d0458 100644
> > --- a/kernel/sched/stop_task.c
> > +++ b/kernel/sched/stop_task.c
> > @@ -58,8 +58,8 @@ static void put_prev_task_stop(struct rq *rq, struct task_struct *prev)
> > u64 delta_exec;
> >
> > delta_exec = rq->clock_task - curr->se.exec_start;
> > - if (unlikely((s64)delta_exec < 0))
> > - delta_exec = 0;
> > + if (unlikely((s64)delta_exec <= 0))
> > + return;
>
> It seems it needs to update curr->se.exec_start then.
>
Ah, if it's less than zero, it does.
A better patch would be:
if (unlikely((s64)delta_exec <= 0)) {
curr->se.exec_start = rq->clock_task;
return;
}
Thanks!
-- Steve
^ permalink raw reply [flat|nested] 4+ messages in thread
end of thread, other threads:[~2013-02-14 19:25 UTC | newest]
Thread overview: 4+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2013-02-11 21:40 [PATCH]sched/stop_task: Do not account zero delta_exec in put_prev_task_stop Kirill Tkhai
2013-02-13 6:15 ` Namhyung Kim
2013-02-14 19:25 ` Steven Rostedt
2013-02-14 19:23 ` Steven Rostedt
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.