mbox series

[RFC,V1,0/6] Generic Entry/Exit support for ppc64

Message ID 20250428152225.66044-2-mchauras@linux.ibm.com (mailing list archive)
Headers show
Series Generic Entry/Exit support for ppc64 | expand

Message

Mukesh Kumar Chaurasiya April 28, 2025, 3:22 p.m. UTC
This is a syscall only implementation of generic entry/exit framework
for framework for ppc. IRQ handling is not done in this RFC. 

This will break the ppc32 build as of now which will be fixed along with
IRQ handling.

Below are the performance benchmarks from perf bench basic syscall.
This is for 1,00,00,000 getppid() calls

| Metric     | Without Generic Framework | With Generic Framework |
| ---------- | ------------------------- | ---------------------- |
| Total time | 0.904 [sec]               | 0.856 [sec]            |
| usecs/op   | 0.090403                  | 0.085638               |
| ops/sec    | 1,10,61,579               | 1,16,77,086            |

That's ~5% degradation as of now.

Mukesh Kumar Chaurasiya (6):
  powerpc: rename arch_irq_disabled_regs
  powerpc: Prepare to build with genreic entry/exit framework
  powerpc: introduce arch_enter_from_user_mode
  powerpc: Add flag in paca for register restore state
  powerpc: Introduce syscall exit arch functions
  powerpc: Enable Generic Entry/Exit for syscalls.

 arch/powerpc/Kconfig                    |   1 +
 arch/powerpc/include/asm/entry-common.h | 158 ++++++++++++++++++++++++
 arch/powerpc/include/asm/hw_irq.h       |   4 +-
 arch/powerpc/include/asm/interrupt.h    | 117 +++++++++++++++++-
 arch/powerpc/include/asm/paca.h         |   1 +
 arch/powerpc/include/asm/stacktrace.h   |   8 ++
 arch/powerpc/include/asm/syscall.h      |   5 +
 arch/powerpc/include/asm/thread_info.h  |   1 +
 arch/powerpc/kernel/interrupt.c         | 153 ++++++-----------------
 arch/powerpc/kernel/ptrace/ptrace.c     | 103 ---------------
 arch/powerpc/kernel/signal.c            |   8 ++
 arch/powerpc/kernel/syscall.c           | 117 +-----------------
 arch/powerpc/kernel/traps.c             |   2 +-
 arch/powerpc/kernel/watchdog.c          |   2 +-
 arch/powerpc/perf/core-book3s.c         |   2 +-
 15 files changed, 336 insertions(+), 346 deletions(-)
 create mode 100644 arch/powerpc/include/asm/entry-common.h

Comments

Mukesh Kumar Chaurasiya April 28, 2025, 3:52 p.m. UTC | #1
On Mon, Apr 28, 2025 at 08:52:20PM +0530, Mukesh Kumar Chaurasiya wrote:

Few corrections in the commit message:
> This is a syscall only implementation of generic entry/exit framework
> for framework for ppc. IRQ handling is not done in this RFC. 
>
s/framework for framework/framework
> This will break the ppc32 build as of now which will be fixed along with
> IRQ handling.
> 
> Below are the performance benchmarks from perf bench basic syscall.
> This is for 1,00,00,000 getppid() calls
> 
> | Metric     | Without Generic Framework | With Generic Framework |
> | ---------- | ------------------------- | ---------------------- |
> | Total time | 0.904 [sec]               | 0.856 [sec]            |
> | usecs/op   | 0.090403                  | 0.085638               |
> | ops/sec    | 1,10,61,579               | 1,16,77,086            |
>
The coloums are reversed here

| Metric     | With Generic Framework    | Without Generic Framework |
| ---------- | ------------------------- | ------------------------- |
| Total time | 0.904 [sec]               | 0.856 [sec]               |
| usecs/op   | 0.090403                  | 0.085638                  |
| ops/sec    | 1,10,61,579               | 1,16,77,086               |

> That's ~5% degradation as of now.
> 
> Mukesh Kumar Chaurasiya (6):
>   powerpc: rename arch_irq_disabled_regs
>   powerpc: Prepare to build with genreic entry/exit framework
>   powerpc: introduce arch_enter_from_user_mode
>   powerpc: Add flag in paca for register restore state
>   powerpc: Introduce syscall exit arch functions
>   powerpc: Enable Generic Entry/Exit for syscalls.
> 
>  arch/powerpc/Kconfig                    |   1 +
>  arch/powerpc/include/asm/entry-common.h | 158 ++++++++++++++++++++++++
>  arch/powerpc/include/asm/hw_irq.h       |   4 +-
>  arch/powerpc/include/asm/interrupt.h    | 117 +++++++++++++++++-
>  arch/powerpc/include/asm/paca.h         |   1 +
>  arch/powerpc/include/asm/stacktrace.h   |   8 ++
>  arch/powerpc/include/asm/syscall.h      |   5 +
>  arch/powerpc/include/asm/thread_info.h  |   1 +
>  arch/powerpc/kernel/interrupt.c         | 153 ++++++-----------------
>  arch/powerpc/kernel/ptrace/ptrace.c     | 103 ---------------
>  arch/powerpc/kernel/signal.c            |   8 ++
>  arch/powerpc/kernel/syscall.c           | 117 +-----------------
>  arch/powerpc/kernel/traps.c             |   2 +-
>  arch/powerpc/kernel/watchdog.c          |   2 +-
>  arch/powerpc/perf/core-book3s.c         |   2 +-
>  15 files changed, 336 insertions(+), 346 deletions(-)
>  create mode 100644 arch/powerpc/include/asm/entry-common.h
> 
> -- 
> 2.49.0
>
Ankur Arora May 5, 2025, 5:08 p.m. UTC | #2
Mukesh Kumar Chaurasiya <mchauras@linux.ibm.com> writes:

