From 587bf727b372bf301baa71aa4e00877af46afc19 Mon Sep 17 00:00:00 2001 From: Eric Dumazet Date: Tue, 8 May 2007 00:27:57 -0700 Subject: [PATCH] --- yaml --- r: 54633 b: refs/heads/master c: 329c8d84ca1946c037d9859dc251b56d8b1b4630 h: refs/heads/master i: 54631: 8da34c2ced288d702c3edbf21bc303e9e1675d31 v: v3 --- [refs] | 2 +- trunk/include/linux/clocksource.h | 15 +++++++++++++-- 2 files changed, 14 insertions(+), 3 deletions(-) diff --git a/[refs] b/[refs] index 594785a57d4b..fd12a2a3c345 100644 --- a/[refs] +++ b/[refs] @@ -1,2 +1,2 @@ --- -refs/heads/master: f75d222b836f7febfab0954c7612b23059d748cb +refs/heads/master: 329c8d84ca1946c037d9859dc251b56d8b1b4630 diff --git a/trunk/include/linux/clocksource.h b/trunk/include/linux/clocksource.h index daa4940cc0f1..2665ca04cf8f 100644 --- a/trunk/include/linux/clocksource.h +++ b/trunk/include/linux/clocksource.h @@ -12,6 +12,7 @@ #include #include #include +#include #include #include #include @@ -52,6 +53,9 @@ struct clocksource; * @xtime_interval: Used internally by timekeeping core, please ignore. */ struct clocksource { + /* + * First part of structure is read mostly + */ char *name; struct list_head list; int rating; @@ -63,8 +67,15 @@ struct clocksource { cycle_t (*vread)(void); /* timekeeping specific data, ignore */ - cycle_t cycle_last, cycle_interval; - u64 xtime_nsec, xtime_interval; + cycle_t cycle_interval; + u64 xtime_interval; + /* + * Second part is written at each timer interrupt + * Keep it in a different cache line to dirty no + * more than one cache line. + */ + cycle_t cycle_last ____cacheline_aligned_in_smp; + u64 xtime_nsec; s64 error; #ifdef CONFIG_CLOCKSOURCE_WATCHDOG