Re: [PATCH v7 2/2] clocksource: add J-Core timer/clocksource driver

2016-10-09 Thread Rich Felker
On Sun, Oct 09, 2016 at 11:14:20AM +0200, Thomas Gleixner wrote: > Rich, > > On Sat, 8 Oct 2016, Rich Felker wrote: > > On Sat, Oct 08, 2016 at 07:03:30PM +0200, Thomas Gleixner wrote: > > > Because you drop out the idle spin due to an interrupt, but no interrupt > > > is > > > handled according

Re: [PATCH v7 2/2] clocksource: add J-Core timer/clocksource driver

2016-10-09 Thread Thomas Gleixner
Rich, On Sat, 8 Oct 2016, Rich Felker wrote: > On Sat, Oct 08, 2016 at 07:03:30PM +0200, Thomas Gleixner wrote: > > Because you drop out the idle spin due to an interrupt, but no interrupt is > > handled according to the trace. You just go back to sleep and the trace is > > full of this

Re: [PATCH v7 2/2] clocksource: add J-Core timer/clocksource driver

2016-10-08 Thread Rich Felker
On Sat, Oct 08, 2016 at 07:03:30PM +0200, Thomas Gleixner wrote: > On Sat, 8 Oct 2016, Rich Felker wrote: > > On Sat, Oct 08, 2016 at 01:32:06PM +0200, Thomas Gleixner wrote: > > > CPU spins and waits for an interrupt to happen > > > > > > > > > -0 [000] d... 150.841530:

Re: [PATCH v7 2/2] clocksource: add J-Core timer/clocksource driver

2016-10-08 Thread Thomas Gleixner
On Sat, 8 Oct 2016, Rich Felker wrote: > On Sat, Oct 08, 2016 at 01:32:06PM +0200, Thomas Gleixner wrote: > > CPU spins and waits for an interrupt to happen > > > > > > -0 [000] d... 150.841530: rcu_dyntick: End 0 1 > > > > Dropping out of the spin about the time we expect the

Re: [PATCH v7 2/2] clocksource: add J-Core timer/clocksource driver

2016-10-08 Thread Rich Felker
On Sat, Oct 08, 2016 at 01:32:06PM +0200, Thomas Gleixner wrote: > On Fri, 7 Oct 2016, Rich Felker wrote: > > > > If I'm not mistaken, the bug is in tick_nohz_restart. According to the > > I think you are mistaken. Let's look at CPU0 only: OK. > -0 [000] d... 150.829698:

Re: [PATCH v7 2/2] clocksource: add J-Core timer/clocksource driver

2016-10-08 Thread Thomas Gleixner
On Fri, 7 Oct 2016, Rich Felker wrote: > > If I'm not mistaken, the bug is in tick_nohz_restart. According to the I think you are mistaken. Let's look at CPU0 only: -0 [000] d... 150.829698: __tick_nohz_idle_enter: can stop idle tick -0 [000] d... 150.829774:

Re: [PATCH v7 2/2] clocksource: add J-Core timer/clocksource driver

2016-10-07 Thread Rich Felker
On Fri, Sep 30, 2016 at 03:15:11PM +0200, Thomas Gleixner wrote: > On Tue, 27 Sep 2016, Rich Felker wrote: > > I've managed to get a trace with a stall. I'm not sure what the best > > way to share the full thing is, since it's large, but here are the > > potentially interesting parts. > > Upload

Re: [PATCH v7 2/2] clocksource: add J-Core timer/clocksource driver

2016-10-05 Thread Paul E. McKenney
On Tue, Oct 04, 2016 at 05:48:18PM -0400, Rich Felker wrote: > On Tue, Oct 04, 2016 at 02:14:51PM -0700, Paul E. McKenney wrote: > > On Tue, Oct 04, 2016 at 04:58:37PM -0400, Rich Felker wrote: > > > On Tue, Oct 04, 2016 at 12:06:23AM -0700, Paul E. McKenney wrote: > > > > On Mon, Oct 03, 2016 at

Re: [PATCH v7 2/2] clocksource: add J-Core timer/clocksource driver

2016-10-04 Thread Rich Felker
On Tue, Oct 04, 2016 at 02:14:51PM -0700, Paul E. McKenney wrote: > On Tue, Oct 04, 2016 at 04:58:37PM -0400, Rich Felker wrote: > > On Tue, Oct 04, 2016 at 12:06:23AM -0700, Paul E. McKenney wrote: > > > On Mon, Oct 03, 2016 at 06:10:39PM -0400, Rich Felker wrote: > > > > On Mon, Sep 26, 2016 at

Re: [PATCH v7 2/2] clocksource: add J-Core timer/clocksource driver

