diff options
author | David S. Miller <davem@davemloft.net> | 2017-08-10 07:15:31 +0200 |
---|---|---|
committer | David S. Miller <davem@davemloft.net> | 2017-08-10 07:15:31 +0200 |
commit | 5389e239eba5ef0e1cad596dba4860890a3e6965 (patch) | |
tree | 1a27965ab0da09dd07cfa6a7515aa21deee0984e /arch/sparc/include | |
parent | Merge branch 'sparc64-Add-16GB-hugepage-support' (diff) | |
parent | sparc64: Use CPU_POKE to resume idle cpu (diff) | |
download | linux-5389e239eba5ef0e1cad596dba4860890a3e6965.tar.xz linux-5389e239eba5ef0e1cad596dba4860890a3e6965.zip |
Merge branch 'sparc64-Use-low-latency-path-to-resume-idle-cpu'
Vijay Kumar says:
====================
sparc64: Use low latency path to resume idle cpu
CPU_POKE is a low latency path to resume the target cpu if suspended
using CPU_YIELD. Use CPU_POKE to resume cpu if supported by hypervisor.
Hackbench results (lower is better):
Number of
Process: w/o fix with fix
1 0.012 0.010
10 0.021 0.019
100 0.151 0.148
Changelog:
v2:
- Fixed comments and spacing (2/2)
====================
Signed-off-by: David S. Miller <davem@davemloft.net>
Diffstat (limited to 'arch/sparc/include')
-rw-r--r-- | arch/sparc/include/asm/hypervisor.h | 18 | ||||
-rw-r--r-- | arch/sparc/include/asm/smp_64.h | 5 |
2 files changed, 23 insertions, 0 deletions
diff --git a/arch/sparc/include/asm/hypervisor.h b/arch/sparc/include/asm/hypervisor.h index 73cb8978df58..3dc9215d0357 100644 --- a/arch/sparc/include/asm/hypervisor.h +++ b/arch/sparc/include/asm/hypervisor.h @@ -298,6 +298,24 @@ unsigned long sun4v_cpu_stop(unsigned long cpuid); unsigned long sun4v_cpu_yield(void); #endif +/* cpu_poke() + * TRAP: HV_FAST_TRAP + * FUNCTION: HV_FAST_CPU_POKE + * RET0: status + * ERRORS: ENOCPU cpuid refers to a CPU that does not exist + * EINVAL cpuid is current CPU + * + * Poke CPU cpuid. If the target CPU is currently suspended having + * invoked the cpu-yield service, that vCPU will be resumed. + * Poke interrupts may only be sent to valid, non-local CPUs. + * It is not legal to poke the current vCPU. + */ +#define HV_FAST_CPU_POKE 0x13 + +#ifndef __ASSEMBLY__ +unsigned long sun4v_cpu_poke(unsigned long cpuid); +#endif + /* cpu_qconf() * TRAP: HV_FAST_TRAP * FUNCTION: HV_FAST_CPU_QCONF diff --git a/arch/sparc/include/asm/smp_64.h b/arch/sparc/include/asm/smp_64.h index ce2233f7e662..a75089285db8 100644 --- a/arch/sparc/include/asm/smp_64.h +++ b/arch/sparc/include/asm/smp_64.h @@ -33,6 +33,9 @@ DECLARE_PER_CPU(cpumask_t, cpu_sibling_map); extern cpumask_t cpu_core_map[NR_CPUS]; +void smp_init_cpu_poke(void); +void scheduler_poke(void); + void arch_send_call_function_single_ipi(int cpu); void arch_send_call_function_ipi_mask(const struct cpumask *mask); @@ -74,6 +77,8 @@ void __cpu_die(unsigned int cpu); #define smp_fetch_global_regs() do { } while (0) #define smp_fetch_global_pmu() do { } while (0) #define smp_fill_in_cpu_possible_map() do { } while (0) +#define smp_init_cpu_poke() do { } while (0) +#define scheduler_poke() do { } while (0) #endif /* !(CONFIG_SMP) */ |