linux-rt-users.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
* [PATCH 3.4-rt] hrtimer:fix the miss of hrtimer_peek_ahead_timers in nort code
@ 2013-07-15 15:32 Paul Gortmaker
  2014-07-08 19:13 ` Steven Rostedt
  0 siblings, 1 reply; 2+ messages in thread
From: Paul Gortmaker @ 2013-07-15 15:32 UTC (permalink / raw)
  To: Steven Rostedt
  Cc: stable-rt, linux-rt-users, Zhao Hongjiang, Weng Meiling,
	Sebastian Andrzej Siewior, Paul Gortmaker

From: Zhao Hongjiang <zhaohongjiang@huawei.com>

When we run the test "taskset -c 1 stress -m 1 --vm-bytes 50M" and
"taskset -c 1 cyclictest -t 1 -p 80 -n -m -v" with rt closed 3.4.26-rt38 kernel,
the cyclictest's result is anomalous as follow:
       0:     278:       1
       0:     279:       2
       0:     280:      17
       0:     281:    1657
       0:     282:    1680
       0:     283:    4678
       0:     284:    7026
       0:     285:    6678
       0:     286:    9677
       0:     287:   12678
       0:     288:   13090
       0:     289:   14678
       0:     290:   17677
       0:     291:   20155
       0:     292:   19678
       0:     293:   22679
       0:     294:   25676
       0:     295:   26218
       0:     296:   27679
       0:     297:   30677
       0:     298:   33283
       0:     299:   32677
       0:     300:   35676
and the result is increase continuously forever. We find that the patch
("hrtimer: fixup hrtimer callback changes for preempt-rt") has missed
hrtimer_peek_ahead_timers() in hrtimer_rt_run_pending() fuction in nort
code. We fix this and the test result isn't increase continuously as same
as the result with nort 3.4.26 kernel as follow:
       0:     636:       8
       0:     637:       7
       0:     638:       8
       0:     639:       9
       0:     640:       7
       0:     641:       9
       0:     642:       8
       0:     643:       8
       0:     644:       8
       0:     645:      32
       0:     646:    8683
       0:     647:    7760
       0:     648:    6784
       0:     649:    5797
       0:     650:    4810
       0:     651:    3823
       0:     652:    2836
       0:     653:    1849
       0:     654:     862
       0:     655:       7
       0:     656:       7
       0:     657:       7
       0:     658:       6
       0:     659:       8
       0:     660:       7

Signed-off-by: Zhao Hongjiang <zhaohongjiang@huawei.com>
Signed-off-by: Weng Meiling <wengmeiling.weng@huawei.com>
Signed-off-by: Sebastian Andrzej Siewior <bigeasy@linutronix.de>
[PG: direct cherry pick of b236e408 from v3.6-rt]
Signed-off-by: Paul Gortmaker <paul.gortmaker@windriver.com>

diff --git a/kernel/hrtimer.c b/kernel/hrtimer.c
index c5f8b11..9d96d7a 100644
--- a/kernel/hrtimer.c
+++ b/kernel/hrtimer.c
@@ -1430,7 +1430,11 @@ static int hrtimer_rt_defer(struct hrtimer *timer)
 
 #else
 
-static inline void hrtimer_rt_run_pending(void) { }
+static inline void hrtimer_rt_run_pending(void)
+{
+	hrtimer_peek_ahead_timers();
+}
+
 static inline int hrtimer_rt_defer(struct hrtimer *timer) { return 0; }
 
 #endif
-- 
1.8.1.2


^ permalink raw reply related	[flat|nested] 2+ messages in thread

* Re: [PATCH 3.4-rt] hrtimer:fix the miss of hrtimer_peek_ahead_timers in nort code
  2013-07-15 15:32 [PATCH 3.4-rt] hrtimer:fix the miss of hrtimer_peek_ahead_timers in nort code Paul Gortmaker
@ 2014-07-08 19:13 ` Steven Rostedt
  0 siblings, 0 replies; 2+ messages in thread