2016-10-04 Thread Paul E. McKenney
On Tue, Oct 04, 2016 at 04:58:37PM -0400, Rich Felker wrote: > On Tue, Oct 04, 2016 at 12:06:23AM -0700, Paul E. McKenney wrote: > > On Mon, Oct 03, 2016 at 06:10:39PM -0400, Rich Felker wrote: > > > On Mon, Sep 26, 2016 at 11:27:14PM +0200, Daniel Lezcano wrote: > > > > On 26/09/2016 23:07, Rich

Re: [PATCH v7 2/2] clocksource: add J-Core timer/clocksource driver

2016-10-04 Thread Rich Felker
On Tue, Oct 04, 2016 at 12:06:23AM -0700, Paul E. McKenney wrote: > On Mon, Oct 03, 2016 at 06:10:39PM -0400, Rich Felker wrote: > > On Mon, Sep 26, 2016 at 11:27:14PM +0200, Daniel Lezcano wrote: > > > On 26/09/2016 23:07, Rich Felker wrote: > > > > Ping. Is there anything that still needs to be

Re: [PATCH v7 2/2] clocksource: add J-Core timer/clocksource driver

2016-10-04 Thread Paul E. McKenney
On Mon, Oct 03, 2016 at 06:10:39PM -0400, Rich Felker wrote: > On Mon, Sep 26, 2016 at 11:27:14PM +0200, Daniel Lezcano wrote: > > On 26/09/2016 23:07, Rich Felker wrote: > > > Ping. Is there anything that still needs to be changed for this driver > > > to be acceptable? > > > > It is on my

Re: [PATCH v7 2/2] clocksource: add J-Core timer/clocksource driver

2016-10-03 Thread Rich Felker
On Mon, Sep 26, 2016 at 11:27:14PM +0200, Daniel Lezcano wrote: > On 26/09/2016 23:07, Rich Felker wrote: > > Ping. Is there anything that still needs to be changed for this driver > > to be acceptable? > > It is on my radar. I'm reviewing it. > > Can you elaborate the workaround mentioned in

Re: [PATCH v7 2/2] clocksource: add J-Core timer/clocksource driver

2016-10-02 Thread Paul E. McKenney
On Sat, Oct 01, 2016 at 08:00:49PM -0400, Rich Felker wrote: > On Sat, Oct 01, 2016 at 10:58:37AM -0700, Paul E. McKenney wrote: > > On Sat, Oct 01, 2016 at 01:05:08PM -0400, Rich Felker wrote: > > > On Fri, Sep 30, 2016 at 06:48:35AM -0700, Paul E. McKenney wrote: > > > > On Fri, Sep 30, 2016 at

Re: [PATCH v7 2/2] clocksource: add J-Core timer/clocksource driver

2016-10-02 Thread Paul E. McKenney
On Sat, Oct 01, 2016 at 11:59:25PM -0400, Rich Felker wrote: > On Sat, Oct 01, 2016 at 08:00:49PM -0400, Rich Felker wrote: > > > > > > > - During the whole sequence, hrtimer expiration times are being > > > > > > > set to > > > > > > > exact jiffies (@ 100 Hz), whereas before it they're quite

Re: [PATCH v7 2/2] clocksource: add J-Core timer/clocksource driver

2016-10-01 Thread Rich Felker
On Sat, Oct 01, 2016 at 08:00:49PM -0400, Rich Felker wrote: > > > > > > - During the whole sequence, hrtimer expiration times are being set > > > > > > to > > > > > > exact jiffies (@ 100 Hz), whereas before it they're quite > > > > > > arbitrary. > > > > > > > > > > When a CPU goes into

Re: [PATCH v7 2/2] clocksource: add J-Core timer/clocksource driver

2016-10-01 Thread Rich Felker
On Sat, Oct 01, 2016 at 10:58:37AM -0700, Paul E. McKenney wrote: > On Sat, Oct 01, 2016 at 01:05:08PM -0400, Rich Felker wrote: > > On Fri, Sep 30, 2016 at 06:48:35AM -0700, Paul E. McKenney wrote: > > > On Fri, Sep 30, 2016 at 03:15:11PM +0200, Thomas Gleixner wrote: > > > > On Tue, 27 Sep 2016,

Re: [PATCH v7 2/2] clocksource: add J-Core timer/clocksource driver

2016-10-01 Thread Paul E. McKenney
On Sat, Oct 01, 2016 at 01:05:08PM -0400, Rich Felker wrote: > On Fri, Sep 30, 2016 at 06:48:35AM -0700, Paul E. McKenney wrote: > > On Fri, Sep 30, 2016 at 03:15:11PM +0200, Thomas Gleixner wrote: > > > On Tue, 27 Sep 2016, Rich Felker wrote: > > > > I've managed to get a trace with a stall. I'm

