Re: [PATCH] sched/deadline: overrun could happen in start_hrtick_dl

2014-07-08 Thread xiaofeng.yan
On 2014/7/8 20:52, Peter Zijlstra wrote: On Tue, Jul 08, 2014 at 07:50:22PM +0800, xiaofeng.yan wrote: I have tested this solution, It can work very well with deadline schedule class. Great, please send it as a proper patch and I might just press 'A' ;-) Ok, I will send it later. -- To

Re: [PATCH] sched/deadline: overrun could happen in start_hrtick_dl

2014-07-08 Thread Peter Zijlstra
On Tue, Jul 08, 2014 at 07:50:22PM +0800, xiaofeng.yan wrote: > I have tested this solution, It can work very well with deadline schedule > class. Great, please send it as a proper patch and I might just press 'A' ;-) pgprzatF0PKAM.pgp Description: PGP signature

Re: [PATCH] sched/deadline: overrun could happen in start_hrtick_dl

2014-07-08 Thread xiaofeng.yan
On 2014/7/8 19:23, xiaofeng.yan wrote: On 2014/7/8 17:33, Peter Zijlstra wrote: On Tue, Jul 08, 2014 at 08:53:27AM +, xiaofeng.yan wrote: static void start_hrtick_dl(struct rq *rq, struct task_struct *p) { -s64 delta = p->dl.dl_runtime - p->dl.runtime; - -if (delta > 1) -

Re: [PATCH] sched/deadline: overrun could happen in start_hrtick_dl

2014-07-08 Thread xiaofeng.yan
On 2014/7/8 17:33, Peter Zijlstra wrote: On Tue, Jul 08, 2014 at 08:53:27AM +, xiaofeng.yan wrote: static void start_hrtick_dl(struct rq *rq, struct task_struct *p) { - s64 delta = p->dl.dl_runtime - p->dl.runtime; - - if (delta > 1) - hrtick_start(rq,

Re: [PATCH] sched/deadline: overrun could happen in start_hrtick_dl

2014-07-08 Thread Bernd Petrovitsch
On Die, 2014-07-08 at 11:33 +0200, Peter Zijlstra wrote: [...] > diff --git a/kernel/sched/deadline.c b/kernel/sched/deadline.c > index fc4f98b1258f..e1e24eea8061 100644 > --- a/kernel/sched/deadline.c > +++ b/kernel/sched/deadline.c > @@ -999,8 +999,7 @@ static void start_hrtick_dl(struct rq *rq,

Re: [PATCH] sched/deadline: overrun could happen in start_hrtick_dl

2014-07-08 Thread Peter Zijlstra
On Tue, Jul 08, 2014 at 08:53:27AM +, xiaofeng.yan wrote: > static void start_hrtick_dl(struct rq *rq, struct task_struct *p) > { > - s64 delta = p->dl.dl_runtime - p->dl.runtime; > - > - if (delta > 1) > - hrtick_start(rq, p->dl.runtime); > + delta = max_t(s64,

[PATCH] sched/deadline: overrun could happen in start_hrtick_dl

2014-07-08 Thread xiaofeng.yan
It could be wrong for the precision of runtime and deadline when the precision is within microsecond level. For example: Task runtime deadline period P1 200us 500us 500us This case need enbale HRTICK feature by the next command PC#echo "HRTICK" > /sys/kernel/debug/sched_features

Re: [PATCH] sched/deadline: overrun could happen in start_hrtick_dl

2014-07-08 Thread xiaofeng.yan
On 2014/7/8 16:53, xiaofeng.yan wrote: Sorry, I send a old patch and send a new one later. Thanks Yan It could be wrong for the precision of runtime and deadline when the precision is within microsecond level. For example: Task runtime deadline period P1 200us 500us 500us This case

[PATCH] sched/deadline: overrun could happen in start_hrtick_dl

2014-07-08 Thread xiaofeng.yan
It could be wrong for the precision of runtime and deadline when the precision is within microsecond level. For example: Task runtime deadline period P1 200us 500us 500us This case need enbale HRTICK feature by the next command PC#echo "HRTICK" > /sys/kernel/debug/sched_features

[PATCH] sched/deadline: overrun could happen in start_hrtick_dl

2014-07-08 Thread xiaofeng.yan
It could be wrong for the precision of runtime and deadline when the precision is within microsecond level. For example: Task runtime deadline period P1 200us 500us 500us This case need enbale HRTICK feature by the next command PC#echo HRTICK /sys/kernel/debug/sched_features PC#trace-cmd

Re: [PATCH] sched/deadline: overrun could happen in start_hrtick_dl

2014-07-08 Thread xiaofeng.yan
On 2014/7/8 16:53, xiaofeng.yan wrote: Sorry, I send a old patch and send a new one later. Thanks Yan It could be wrong for the precision of runtime and deadline when the precision is within microsecond level. For example: Task runtime deadline period P1 200us 500us 500us This case

[PATCH] sched/deadline: overrun could happen in start_hrtick_dl

2014-07-08 Thread xiaofeng.yan
It could be wrong for the precision of runtime and deadline when the precision is within microsecond level. For example: Task runtime deadline period P1 200us 500us 500us This case need enbale HRTICK feature by the next command PC#echo HRTICK /sys/kernel/debug/sched_features PC#trace-cmd

Re: [PATCH] sched/deadline: overrun could happen in start_hrtick_dl

2014-07-08 Thread Peter Zijlstra
On Tue, Jul 08, 2014 at 08:53:27AM +, xiaofeng.yan wrote: static void start_hrtick_dl(struct rq *rq, struct task_struct *p) { - s64 delta = p-dl.dl_runtime - p-dl.runtime; - - if (delta 1) - hrtick_start(rq, p-dl.runtime); + delta = max_t(s64, 1LL,

Re: [PATCH] sched/deadline: overrun could happen in start_hrtick_dl

2014-07-08 Thread Bernd Petrovitsch
On Die, 2014-07-08 at 11:33 +0200, Peter Zijlstra wrote: [...] diff --git a/kernel/sched/deadline.c b/kernel/sched/deadline.c index fc4f98b1258f..e1e24eea8061 100644 --- a/kernel/sched/deadline.c +++ b/kernel/sched/deadline.c @@ -999,8 +999,7 @@ static void start_hrtick_dl(struct rq *rq,

Re: [PATCH] sched/deadline: overrun could happen in start_hrtick_dl

2014-07-08 Thread xiaofeng.yan
On 2014/7/8 17:33, Peter Zijlstra wrote: On Tue, Jul 08, 2014 at 08:53:27AM +, xiaofeng.yan wrote: static void start_hrtick_dl(struct rq *rq, struct task_struct *p) { - s64 delta = p-dl.dl_runtime - p-dl.runtime; - - if (delta 1) - hrtick_start(rq,

Re: [PATCH] sched/deadline: overrun could happen in start_hrtick_dl

2014-07-08 Thread xiaofeng.yan
On 2014/7/8 19:23, xiaofeng.yan wrote: On 2014/7/8 17:33, Peter Zijlstra wrote: On Tue, Jul 08, 2014 at 08:53:27AM +, xiaofeng.yan wrote: static void start_hrtick_dl(struct rq *rq, struct task_struct *p) { -s64 delta = p-dl.dl_runtime - p-dl.runtime; - -if (delta 1) -

Re: [PATCH] sched/deadline: overrun could happen in start_hrtick_dl

2014-07-08 Thread Peter Zijlstra
On Tue, Jul 08, 2014 at 07:50:22PM +0800, xiaofeng.yan wrote: I have tested this solution, It can work very well with deadline schedule class. Great, please send it as a proper patch and I might just press 'A' ;-) pgprzatF0PKAM.pgp Description: PGP signature

Re: [PATCH] sched/deadline: overrun could happen in start_hrtick_dl

2014-07-08 Thread xiaofeng.yan
On 2014/7/8 20:52, Peter Zijlstra wrote: On Tue, Jul 08, 2014 at 07:50:22PM +0800, xiaofeng.yan wrote: I have tested this solution, It can work very well with deadline schedule class. Great, please send it as a proper patch and I might just press 'A' ;-) Ok, I will send it later. -- To