Groups | Search | Server Info | Keyboard shortcuts | Login | Register [http] [https] [nntp] [nntps]
Groups > linux.kernel > #1683647 > unrolled thread
| Started by | Vijay Kumar <vijay.ac.kumar@oracle.com> |
|---|---|
| First post | 2017-07-08 22:30 +0200 |
| Last post | 2017-07-08 22:30 +0200 |
| Articles | 2 — 1 participant |
Back to article view | Back to linux.kernel
[PATCH 0/2] sparc64: Use low latency path to resume idle cpu Vijay Kumar <vijay.ac.kumar@oracle.com> - 2017-07-08 22:30 +0200
[PATCH 1/2] sparc64: Add a new hypercall CPU_POKE Vijay Kumar <vijay.ac.kumar@oracle.com> - 2017-07-08 22:30 +0200
| From | Vijay Kumar <vijay.ac.kumar@oracle.com> |
|---|---|
| Date | 2017-07-08 22:30 +0200 |
| Subject | [PATCH 0/2] sparc64: Use low latency path to resume idle cpu |
| Message-ID | <u14wy-6ML-7@gated-at.bofh.it> |
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 Vijay Kumar (2): sparc64: Add a new hypercall CPU_POKE sparc64: Use cpu_poke to resume idle cpu arch/sparc/include/asm/hypervisor.h | 17 ++++++++ arch/sparc/include/asm/smp_64.h | 5 ++ arch/sparc/kernel/hvapi.c | 9 ++++ arch/sparc/kernel/hvcalls.S | 11 +++++ arch/sparc/kernel/process_64.c | 7 +++- arch/sparc/kernel/setup_64.c | 1 + arch/sparc/kernel/smp_64.c | 75 +++++++++++++++++++++++++++++++++- 7 files changed, 121 insertions(+), 4 deletions(-) --
[toc] | [next] | [standalone]
| From | Vijay Kumar <vijay.ac.kumar@oracle.com> |
|---|---|
| Date | 2017-07-08 22:30 +0200 |
| Subject | [PATCH 1/2] sparc64: Add a new hypercall CPU_POKE |
| Message-ID | <u14wy-6ML-15@gated-at.bofh.it> |
| In reply to | #1683647 |
This adds a new hypercall CPU_POKE for quickly waking up an idle CPU. CPU POKE should only be sent to valid non-local CPUs. Signed-off-by: Rob Gardner <rob.gardner@oracle.com> Signed-off-by: Vijay Kumar <vijay.ac.kumar@oracle.com> Reviewed-by: Anthony Yznaga <anthony.yznaga@oracle.com> --- arch/sparc/include/asm/hypervisor.h | 18 ++++++++++++++++++ arch/sparc/kernel/hvcalls.S | 11 +++++++++++ 2 files changed, 29 insertions(+), 0 deletions(-) diff --git a/arch/sparc/include/asm/hypervisor.h b/arch/sparc/include/asm/hypervisor.h index 73cb897..3dc9215 100644 --- a/arch/sparc/include/asm/hypervisor.h +++ b/arch/sparc/include/asm/hypervisor.h @@ -298,6 +298,24 @@ unsigned long sun4v_cpu_start(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/kernel/hvcalls.S b/arch/sparc/kernel/hvcalls.S index 4116ee5..e57007f 100644 --- a/arch/sparc/kernel/hvcalls.S +++ b/arch/sparc/kernel/hvcalls.S @@ -106,6 +106,17 @@ ENTRY(sun4v_cpu_yield) nop ENDPROC(sun4v_cpu_yield) + /* %o0: cpuid + * + * returns %o0: status + */ +ENTRY(sun4v_cpu_poke) + mov HV_FAST_CPU_POKE, %o5 + ta HV_FAST_TRAP + retl + nop +ENDPROC(sun4v_cpu_poke) + /* %o0: type * %o1: queue paddr * %o2: num queue entries -- 1.7.1
[toc] | [prev] | [standalone]
Back to top | Article view | linux.kernel
csiph-web