Re: [PATCH v7 2/2] clocksource: add J-Core timer/clocksource driver

2016-10-01 Thread Rich Felker
On Fri, Sep 30, 2016 at 06:48:35AM -0700, Paul E. McKenney wrote: > On Fri, Sep 30, 2016 at 03:15:11PM +0200, Thomas Gleixner wrote: > > On Tue, 27 Sep 2016, Rich Felker wrote: > > > I've managed to get a trace with a stall. I'm not sure what the best > > > way to share the full thing is, since

Re: [PATCH v7 2/2] clocksource: add J-Core timer/clocksource driver

2016-09-30 Thread Paul E. McKenney
On Fri, Sep 30, 2016 at 03:15:11PM +0200, Thomas Gleixner wrote: > On Tue, 27 Sep 2016, Rich Felker wrote: > > I've managed to get a trace with a stall. I'm not sure what the best > > way to share the full thing is, since it's large, but here are the > > potentially interesting parts. [ . . . ]

Re: [PATCH v7 2/2] clocksource: add J-Core timer/clocksource driver

2016-09-30 Thread Thomas Gleixner
On Tue, 27 Sep 2016, Rich Felker wrote: > I've managed to get a trace with a stall. I'm not sure what the best > way to share the full thing is, since it's large, but here are the > potentially interesting parts. Upload it somewhere. > The first is a big time gap with no events, from 82.446093

Re: [PATCH v7 2/2] clocksource: add J-Core timer/clocksource driver

2016-09-27 Thread Rich Felker
On Mon, Sep 26, 2016 at 08:42:58PM -0400, Rich Felker wrote: > On Mon, Sep 26, 2016 at 07:55:13PM -0400, Thomas Gleixner wrote: > > On Mon, 26 Sep 2016, Rich Felker wrote: > > > On Mon, Sep 26, 2016 at 11:27:14PM +0200, Daniel Lezcano wrote: > > > Based on use of ftrace, I was able to see

Re: [PATCH v7 2/2] clocksource: add J-Core timer/clocksource driver

2016-09-26 Thread Rich Felker
On Mon, Sep 26, 2016 at 07:55:13PM -0400, Thomas Gleixner wrote: > On Mon, 26 Sep 2016, Rich Felker wrote: > > On Mon, Sep 26, 2016 at 11:27:14PM +0200, Daniel Lezcano wrote: > > Based on use of ftrace, I was able to see situations where a second > > timer hardirq happened immediately after one

Re: [PATCH v7 2/2] clocksource: add J-Core timer/clocksource driver

2016-09-26 Thread Thomas Gleixner
On Mon, 26 Sep 2016, Rich Felker wrote: > On Mon, Sep 26, 2016 at 11:27:14PM +0200, Daniel Lezcano wrote: > Based on use of ftrace, I was able to see situations where a second > timer hardirq happened immediately after one occurred, before the > timer softirq could run. My theory is that this is

Re: [PATCH v7 2/2] clocksource: add J-Core timer/clocksource driver

2016-09-26 Thread Rich Felker
On Mon, Sep 26, 2016 at 11:27:14PM +0200, Daniel Lezcano wrote: > On 26/09/2016 23:07, Rich Felker wrote: > > Ping. Is there anything that still needs to be changed for this driver > > to be acceptable? > > It is on my radar. I'm reviewing it. > > Can you elaborate the workaround mentioned in

Re: [PATCH v7 2/2] clocksource: add J-Core timer/clocksource driver

2016-09-26 Thread Daniel Lezcano
On 26/09/2016 23:07, Rich Felker wrote: > Ping. Is there anything that still needs to be changed for this driver > to be acceptable? > It is on my radar. I'm reviewing it. Can you elaborate the workaround mentioned in the changelog. I have been digging into the lkml@ thread but it is not clear

Re: [PATCH v7 2/2] clocksource: add J-Core timer/clocksource driver

2016-09-26 Thread Rich Felker
Ping. Is there anything that still needs to be changed for this driver to be acceptable? On Mon, Sep 17, 2001 at 04:00:00AM +, Rich Felker wrote: > At the hardware level, the J-Core PIT is integrated with the interrupt > controller, but it is represented as its own device and has an >

[PATCH v7 2/2] clocksource: add J-Core timer/clocksource driver

2016-09-23 Thread Rich Felker
At the hardware level, the J-Core PIT is integrated with the interrupt controller, but it is represented as its own device and has an independent programming interface. It provides a 12-bit countdown timer, which is not presently used, and a periodic timer. The interval length for the latter is