summaryrefslogtreecommitdiffstats
path: root/arch/sparc/include/asm/timer_64.h
diff options
context:
space:
mode:
authorPavel Tatashin <pasha.tatashin@oracle.com>2017-06-12 22:41:44 +0200
committerDavid S. Miller <davem@davemloft.net>2017-06-13 00:44:02 +0200
commit178bf2b9a20e866677bbca5cb521b09a8498c1d7 (patch)
treec8147817fafe9eafc7ef486375eb77423666f389 /arch/sparc/include/asm/timer_64.h
parentsparc64: show time stamps from zero (diff)
downloadlinux-178bf2b9a20e866677bbca5cb521b09a8498c1d7.tar.xz
linux-178bf2b9a20e866677bbca5cb521b09a8498c1d7.zip
sparc64: optimize loads in clock_sched()
In clock sched we now have three loads: - Function pointer - quotient for multiplication - offset However, it is possible to improve performance substantially, by guaranteeing that all three loads are from the same cacheline. By moving these three values first in sparc64_tick_ops, and by having tick_operations 64-byte aligned we guarantee this. Signed-off-by: Pavel Tatashin <pasha.tatashin@oracle.com> Reviewed-by: Shannon Nelson <shannon.nelson@oracle.com> Reviewed-by: Steven Sistare <steven.sistare@oracle.com> Signed-off-by: David S. Miller <davem@davemloft.net>
Diffstat (limited to 'arch/sparc/include/asm/timer_64.h')
-rw-r--r--arch/sparc/include/asm/timer_64.h5
1 files changed, 5 insertions, 0 deletions
diff --git a/arch/sparc/include/asm/timer_64.h b/arch/sparc/include/asm/timer_64.h
index fce415034000..bde2cc40ae02 100644
--- a/arch/sparc/include/asm/timer_64.h
+++ b/arch/sparc/include/asm/timer_64.h
@@ -9,7 +9,12 @@
#include <linux/types.h>
#include <linux/init.h>
+/* The most frequently accessed fields should be first,
+ * to fit into the same cacheline.
+ */
struct sparc64_tick_ops {
+ unsigned long ticks_per_nsec_quotient;
+ unsigned long offset;
unsigned long long (*get_tick)(void);
int (*add_compare)(unsigned long);
unsigned long softint_mask;