> This is a syscall only implementation of generic entry/exit framework
> for framework for ppc. IRQ handling is not done in this RFC.
>
> This will break the ppc32 build as of now which will be fixed along with
> IRQ handling.
>
> Below are the performance benchmarks from perf bench basic syscall.
> This is for 1,00,00,000 getppid() calls
>
> | Metric     | Without Generic Framework | With Generic Framework |
> | ---------- | ------------------------- | ---------------------- |
> | Total time | 0.904 [sec]               | 0.856 [sec]            |
> | usecs/op   | 0.090403                  | 0.085638               |
> | ops/sec    | 1,10,61,579               | 1,16,77,086            |
>
> That's ~5% degradation as of now.

Is the table header inverted? That reads like a ~5% improvement with the
generic version.

Ankur

> Mukesh Kumar Chaurasiya (6):
>   powerpc: rename arch_irq_disabled_regs
>   powerpc: Prepare to build with genreic entry/exit framework
>   powerpc: introduce arch_enter_from_user_mode
>   powerpc: Add flag in paca for register restore state
>   powerpc: Introduce syscall exit arch functions
>   powerpc: Enable Generic Entry/Exit for syscalls.
>
>  arch/powerpc/Kconfig                    |   1 +
>  arch/powerpc/include/asm/entry-common.h | 158 ++++++++++++++++++++++++
>  arch/powerpc/include/asm/hw_irq.h       |   4 +-
>  arch/powerpc/include/asm/interrupt.h    | 117 +++++++++++++++++-
>  arch/powerpc/include/asm/paca.h         |   1 +
>  arch/powerpc/include/asm/stacktrace.h   |   8 ++
>  arch/powerpc/include/asm/syscall.h      |   5 +
>  arch/powerpc/include/asm/thread_info.h  |   1 +
>  arch/powerpc/kernel/interrupt.c         | 153 ++++++-----------------
>  arch/powerpc/kernel/ptrace/ptrace.c     | 103 ---------------
>  arch/powerpc/kernel/signal.c            |   8 ++
>  arch/powerpc/kernel/syscall.c           | 117 +-----------------
>  arch/powerpc/kernel/traps.c             |   2 +-
>  arch/powerpc/kernel/watchdog.c          |   2 +-
>  arch/powerpc/perf/core-book3s.c         |   2 +-
>  15 files changed, 336 insertions(+), 346 deletions(-)
>  create mode 100644 arch/powerpc/include/asm/entry-common.h


--
ankur
Ankur Arora May 5, 2025, 5:18 p.m. UTC | #3
Ankur Arora <ankur.a.arora@oracle.com> writes:

> Mukesh Kumar Chaurasiya <mchauras@linux.ibm.com> writes:
>
>> This is a syscall only implementation of generic entry/exit framework
>> for framework for ppc. IRQ handling is not done in this RFC.
>>
>> This will break the ppc32 build as of now which will be fixed along with
>> IRQ handling.
>>
>> Below are the performance benchmarks from perf bench basic syscall.
>> This is for 1,00,00,000 getppid() calls
>>
>> | Metric     | Without Generic Framework | With Generic Framework |
>> | ---------- | ------------------------- | ---------------------- |
>> | Total time | 0.904 [sec]               | 0.856 [sec]            |
>> | usecs/op   | 0.090403                  | 0.085638               |
>> | ops/sec    | 1,10,61,579               | 1,16,77,086            |
>>
>> That's ~5% degradation as of now.
>
> Is the table header inverted? That reads like a ~5% improvement with the
> generic version.

Please ignore. Just noticed your update down thread.

>> Mukesh Kumar Chaurasiya (6):
>>   powerpc: rename arch_irq_disabled_regs
>>   powerpc: Prepare to build with genreic entry/exit framework
>>   powerpc: introduce arch_enter_from_user_mode
>>   powerpc: Add flag in paca for register restore state
>>   powerpc: Introduce syscall exit arch functions
>>   powerpc: Enable Generic Entry/Exit for syscalls.
>>
>>  arch/powerpc/Kconfig                    |   1 +
>>  arch/powerpc/include/asm/entry-common.h | 158 ++++++++++++++++++++++++
>>  arch/powerpc/include/asm/hw_irq.h       |   4 +-
>>  arch/powerpc/include/asm/interrupt.h    | 117 +++++++++++++++++-
>>  arch/powerpc/include/asm/paca.h         |   1 +
>>  arch/powerpc/include/asm/stacktrace.h   |   8 ++
>>  arch/powerpc/include/asm/syscall.h      |   5 +
>>  arch/powerpc/include/asm/thread_info.h  |   1 +
>>  arch/powerpc/kernel/interrupt.c         | 153 ++++++-----------------
>>  arch/powerpc/kernel/ptrace/ptrace.c     | 103 ---------------
>>  arch/powerpc/kernel/signal.c            |   8 ++
>>  arch/powerpc/kernel/syscall.c           | 117 +-----------------
>>  arch/powerpc/kernel/traps.c             |   2 +-
>>  arch/powerpc/kernel/watchdog.c          |   2 +-
>>  arch/powerpc/perf/core-book3s.c         |   2 +-
>>  15 files changed, 336 insertions(+), 346 deletions(-)
>>  create mode 100644 arch/powerpc/include/asm/entry-common.h


--
ankur