From: Steven Rostedt @ 2014-07-08 19:13 UTC (permalink / raw)
  To: Paul Gortmaker
  Cc: stable-rt, linux-rt-users, Zhao Hongjiang, Weng Meiling,
	Sebastian Andrzej Siewior

Blast from the past. (cleaning out inbox)

On Mon, 15 Jul 2013 11:32:44 -0400
Paul Gortmaker <paul.gortmaker@windriver.com> wrote:

> From: Zhao Hongjiang <zhaohongjiang@huawei.com>
> 
> When we run the test "taskset -c 1 stress -m 1 --vm-bytes 50M" and
> "taskset -c 1 cyclictest -t 1 -p 80 -n -m -v" with rt closed 3.4.26-rt38 kernel,
> the cyclictest's result is anomalous as follow:
>        0:     278:       1
>        0:     279:       2
>        0:     280:      17
>        0:     281:    1657
>        0:     282:    1680
>        0:     283:    4678
>        0:     284:    7026
>        0:     285:    6678
>        0:     286:    9677
>        0:     287:   12678
>        0:     288:   13090
>        0:     289:   14678
>        0:     290:   17677
>        0:     291:   20155
>        0:     292:   19678
>        0:     293:   22679
>        0:     294:   25676
>        0:     295:   26218
>        0:     296:   27679
>        0:     297:   30677
>        0:     298:   33283
>        0:     299:   32677
>        0:     300:   35676
> and the result is increase continuously forever. We find that the patch
> ("hrtimer: fixup hrtimer callback changes for preempt-rt") has missed
> hrtimer_peek_ahead_timers() in hrtimer_rt_run_pending() fuction in nort
> code. We fix this and the test result isn't increase continuously as same
> as the result with nort 3.4.26 kernel as follow:
>        0:     636:       8
>        0:     637:       7
>        0:     638:       8
>        0:     639:       9
>        0:     640:       7
>        0:     641:       9
>        0:     642:       8
>        0:     643:       8
>        0:     644:       8
>        0:     645:      32
>        0:     646:    8683
>        0:     647:    7760
>        0:     648:    6784
>        0:     649:    5797
>        0:     650:    4810
>        0:     651:    3823
>        0:     652:    2836
>        0:     653:    1849
>        0:     654:     862
>        0:     655:       7
>        0:     656:       7
>        0:     657:       7
>        0:     658:       6
>        0:     659:       8
>        0:     660:       7
> 
> Signed-off-by: Zhao Hongjiang <zhaohongjiang@huawei.com>
> Signed-off-by: Weng Meiling <wengmeiling.weng@huawei.com>
> Signed-off-by: Sebastian Andrzej Siewior <bigeasy@linutronix.de>
> [PG: direct cherry pick of b236e408 from v3.6-rt]
> Signed-off-by: Paul Gortmaker <paul.gortmaker@windriver.com>
> 
> diff --git a/kernel/hrtimer.c b/kernel/hrtimer.c
> index c5f8b11..9d96d7a 100644
> --- a/kernel/hrtimer.c
> +++ b/kernel/hrtimer.c
> @@ -1430,7 +1430,11 @@ static int hrtimer_rt_defer(struct hrtimer *timer)
>  
>  #else
>  
> -static inline void hrtimer_rt_run_pending(void) { }
> +static inline void hrtimer_rt_run_pending(void)
> +{
> +	hrtimer_peek_ahead_timers();
> +}
> +
>  static inline int hrtimer_rt_defer(struct hrtimer *timer) { return 0; }
>  
>  #endif

Looking at my latest 3.4-rt, this doesn't look like it was applied.
Should I still apply it? Nobody seemed to notice.

-- Steve


^ permalink raw reply	[flat|nested] 2+ messages in thread

end of thread, other threads:[~2014-07-08 19:13 UTC | newest]

Thread overview: 2+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2013-07-15 15:32 [PATCH 3.4-rt] hrtimer:fix the miss of hrtimer_peek_ahead_timers in nort code Paul Gortmaker
2014-07-08 19:13 ` Steven Rostedt

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).