Re: kernel/timer: avoid spurious ksoftirqd wakeups (v2)

2015-04-13 Thread Luiz Capitulino
On Sat, 11 Apr 2015 11:25:49 +0200 (CEST) Thomas Gleixner wrote: > On Fri, 10 Apr 2015, Luiz Capitulino wrote: > > On Fri, 10 Apr 2015 15:09:07 -0300 > > > It seems a valid solution for this interrupt is to program > > > sched_timer to the nearest future possible. > > > > What about calling th

Re: kernel/timer: avoid spurious ksoftirqd wakeups (v2)

2015-04-11 Thread Thomas Gleixner
On Fri, 10 Apr 2015, Luiz Capitulino wrote: > On Fri, 10 Apr 2015 15:09:07 -0300 > > It seems a valid solution for this interrupt is to program > > sched_timer to the nearest future possible. > > What about calling the timer function right there, like > hrtimer_interrupt() does? No, you cannot

Re: kernel/timer: avoid spurious ksoftirqd wakeups (v2)

2015-04-10 Thread Luiz Capitulino
On Fri, 10 Apr 2015 15:09:07 -0300 Marcelo Tosatti wrote: > On Wed, Apr 08, 2015 at 12:12:45AM +0200, Frederic Weisbecker wrote: > > On Tue, Apr 07, 2015 at 11:10:49PM +0200, Thomas Gleixner wrote: > > > On Mon, 6 Apr 2015, Marcelo Tosatti wrote: > > > > It is only necessary to raise timer softir

Re: kernel/timer: avoid spurious ksoftirqd wakeups

2015-04-07 Thread Marcelo Tosatti
On Tue, Apr 07, 2015 at 10:17:23PM +0200, Frederic Weisbecker wrote: > On Mon, Apr 06, 2015 at 08:51:26PM -0300, Marcelo Tosatti wrote: > > On Tue, Apr 07, 2015 at 01:34:15AM +0200, Frederic Weisbecker wrote: > > > Yeah, it would be nice to make sure that the cause of these softirqs isn't > > > mis

Re: kernel/timer: avoid spurious ksoftirqd wakeups (v2)

2015-04-07 Thread Frederic Weisbecker
On Tue, Apr 07, 2015 at 11:10:49PM +0200, Thomas Gleixner wrote: > On Mon, 6 Apr 2015, Marcelo Tosatti wrote: > > It is only necessary to raise timer softirq > > in case there are active timers. > > Depends. See below. > > > Limit the ksoftirqd wakeup to that case. > > > > Fixes a latency spike

Re: kernel/timer: avoid spurious ksoftirqd wakeups (v2)

2015-04-07 Thread Thomas Gleixner
On Mon, 6 Apr 2015, Marcelo Tosatti wrote: > It is only necessary to raise timer softirq > in case there are active timers. Depends. See below. > Limit the ksoftirqd wakeup to that case. > > Fixes a latency spike with isolated CPUs and > nohz full mode. This lacks a proper explanation of the o

Re: kernel/timer: avoid spurious ksoftirqd wakeups

2015-04-07 Thread Frederic Weisbecker
On Mon, Apr 06, 2015 at 08:51:26PM -0300, Marcelo Tosatti wrote: > On Tue, Apr 07, 2015 at 01:34:15AM +0200, Frederic Weisbecker wrote: > > Yeah, it would be nice to make sure that the cause of these softirqs isn't > > mistakenly ignored. > > And also I want to be sure we really understand what we

Re: kernel/timer: avoid spurious ksoftirqd wakeups

2015-04-06 Thread Marcelo Tosatti
On Tue, Apr 07, 2015 at 01:34:15AM +0200, Frederic Weisbecker wrote: > On Thu, Apr 02, 2015 at 06:08:09PM -0300, Marcelo Tosatti wrote: > > On Thu, Apr 02, 2015 at 04:59:40PM +0200, Frederic Weisbecker wrote: > > > On Wed, Apr 01, 2015 at 10:44:55PM -0300, Marcelo Tosatti wrote: > > > > > > > > It

