From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1751398AbcFXKIT (ORCPT ); Fri, 24 Jun 2016 06:08:19 -0400 Received: from www.linutronix.de ([62.245.132.108]:51803 "EHLO Galois.linutronix.de" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1750960AbcFXKIS (ORCPT ); Fri, 24 Jun 2016 06:08:18 -0400 Date: Fri, 24 Jun 2016 12:06:11 +0200 (CEST) From: Thomas Gleixner To: George Spelvin cc: linux-kernel@vger.kernel.org, arjan@infradead.org, clm@fb.com, edumazet@google.com, fweisbec@gmail.com, lenb@kernel.org, mingo@kernel.org, paulmck@linux.vnet.ibm.com, peterz@infradead.org, riel@redhat.com, rt@linutronix.de, torvalds@linux-foundation.org Subject: Re: [patch V2 12/20] timer: Switch to a non cascading wheel In-Reply-To: <20160618095539.20718.qmail@ns.sciencehorizons.net> Message-ID: References: <20160618095539.20718.qmail@ns.sciencehorizons.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 Sat, 18 Jun 2016, George Spelvin wrote: > Looking at the __next_timer_interrupt function, it seems that it does > a lot more work than necessary. Once a timeout has been found in the > current level, the range which must be searched in the following level > is limited to 1/LVL_CLK_DIV of the range in the current level. > > That quickly tapers off to zero and the search can stop. > > In particular, if a timeout is found at level 0 between the immediately > next bucket and the next bucket which is a multiple of LEVEL_SHIFT_DIV, > inclusive (1 <= x <= 8 buckets depending on the sbits of base->clk), > then the search can stop immediately. Correct. Thought about that, but never came around to implement it. > This is hairy code and the following untested code is probably buggy, > but the basic idea is: It's buggy, but yes the idea is sane. We can do this as an incremental change once we agreed on the general idea. Thanks, tglx