Groups | Search | Server Info | Keyboard shortcuts | Login | Register [http] [https] [nntp] [nntps]


Groups > linux.kernel > #1430728 > unrolled thread

[patch V3 00/22] timer: Refactor the timer wheel

Started byThomas Gleixner <tglx@linutronix.de>
First post2016-06-24 16:50 +0200
Last post2016-06-28 02:00 +0200
Articles 6 — 3 participants

Back to article view | Back to linux.kernel


Contents

  [patch V3 00/22] timer: Refactor the timer wheel Thomas Gleixner <tglx@linutronix.de> - 2016-06-24 16:50 +0200
    [patch V3 06/22] drivers/tty/metag_da: Initialize timer as pinned Thomas Gleixner <tglx@linutronix.de> - 2016-06-24 16:50 +0200
    [patch V3 02/22] x86/apic/uv: Initialize timer as pinned Thomas Gleixner <tglx@linutronix.de> - 2016-06-24 16:50 +0200
    Re: [patch V3 00/22] timer: Refactor the timer wheel Josh Triplett <josh@joshtriplett.org> - 2016-06-24 19:10 +0200
    Re: [patch V3 00/22] timer: Refactor the timer wheel "Paul E. McKenney" <paulmck@linux.vnet.ibm.com> - 2016-06-27 06:30 +0200
      Re: [patch V3 00/22] timer: Refactor the timer wheel "Paul E. McKenney" <paulmck@linux.vnet.ibm.com> - 2016-06-28 02:00 +0200

#1430728 — [patch V3 00/22] timer: Refactor the timer wheel

FromThomas Gleixner <tglx@linutronix.de>
Date2016-06-24 16:50 +0200
Subject[patch V3 00/22] timer: Refactor the timer wheel
Message-ID<rNAqZ-NX-3@gated-at.bofh.it>
This is the third version of the timer wheel rework series. The previous
versions can be found here:

V1:   http://lkml.kernel.org/r/20160613070440.950649741@linutronix.de
V2:   http://lkml.kernel.org/r/20160617121134.417319325@linutronix.de

The series is also available in git:

   git://git.kernel.org/pub/scm/linux/kernel/git/tip/tip.git WIP.timers

Changes vs. V2:

 - Removed the 1000Hz granularity reduction to 4ms. Eric explained that
   datacenter workloads require the granularity in the first level wheel.

 - Fixed the typo in tilepro. 

 - Converted sigtimedwait() to hrtimers

 - To avoid the cascading I extended the wheel by another level. This removes
   the rarely executed cascading code path, but increases the storage size for
   HZ>100 slightly. If the tiny folks care, there is an simple option to cut
   the storage size in half for the price of reduced granularity.

Thanks,

	tglx

----
 arch/x86/kernel/apic/x2apic_uv_x.c  |    4 
 arch/x86/kernel/cpu/mcheck/mce.c    |    4 
 block/genhd.c                       |    5 
 drivers/cpufreq/powernv-cpufreq.c   |    5 
 drivers/mmc/host/jz4740_mmc.c       |    2 
 drivers/net/ethernet/tile/tilepro.c |    4 
 drivers/power/bq27xxx_battery.c     |    5 
 drivers/tty/metag_da.c              |    4 
 drivers/tty/mips_ejtag_fdc.c        |    4 
 drivers/usb/host/ohci-hcd.c         |    1 
 drivers/usb/host/xhci.c             |    2 
 include/linux/list.h                |   10 
 include/linux/timer.h               |   34 -
 kernel/signal.c                     |   24 
 kernel/time/tick-internal.h         |    1 
 kernel/time/tick-sched.c            |   46 -
 kernel/time/timer.c                 | 1096 +++++++++++++++++++++---------------
 lib/random32.c                      |    1 
 net/ipv4/inet_connection_sock.c     |    7 
 net/ipv4/inet_timewait_sock.c       |    5 
 20 files changed, 734 insertions(+), 530 deletions(-)

[toc] | [next] | [standalone]


#1430731 — [patch V3 06/22] drivers/tty/metag_da: Initialize timer as pinned

FromThomas Gleixner <tglx@linutronix.de>
Date2016-06-24 16:50 +0200
Subject[patch V3 06/22] drivers/tty/metag_da: Initialize timer as pinned
Message-ID<rNAAG-Rq-9@gated-at.bofh.it>
In reply to#1430728
Pinned timers must carry that attribute in the timer itself. No functional
change.

Signed-off-by: Thomas Gleixner <tglx@linutronix.de>
Cc: Peter Zijlstra <peterz@infradead.org>
Cc: Frederic Weisbecker <fweisbec@gmail.com>
Cc: Chris Mason <clm@fb.com>
Cc: Eric Dumazet <edumazet@google.com>
Cc: rt@linutronix.de
Cc: "Paul E. McKenney" <paulmck@linux.vnet.ibm.com>
Cc: Arjan van de Ven <arjan@infradead.org>

---
 drivers/tty/metag_da.c |    4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)