Re: kernel/timer: avoid spurious ksoftirqd wakeups

2015-04-06 Thread Frederic Weisbecker
On Thu, Apr 02, 2015 at 06:08:09PM -0300, Marcelo Tosatti wrote: > On Thu, Apr 02, 2015 at 04:59:40PM +0200, Frederic Weisbecker wrote: > > On Wed, Apr 01, 2015 at 10:44:55PM -0300, Marcelo Tosatti wrote: > > > > > > It is only necessary to raise timer softirq > > > in case there are active timers

Re: kernel/timer: avoid spurious ksoftirqd wakeups (v2)

2015-04-06 Thread Rik van Riel
On 04/06/2015 07:15 PM, Marcelo Tosatti wrote: > > > It is only necessary to raise timer softirq > in case there are active timers. > > Limit the ksoftirqd wakeup to that case. > > Fixes a latency spike with isolated CPUs and > nohz full mode. > > v2: fix variable initialization > do not r

Re: kernel/timer: avoid spurious ksoftirqd wakeups

2015-04-02 Thread Marcelo Tosatti
On Thu, Apr 02, 2015 at 04:59:40PM +0200, Frederic Weisbecker wrote: > On Wed, Apr 01, 2015 at 10:44:55PM -0300, Marcelo Tosatti wrote: > > > > It is only necessary to raise timer softirq > > in case there are active timers or irq work > > to do. > > > > Limit the ksoftirqd wakeup to those cases

Re: kernel/timer: avoid spurious ksoftirqd wakeups

2015-04-02 Thread Marcelo Tosatti
On Thu, Apr 02, 2015 at 09:58:26AM -0400, Rik van Riel wrote: > On 04/01/2015 09:44 PM, Marcelo Tosatti wrote: > > > +++ b/kernel/time/tick-sched.c > > @@ -568,6 +568,7 @@ static ktime_t tick_nohz_stop_sched_tick(struct > > tick_sched *ts, > > unsigned long rcu_delta_jiffies; > > struct c

Re: kernel/timer: avoid spurious ksoftirqd wakeups

2015-04-02 Thread Marcelo Tosatti
On Thu, Apr 02, 2015 at 11:32:49AM +0800, Hillf Danton wrote: > > --- a/kernel/time/tick-sched.c > > +++ b/kernel/time/tick-sched.c > > @@ -568,6 +568,7 @@ static ktime_t tick_nohz_stop_sched_tick(struct > > tick_sched *ts, > > unsigned long rcu_delta_jiffies; > > struct clock_event_device

Re: kernel/timer: avoid spurious ksoftirqd wakeups

2015-04-02 Thread Frederic Weisbecker
On Wed, Apr 01, 2015 at 10:44:55PM -0300, Marcelo Tosatti wrote: > > It is only necessary to raise timer softirq > in case there are active timers or irq work > to do. > > Limit the ksoftirqd wakeup to those cases. > > Fixes a latency spike with isolated CPUs and > nohz full mode. > > Reporte

Re: kernel/timer: avoid spurious ksoftirqd wakeups

2015-04-02 Thread Rik van Riel
On 04/01/2015 09:44 PM, Marcelo Tosatti wrote: > +++ b/kernel/time/tick-sched.c > @@ -568,6 +568,7 @@ static ktime_t tick_nohz_stop_sched_tick(struct > tick_sched *ts, > unsigned long rcu_delta_jiffies; > struct clock_event_device *dev = > __this_cpu_read(tick_cpu_device.evtdev); >

Re: kernel/timer: avoid spurious ksoftirqd wakeups

2015-04-01 Thread Hillf Danton
> --- a/kernel/time/tick-sched.c > +++ b/kernel/time/tick-sched.c > @@ -568,6 +568,7 @@ static ktime_t tick_nohz_stop_sched_tick(struct > tick_sched *ts, > unsigned long rcu_delta_jiffies; > struct clock_event_device *dev = > __this_cpu_read(tick_cpu_device.evtdev); > u64 time_d