Return-Path: Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1752425AbbKYVeU (ORCPT ); Wed, 25 Nov 2015 16:34:20 -0500 Received: from terminus.zytor.com ([198.137.202.10]:49761 "EHLO terminus.zytor.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1751430AbbKYVeQ (ORCPT ); Wed, 25 Nov 2015 16:34:16 -0500 Date: Wed, 25 Nov 2015 13:33:44 -0800 From: tip-bot for Thomas Gleixner Message-ID: Cc: viresh.kumar@linaro.org, sebastian_frias@sigmadesigns.com, mingo@kernel.org, hpa@zytor.com, nico@linaro.org, linux-kernel@vger.kernel.org, mans@mansr.com, tony@atomide.com, tglx@linutronix.de, daniel.lezcano@linaro.org, linux@arm.linux.org.uk, marc_gonzalez@sigmadesigns.com, john.stultz@linaro.org Reply-To: hpa@zytor.com, mingo@kernel.org, viresh.kumar@linaro.org, sebastian_frias@sigmadesigns.com, nico@linaro.org, linux@arm.linux.org.uk, tglx@linutronix.de, daniel.lezcano@linaro.org, tony@atomide.com, mans@mansr.com, linux-kernel@vger.kernel.org, john.stultz@linaro.org, marc_gonzalez@sigmadesigns.com In-Reply-To: References: To: linux-tip-commits@vger.kernel.org Subject: [tip:timers/core] timekeeping: Lift clocksource cacheline restriction Git-Commit-ID: 09a9982016499daeb3fbee5ac8d87797310a565a X-Mailer: tip-git-log-daemon Robot-ID: Robot-Unsubscribe: Contact to get blacklisted from these emails MIME-Version: 1.0 Content-Transfer-Encoding: 8bit Content-Type: text/plain; charset=UTF-8 Content-Disposition: inline Sender: linux-kernel-owner@vger.kernel.org List-ID: X-Mailing-List: linux-kernel@vger.kernel.org Content-Length: 2816 Lines: 72 Commit-ID: 09a9982016499daeb3fbee5ac8d87797310a565a Gitweb: http://git.kernel.org/tip/09a9982016499daeb3fbee5ac8d87797310a565a Author: Thomas Gleixner AuthorDate: Thu, 19 Nov 2015 11:43:09 +0100 Committer: Thomas Gleixner CommitDate: Wed, 25 Nov 2015 22:28:30 +0100 timekeeping: Lift clocksource cacheline restriction We cache all hotpath members of a clocksource in the time keeper core. So there is no requirement in general to cache line align struct clocksource. Remove the enforces alignment. That allows users which need to wrap struct clocksource into their own struct to align the struct without getting extra padding. Signed-off-by: Thomas Gleixner Cc: John Stultz Cc: Russell King - ARM Linux Cc: Marc Gonzalez Cc: Daniel Lezcano Cc: Mans Rullgard Cc: Viresh Kumar Cc: Nicolas Pitre Cc: Tony Lindgren Cc: Sebastian Frias Link: http://lkml.kernel.org/r/alpine.DEB.2.11.1511191209000.3898@nanos --- include/linux/clocksource.h | 16 +++++++++++----- 1 file changed, 11 insertions(+), 5 deletions(-) diff --git a/include/linux/clocksource.h b/include/linux/clocksource.h index 7784b59..6013021 100644 --- a/include/linux/clocksource.h +++ b/include/linux/clocksource.h @@ -62,12 +62,18 @@ struct module; * @suspend: suspend function for the clocksource, if necessary * @resume: resume function for the clocksource, if necessary * @owner: module reference, must be set by clocksource in modules + * + * Note: This struct is not used in hotpathes of the timekeeping code + * because the timekeeper caches the hot path fields in its own data + * structure, so no line cache alignment is required, + * + * The pointer to the clocksource itself is handed to the read + * callback. If you need extra information there you can wrap struct + * clocksource into your own struct. Depending on the amount of + * information you need you should consider to cache line align that + * structure. */ struct clocksource { - /* - * Hotpath data, fits in a single cache line when the - * clocksource itself is cacheline aligned. - */ cycle_t (*read)(struct clocksource *cs); cycle_t mask; u32 mult; @@ -95,7 +101,7 @@ struct clocksource { cycle_t wd_last; #endif struct module *owner; -} ____cacheline_aligned; +}; /* * Clock source flags bits:: -- To unsubscribe from this list: send the line "unsubscribe linux-kernel" in the body of a message to majordomo@vger.kernel.org More majordomo info at http://vger.kernel.org/majordomo-info.html Please read the FAQ at http://www.tux.org/lkml/