mirror of
https://github.com/torvalds/linux.git
synced 2025-12-07 20:06:24 +00:00
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>
This commit is contained in:
committed by
David S. Miller
parent
b5dd4d807f
commit
178bf2b9a2
@@ -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;
|
||||
|
||||
Reference in New Issue
Block a user