--- a/drivers/tty/metag_da.c
+++ b/drivers/tty/metag_da.c
@@ -323,12 +323,12 @@ static void dashtty_timer(unsigned long
 	if (channel >= 0)
 		fetch_data(channel);
 
-	mod_timer_pinned(&poll_timer, jiffies + DA_TTY_POLL);
+	mod_timer(&poll_timer, jiffies + DA_TTY_POLL);
 }
 
 static void add_poll_timer(struct timer_list *poll_timer)
 {
-	setup_timer(poll_timer, dashtty_timer, 0);
+	setup_pinned_timer(poll_timer, dashtty_timer, 0);
 	poll_timer->expires = jiffies + DA_TTY_POLL;
 
 	/*

[toc] | [prev] | [next] | [standalone]


#1430732 — [patch V3 02/22] x86/apic/uv: Initialize timer as pinned

FromThomas Gleixner <tglx@linutronix.de>
Date2016-06-24 16:50 +0200
Subject[patch V3 02/22] x86/apic/uv: Initialize timer as pinned
Message-ID<rNAAG-Rq-21@gated-at.bofh.it>
In reply to#1430728
Pinned timers must carry that attribute in the timer itself. No functional
change.

Signed-off-by: Thomas Gleixner <tglx@linutronix.de>
Cc: Peter Zijlstra <peterz@infradead.org>
Cc: Frederic Weisbecker <fweisbec@gmail.com>
Cc: Chris Mason <clm@fb.com>
Cc: Eric Dumazet <edumazet@google.com>
Cc: rt@linutronix.de
Cc: "Paul E. McKenney" <paulmck@linux.vnet.ibm.com>
Cc: Arjan van de Ven <arjan@infradead.org>


---
 arch/x86/kernel/apic/x2apic_uv_x.c |    4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)

--- a/arch/x86/kernel/apic/x2apic_uv_x.c
+++ b/arch/x86/kernel/apic/x2apic_uv_x.c
@@ -919,7 +919,7 @@ static void uv_heartbeat(unsigned long i
 	uv_set_scir_bits(bits);
 
 	/* enable next timer period */
-	mod_timer_pinned(timer, jiffies + SCIR_CPU_HB_INTERVAL);
+	mod_timer(timer, jiffies + SCIR_CPU_HB_INTERVAL);
 }
 
 static void uv_heartbeat_enable(int cpu)
@@ -928,7 +928,7 @@ static void uv_heartbeat_enable(int cpu)
 		struct timer_list *timer = &uv_cpu_scir_info(cpu)->timer;
 
 		uv_set_cpu_scir_bits(cpu, SCIR_CPU_HEARTBEAT|SCIR_CPU_ACTIVITY);
-		setup_timer(timer, uv_heartbeat, cpu);
+		setup_pinned_timer(timer, uv_heartbeat, cpu);
 		timer->expires = jiffies + SCIR_CPU_HB_INTERVAL;
 		add_timer_on(timer, cpu);
 		uv_cpu_scir_info(cpu)->enabled = 1;

[toc] | [prev] | [next] | [standalone]


#1430819

FromJosh Triplett <josh@joshtriplett.org>
Date2016-06-24 19:10 +0200
Message-ID<rNCMa-2vW-17@gated-at.bofh.it>
In reply to#1430728
On Fri, Jun 24, 2016 at 02:32:00PM -0000, Thomas Gleixner wrote:
>  - Removed the 1000Hz granularity reduction to 4ms. Eric explained that
>    datacenter workloads require the granularity in the first level wheel.
> 
>  - Fixed the typo in tilepro. 
> 
>  - Converted sigtimedwait() to hrtimers
> 
>  - To avoid the cascading I extended the wheel by another level. This removes
>    the rarely executed cascading code path, but increases the storage size for
>    HZ>100 slightly. If the tiny folks care, there is an simple option to cut
>    the storage size in half for the price of reduced granularity.

No objection here.  This series is a massive improvement for low-power
systems, and the tiniest kernels will probably need to poke at this even
more aggressively anyway.  (For instance, compiling out connection
tracking and its incredibly long timer, and then removing the bucket it
needs.)

- Josh Triplett

[toc] | [prev] | [next] | [standalone]


#1431703

From"Paul E. McKenney" <paulmck@linux.vnet.ibm.com>
Date2016-06-27 06:30 +0200
Message-ID<rOwlj-3O5-1@gated-at.bofh.it>
In reply to#1430728
On Fri, Jun 24, 2016 at 02:32:00PM -0000, Thomas Gleixner wrote:
> This is the third version of the timer wheel rework series. The previous
> versions can be found here:
> 
> V1:   http://lkml.kernel.org/r/20160613070440.950649741@linutronix.de
> V2:   http://lkml.kernel.org/r/20160617121134.417319325@linutronix.de
> 
> The series is also available in git:
> 
>    git://git.kernel.org/pub/scm/linux/kernel/git/tip/tip.git WIP.timers
> 
> Changes vs. V2:
> 
>  - Removed the 1000Hz granularity reduction to 4ms. Eric explained that
>    datacenter workloads require the granularity in the first level wheel.
> 
>  - Fixed the typo in tilepro. 
> 
>  - Converted sigtimedwait() to hrtimers
> 
>  - To avoid the cascading I extended the wheel by another level. This removes
>    the rarely executed cascading code path, but increases the storage size for
>    HZ>100 slightly. If the tiny folks care, there is an simple option to cut
>    the storage size in half for the price of reduced granularity.
> 
> Thanks,

