From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1161065AbcFOQpw (ORCPT ); Wed, 15 Jun 2016 12:45:52 -0400 Received: from www.linutronix.de ([62.245.132.108]:41004 "EHLO Galois.linutronix.de" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1753239AbcFOQpt (ORCPT ); Wed, 15 Jun 2016 12:45:49 -0400 Date: Wed, 15 Jun 2016 18:43:46 +0200 (CEST) From: Thomas Gleixner To: Arjan van de Ven cc: Eric Dumazet , Peter Zijlstra , Ingo Molnar , LKML , "Paul E. McKenney" , Frederic Weisbecker , Chris Mason , Arjan van de Ven , Linus Torvalds Subject: Re: [patch 13/20] timer: Switch to a non cascading wheel In-Reply-To: Message-ID: References: <20160613070440.950649741@linutronix.de> <20160613075929.282143900@linutronix.de> <20160613114005.GY30909@twins.programming.kicks-ass.net> <20160614101144.GA849@gmail.com> <20160614204225.GI30154@twins.programming.kicks-ass.net> User-Agent: Alpine 2.11 (DEB 23 2013-08-11) MIME-Version: 1.0 Content-Type: TEXT/PLAIN; charset=US-ASCII X-Linutronix-Spam-Score: -1.0 X-Linutronix-Spam-Level: - X-Linutronix-Spam-Status: No , -1.0 points, 5.0 required, ALL_TRUSTED=-1,SHORTCIRCUIT=-0.0001 Sender: linux-kernel-owner@vger.kernel.org List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On Wed, 15 Jun 2016, Arjan van de Ven wrote: > what would 1 more timer wheel do? Waste storage space and make the collection of expired timers more expensive. The selection of the timer wheel properties is combination of: 1) Granularity 2) Storage space 3) Number of levels to collect #1 Influences the accuracy of the wheel levels. The worst case error is the ratio of the shortest timeout in a level and the granularity of that level. Currently I've chosen 12.5%. If we go to 25% worst case, then we increase the per level capacity by factor (1 << lvl). #2 It strikes me a bit silly to waste storage space for esoteric outliers. According to the data I collected we have no timers at all between 2hrs and 5 days. #3 The more levels we have the more steps we have when collecting expired timers or searching the next expiring timer. It's all bound, but it still adds up. Thanks, tglx