From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S933817AbbDII7S (ORCPT ); Thu, 9 Apr 2015 04:59:18 -0400 Received: from bombadil.infradead.org ([198.137.202.9]:48864 "EHLO bombadil.infradead.org" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1755119AbbDII7M (ORCPT ); Thu, 9 Apr 2015 04:59:12 -0400 Date: Thu, 9 Apr 2015 10:58:59 +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: <20150409085859.GN5029@twins.programming.kicks-ass.net> References: <20150409062841.GB14259@gmail.com> <20150409065730.GK27490@worktop.programming.kicks-ass.net> <20150409070917.GF14259@gmail.com> <20150409072038.GA30205@gmail.com> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <20150409072038.GA30205@gmail.com> User-Agent: Mutt/1.5.21 (2012-12-30) Sender: linux-kernel-owner@vger.kernel.org List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On Thu, Apr 09, 2015 at 09:20:39AM +0200, Ingo Molnar wrote: > if at least one base is active (on my fairly standard system all cpus > have at least one active hrtimer base all the time - and many cpus > have two bases active), then we run hrtimer_get_softirq_time(), which > dirties the cachelines of all 4 clock bases: > > base->clock_base[HRTIMER_BASE_REALTIME].softirq_time = xtim; > base->clock_base[HRTIMER_BASE_MONOTONIC].softirq_time = mono; > base->clock_base[HRTIMER_BASE_BOOTTIME].softirq_time = boot; > base->clock_base[HRTIMER_BASE_TAI].softirq_time = tai; > > so in practice we not only touch every cacheline in every timer > interrupt, but we _dirty_ them, even the inactive ones. > Urgh we should really _really_ kill that entire softirq mess. All it needs it hrtimer_start*() returning -ENOTIME when it cannot queue the timer. Of course, all that needs it auditing all hrtimer_start*() callsites, which is a lot of work.