public inbox for linux-kernel@vger.kernel.org
 help / color / mirror / Atom feed
From: tip-bot for Thomas Gleixner <tipbot@zytor.com>
To: linux-tip-commits@vger.kernel.org
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
Subject: [tip:timers/core] timekeeping: Lift clocksource cacheline restriction
Date: Wed, 25 Nov 2015 13:33:44 -0800	[thread overview]
Message-ID: <tip-09a9982016499daeb3fbee5ac8d87797310a565a@git.kernel.org> (raw)
In-Reply-To: <alpine.DEB.2.11.1511191209000.3898@nanos>

Commit-ID:  09a9982016499daeb3fbee5ac8d87797310a565a
Gitweb:     http://git.kernel.org/tip/09a9982016499daeb3fbee5ac8d87797310a565a
Author:     Thomas Gleixner <tglx@linutronix.de>
AuthorDate: Thu, 19 Nov 2015 11:43:09 +0100
Committer:  Thomas Gleixner <tglx@linutronix.de>
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 <tglx@linutronix.de>
Cc: John Stultz <john.stultz@linaro.org>
Cc: Russell King - ARM Linux <linux@arm.linux.org.uk>
Cc: Marc Gonzalez <marc_gonzalez@sigmadesigns.com>
Cc: Daniel Lezcano <daniel.lezcano@linaro.org>
Cc: Mans Rullgard <mans@mansr.com>
Cc: Viresh Kumar <viresh.kumar@linaro.org>
Cc: Nicolas Pitre <nico@linaro.org>
Cc: Tony Lindgren <tony@atomide.com>
Cc: Sebastian Frias <sebastian_frias@sigmadesigns.com>
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::

  parent reply	other threads:[~2015-11-25 21:34 UTC|newest]

Thread overview: 19+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2015-11-18 13:43 [PATCH] clocksource: Store reg field within struct clocksource Marc Gonzalez
2015-11-18 13:51 ` Måns Rullgård
2015-11-18 17:21 ` Russell King - ARM Linux
2015-11-19  9:27   ` Marc Gonzalez
2015-11-19 10:33     ` Russell King - ARM Linux
2015-11-19 10:36       ` Thomas Gleixner
2015-11-19 10:40         ` Russell King - ARM Linux
2015-11-19 10:33   ` Thomas Gleixner
2015-11-19 10:36     ` Russell King - ARM Linux
2015-11-19 10:42       ` Thomas Gleixner
2015-11-19 11:08         ` Russell King - ARM Linux
2015-11-19 11:14           ` Thomas Gleixner
2015-11-19 12:26             ` Marc Gonzalez
2015-11-19 13:57               ` Thomas Gleixner
2015-11-24 12:36                 ` Marc Gonzalez
2015-11-25 21:33             ` tip-bot for Thomas Gleixner [this message]
2015-11-19 10:55       ` Marc Gonzalez
2015-11-19 11:21         ` Russell King - ARM Linux
2015-11-19 12:41           ` Marc Gonzalez

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=tip-09a9982016499daeb3fbee5ac8d87797310a565a@git.kernel.org \
    --to=tipbot@zytor.com \
    --cc=daniel.lezcano@linaro.org \
    --cc=hpa@zytor.com \
    --cc=john.stultz@linaro.org \
    --cc=linux-kernel@vger.kernel.org \
    --cc=linux-tip-commits@vger.kernel.org \
    --cc=linux@arm.linux.org.uk \
    --cc=mans@mansr.com \
    --cc=marc_gonzalez@sigmadesigns.com \
    --cc=mingo@kernel.org \
    --cc=nico@linaro.org \
    --cc=sebastian_frias@sigmadesigns.com \
    --cc=tglx@linutronix.de \
    --cc=tony@atomide.com \
    --cc=viresh.kumar@linaro.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox