summaryrefslogtreecommitdiffstats
path: root/arch/sparc/include/asm/timer_64.h
diff options
context:
space:
mode:
authorPavel Tatashin <pasha.tatashin@oracle.com>2017-06-12 16:41:44 -0400
committerDavid S. Miller <davem@davemloft.net>2017-06-12 15:44:02 -0700
commit178bf2b9a20e866677bbca5cb521b09a8498c1d7 (patch)
treec8147817fafe9eafc7ef486375eb77423666f389 /arch/sparc/include/asm/timer_64.h
parentb5dd4d807f0fe7da67c5cc67b2ec681b60e4994b (diff)
downloadop-kernel-dev-178bf2b9a20e866677bbca5cb521b09a8498c1d7.zip
op-kernel-dev-178bf2b9a20e866677bbca5cb521b09a8498c1d7.tar.gz
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 fce4150..bde2cc4 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;
OpenPOWER on IntegriCloud