And this series avoids the strange SRCU behavior that I saw with the
last version.  So looks to be getting there!

I will be torturing it more vigorously, but looking good so far.

							Thanx, Paul

> 	tglx
> 
> ----
>  arch/x86/kernel/apic/x2apic_uv_x.c  |    4 
>  arch/x86/kernel/cpu/mcheck/mce.c    |    4 
>  block/genhd.c                       |    5 
>  drivers/cpufreq/powernv-cpufreq.c   |    5 
>  drivers/mmc/host/jz4740_mmc.c       |    2 
>  drivers/net/ethernet/tile/tilepro.c |    4 
>  drivers/power/bq27xxx_battery.c     |    5 
>  drivers/tty/metag_da.c              |    4 
>  drivers/tty/mips_ejtag_fdc.c        |    4 
>  drivers/usb/host/ohci-hcd.c         |    1 
>  drivers/usb/host/xhci.c             |    2 
>  include/linux/list.h                |   10 
>  include/linux/timer.h               |   34 -
>  kernel/signal.c                     |   24 
>  kernel/time/tick-internal.h         |    1 
>  kernel/time/tick-sched.c            |   46 -
>  kernel/time/timer.c                 | 1096 +++++++++++++++++++++---------------
>  lib/random32.c                      |    1 
>  net/ipv4/inet_connection_sock.c     |    7 
>  net/ipv4/inet_timewait_sock.c       |    5 
>  20 files changed, 734 insertions(+), 530 deletions(-)
> 
> 

[toc] | [prev] | [next] | [standalone]


#1432361

From"Paul E. McKenney" <paulmck@linux.vnet.ibm.com>
Date2016-06-28 02:00 +0200
Message-ID<rOOBA-7iZ-11@gated-at.bofh.it>
In reply to#1431703
On Sun, Jun 26, 2016 at 09:22:36PM -0700, Paul E. McKenney wrote:
> On Fri, Jun 24, 2016 at 02:32:00PM -0000, Thomas Gleixner wrote:
> > This is the third version of the timer wheel rework series. The previous
> > versions can be found here:
> > 
> > V1:   http://lkml.kernel.org/r/20160613070440.950649741@linutronix.de
> > V2:   http://lkml.kernel.org/r/20160617121134.417319325@linutronix.de
> > 
> > The series is also available in git:
> > 
> >    git://git.kernel.org/pub/scm/linux/kernel/git/tip/tip.git WIP.timers
> > 
> > Changes vs. V2:
> > 
> >  - Removed the 1000Hz granularity reduction to 4ms. Eric explained that
> >    datacenter workloads require the granularity in the first level wheel.
> > 
> >  - Fixed the typo in tilepro. 
> > 
> >  - Converted sigtimedwait() to hrtimers
> > 
> >  - To avoid the cascading I extended the wheel by another level. This removes
> >    the rarely executed cascading code path, but increases the storage size for
> >    HZ>100 slightly. If the tiny folks care, there is an simple option to cut
> >    the storage size in half for the price of reduced granularity.
> > 
> > Thanks,
> 
> And this series avoids the strange SRCU behavior that I saw with the
> last version.  So looks to be getting there!
> 
> I will be torturing it more vigorously, but looking good so far.

And from RCU and rcutorture perspectives:

Tested-by: Paul E. McKenney <paulmck@linux.vnet.ibm.com>

							Thanx, Paul

> > 	tglx
> > 
> > ----
> >  arch/x86/kernel/apic/x2apic_uv_x.c  |    4 
> >  arch/x86/kernel/cpu/mcheck/mce.c    |    4 
> >  block/genhd.c                       |    5 
> >  drivers/cpufreq/powernv-cpufreq.c   |    5 
> >  drivers/mmc/host/jz4740_mmc.c       |    2 
> >  drivers/net/ethernet/tile/tilepro.c |    4 
> >  drivers/power/bq27xxx_battery.c     |    5 
> >  drivers/tty/metag_da.c              |    4 
> >  drivers/tty/mips_ejtag_fdc.c        |    4 
> >  drivers/usb/host/ohci-hcd.c         |    1 
> >  drivers/usb/host/xhci.c             |    2 
> >  include/linux/list.h                |   10 
> >  include/linux/timer.h               |   34 -
> >  kernel/signal.c                     |   24 
> >  kernel/time/tick-internal.h         |    1 
> >  kernel/time/tick-sched.c            |   46 -
> >  kernel/time/timer.c                 | 1096 +++++++++++++++++++++---------------
> >  lib/random32.c                      |    1 
> >  net/ipv4/inet_connection_sock.c     |    7 
> >  net/ipv4/inet_timewait_sock.c       |    5 
> >  20 files changed, 734 insertions(+), 530 deletions(-)
> > 
> > 

[toc] | [prev] | [standalone]


Back to top | Article view | linux.kernel


csiph-web