Messages in this thread Patch in this message | | | Subject | Re: [PATCH] clocksource: Store reg field within struct clocksource | From | Marc Gonzalez <> | Date | Thu, 19 Nov 2015 13:26:46 +0100 |
| |
On 19/11/2015 12:14, Thomas Gleixner wrote:
> So yes, the alignment of the clocksource struct is not longer > relevant. The case where we access clocksource->max_cycles is when > CONFIG_DEBUG_TIMEKEEPING is enabled, which imposes worse performance > problems to timekeeping than the extra cacheline. > > So the simple solution for this issue is indeed the one liner below.
It would make sense to also remove the comment emphasizing the alignment requirement.
Regards.
8<-------------------
diff --git a/include/linux/clocksource.h b/include/linux/clocksource.h index 278dd279a7a8..6a0f86a9a92d 100644 --- a/include/linux/clocksource.h +++ b/include/linux/clocksource.h @@ -64,10 +64,6 @@ struct module; * @owner: module reference, must be set by clocksource in modules */ 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 +91,7 @@ struct clocksource { cycle_t wd_last; #endif struct module *owner; -} ____cacheline_aligned; +}; /* * Clock source flags bits::
| |