diff options
| author | Thomas Gleixner <[email protected]> | 2015-11-19 11:43:09 +0100 |
|---|---|---|
| committer | Thomas Gleixner <[email protected]> | 2015-11-25 22:28:30 +0100 |
| commit | 09a9982016499daeb3fbee5ac8d87797310a565a (patch) | |
| tree | 874afa4945b5b95b5d13607349291ce72bc6d45e /include/linux | |
| parent | 1ec218373b8ebda821aec00bb156a9c94fad9cd4 (diff) | |
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 <[email protected]>
Cc: John Stultz <[email protected]>
Cc: Russell King - ARM Linux <[email protected]>
Cc: Marc Gonzalez <[email protected]>
Cc: Daniel Lezcano <[email protected]>
Cc: Mans Rullgard <[email protected]>
Cc: Viresh Kumar <[email protected]>
Cc: Nicolas Pitre <[email protected]>
Cc: Tony Lindgren <[email protected]>
Cc: Sebastian Frias <[email protected]>
Link: http://lkml.kernel.org/r/alpine.DEB.2.11.1511191209000.3898@nanos
Diffstat (limited to 'include/linux')
| -rw-r--r-- | include/linux/clocksource.h | 16 |
1 files changed, 11 insertions, 5 deletions
diff --git a/include/linux/clocksource.h b/include/linux/clocksource.h index 7784b597e959..6013021a3b39 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:: |