From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S932370AbcFOPP1 (ORCPT ); Wed, 15 Jun 2016 11:15:27 -0400 Received: from mx0a-001b2d01.pphosted.com ([148.163.156.1]:1899 "EHLO mx0a-001b2d01.pphosted.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1753390AbcFOPPZ (ORCPT ); Wed, 15 Jun 2016 11:15:25 -0400 X-IBM-Helo: d01dlp02.pok.ibm.com X-IBM-MailFrom: paulmck@linux.vnet.ibm.com X-IBM-RcptTo: linux-kernel@vger.kernel.org Date: Wed, 15 Jun 2016 08:15:18 -0700 From: "Paul E. McKenney" To: Thomas Gleixner Cc: LKML , Ingo Molnar , Peter Zijlstra , Eric Dumazet , Frederic Weisbecker , Chris Mason , Arjan van de Ven , rt@linutronix.de Subject: Re: [patch 00/20] timer: Refactor the timer wheel Reply-To: paulmck@linux.vnet.ibm.com References: <20160613070440.950649741@linutronix.de> <20160613161514.GA3923@linux.vnet.ibm.com> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <20160613161514.GA3923@linux.vnet.ibm.com> User-Agent: Mutt/1.5.21 (2010-09-15) X-TM-AS-MML: disable X-Content-Scanned: Fidelis XPS MAILER x-cbid: 16061515-0044-0000-0000-00000068531F X-IBM-AV-DETECTION: SAVI=unused REMOTE=unused XFE=unused x-cbparentid: 16061515-0045-0000-0000-0000047D58F8 Message-Id: <20160615151518.GA11383@linux.vnet.ibm.com> X-Proofpoint-Virus-Version: vendor=fsecure engine=2.50.10432:,, definitions=2016-06-15_09:,, signatures=0 X-Proofpoint-Spam-Details: rule=outbound_notspam policy=outbound score=0 spamscore=0 suspectscore=0 malwarescore=0 phishscore=0 adultscore=0 bulkscore=0 classifier=spam adjust=0 reason=mlx scancount=1 engine=8.0.1-1604210000 definitions=main-1606150165 Sender: linux-kernel-owner@vger.kernel.org List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On Mon, Jun 13, 2016 at 09:15:14AM -0700, Paul E. McKenney wrote: > On Mon, Jun 13, 2016 at 08:40:50AM -0000, Thomas Gleixner wrote: > > The current timer wheel has some drawbacks: > > > > 1) Cascading > > > > Cascading can be an unbound operation and is completely pointless in most > > cases because the vast majority of the timer wheel timers are canceled or > > rearmed before expiration. > > > > 2) No fast lookup of the next expiring timer > > > > In NOHZ scenarios the first timer soft interrupt after a long NOHZ period > > must fast forward the base time to current jiffies. As we have no way to > > find the next expiring timer fast, the code loops and increments the base > > time by one and checks for expired timers in each step. I've observed loops > > lasting 1 ms! > > > > There are some other issues caused by the above, but they are minor compare to > > those. > > For SMP configurations, this passes light rcutorture testing. For UP > builds, it complains about undefined symbols. Builds succeed with > the following kneejerk patch. Am retesting rcutorture. And with the patch below, testing goes as well with your patch stack as it does without it. So, with that patch (or equivalent): Tested-by: Paul E. McKenney There were some complaints about increasing the size of the tiny configuration, FYI. So, just out of curiosity, does anyone still run -rt on single-CPU systems? Thanx, Paul > ------------------------------------------------------------------------ > > commit 87dbd35cf4034f2b664b6e9d60decd2bdbfc416f > Author: Paul E. McKenney > Date: Mon Jun 13 09:11:41 2016 -0700 > > Fix undefined get_nohz_timer_target() in non-SMP builds > > Signed-off-by: Paul E. McKenney > > diff --git a/include/linux/sched.h b/include/linux/sched.h > index 6e42ada26345..322e52415a29 100644 > --- a/include/linux/sched.h > +++ b/include/linux/sched.h > @@ -348,6 +348,10 @@ extern int get_nohz_timer_target(void); > #else > static inline void nohz_balance_enter_idle(int cpu) { } > static inline void set_cpu_sd_state_idle(void) { } > +static inline int get_nohz_timer_target(void) > +{ > + return raw_smp_processor_id(); > +} > #endif > > /*