From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S934161AbbDIJLq (ORCPT ); Thu, 9 Apr 2015 05:11:46 -0400 Received: from www.linutronix.de ([62.245.132.108]:45825 "EHLO Galois.linutronix.de" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1754976AbbDII6A (ORCPT ); Thu, 9 Apr 2015 04:58:00 -0400 Date: Thu, 9 Apr 2015 10:58:16 +0200 (CEST) From: Thomas Gleixner To: Ingo Molnar cc: Peter Zijlstra , 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 In-Reply-To: <20150409072038.GA30205@gmail.com> Message-ID: References: <20150409062841.GB14259@gmail.com> <20150409065730.GK27490@worktop.programming.kicks-ass.net> <20150409070917.GF14259@gmail.com> <20150409072038.GA30205@gmail.com> 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 Thu, 9 Apr 2015, Ingo Molnar wrote: > Plus, look at this code in hrtimer_run_queues(): > > for (index = 0; index < HRTIMER_MAX_CLOCK_BASES; index++) { > base = &cpu_base->clock_base[index]; > if (!base->active.next) > continue; > > if (gettime) { > hrtimer_get_softirq_time(cpu_base); > gettime = 0; > } > > 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; This is the non highres case and we actually could optimize that case as well to avoid the cache line polution. Thanks, tglx