From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S932646AbbDIG5p (ORCPT ); Thu, 9 Apr 2015 02:57:45 -0400 Received: from bombadil.infradead.org ([198.137.202.9]:35623 "EHLO bombadil.infradead.org" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1751499AbbDIG5l (ORCPT ); Thu, 9 Apr 2015 02:57:41 -0400 Date: Thu, 9 Apr 2015 08:57:30 +0200 From: Peter Zijlstra To: Ingo Molnar Cc: Thomas Gleixner , Viresh Kumar , Ingo Molnar , linaro-kernel@lists.linaro.org, linux-kernel@vger.kernel.org, Preeti U Murthy Subject: Re: [PATCH] hrtimer: Replace cpu_base->active_bases with a direct check of the active list Message-ID: <20150409065730.GK27490@worktop.programming.kicks-ass.net> References: <20150409062841.GB14259@gmail.com> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <20150409062841.GB14259@gmail.com> User-Agent: Mutt/1.5.22.1 (2013-10-16) Sender: linux-kernel-owner@vger.kernel.org List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On Thu, Apr 09, 2015 at 08:28:41AM +0200, Ingo Molnar wrote: > Btw., does cpu_base->active_bases even make sense? hrtimer bases are > fundamentally percpu, and to check whether there are any pending > timers is a very simple check: > > base->active->next != NULL > Yeah, that's 3 pointer dereferences from cpu_base, iow you traded a single bit test on an already loaded word for 3 potential cacheline misses.