All of lore.kernel.org
 help / color / mirror / Atom feed
* [PATCH 0/6] powerpc: SMT priority (PPR) save and restore
@ 2012-10-31  6:49 Haren Myneni
  2012-11-01  0:44 ` Michael Neuling
  0 siblings, 1 reply; 5+ messages in thread
From: Haren Myneni @ 2012-10-31  6:49 UTC (permalink / raw)
  To: benh, paulus, anton, mikey; +Cc: linuxppc-dev

[PATCH 0/6] powerpc: SMT priority (PPR) save and restore

On P7 systems, users can define SMT priority levels 2,3 and 4 for
processes so that some can run higher priority than the other ones.
In the current kernel, the default priority is set to 4 which prohibits
processes for using higher priority. Also the kernel boosts the priority to
4 during exceptions without saving the user defined priorities when
the task enters the kernel. So we will be loosing the process PPR value
and can not be restored it back when the task exits the kernel.

This patchset implements saving and restore the user defined PPR value
for all tasks.

With null_syscall testcase (http://ozlabs.org/~anton/junkcode/null_syscall.c),
this feature takes around extra 10 CPU cycles on average for 25 samples. 

Haren Myneni (6):
  powerpc: Move branch instruction from ACCOUNT_CPU_USER_ENTRY to caller
  powerpc: Define CPU_FTR_HAS_PPR
  powerpc: Increase exceptions arrays in paca struct to save PPR
  powerpc: Define ppr in thread_struct
  powerpc: Macros for saving/restore PPR
  powerpc: Implement PPR save/restore

 arch/powerpc/include/asm/cputable.h      |    6 ++-
 arch/powerpc/include/asm/exception-64s.h |   45 ++++++++++++++++++++++++++----
 arch/powerpc/include/asm/paca.h          |    6 ++--
 arch/powerpc/include/asm/ppc_asm.h       |   27 ++++++++++++++++-
 arch/powerpc/include/asm/processor.h     |    6 ++++
 arch/powerpc/include/asm/reg.h           |    1 +
 arch/powerpc/kernel/asm-offsets.c        |    1 +
 arch/powerpc/kernel/entry_64.S           |    6 +++-
 arch/powerpc/kernel/exceptions-64e.S     |    3 +-
 arch/powerpc/kernel/exceptions-64s.S     |   15 +++++----
 arch/powerpc/kernel/process.c            |    2 +
 11 files changed, 96 insertions(+), 22 deletions(-)

^ permalink raw reply	[flat|nested] 5+ messages in thread
* [PATCH 0/6] powerpc: SMT priority (PPR) save and restore
@ 2012-12-07  7:44 Haren Myneni
  0 siblings, 0 replies; 5+ messages in thread
From: Haren Myneni @ 2012-12-07  7:44 UTC (permalink / raw)
  To: benh, paulus, anton, michael.neuling, linuxppc-dev

Ben, 

This patch-set is created against your tree (next branch) and fixed the build failure that you pointed. 

Changes from the previous version:
- Changes for PPR save/restore in denorm_exception_hv, data_access_slb_relon_pSeries and instruction_access_slb_relon_pSeries 
  exception vectors (P8) code.
- Fix build failure with ppc64e_defconfig
- Macro name changes (HMT_MEDIUM_PPR_DISCARD and HMT_MEDIUM_PPR_SAVE) and other fixes as Michael Neuling suggested

[PATCH 0/6] powerpc: SMT priority (PPR) save and restore

On P7/P8 systems, users can define SMT priority levels 2,3 and 4 for
processes so that some can run higher priority than the other ones.
In the current kernel, the default priority is set to 4 which prohibits
processes for using higher priority. Also the kernel boosts the priority to
4 during exceptions without saving the user defined priorities when
the task enters the kernel. So we will be loosing the process PPR value
and can not be restored it back when the task exits the kernel.

This patch-set implements saving and restore the user defined PPR value
for all tasks.

With null_syscall testcase (http://ozlabs.org/~anton/junkcode/null_syscall.c),
this feature takes around extra 10 CPU cycles on average for 25 samples.
 
Haren Myneni (6):
  powerpc: Move branch instruction from ACCOUNT_CPU_USER_ENTRY to caller
  powerpc: Enable PPR save/restore
  powerpc: Increase exceptions arrays in paca struct to save PPR
  powerpc: Define ppr in thread_struct
  powerpc: Macros for saving/restore PPR
  powerpc: Implement PPR save/restore

 arch/powerpc/include/asm/cputable.h      |    7 +++-
 arch/powerpc/include/asm/exception-64s.h |   59 +++++++++++++++++++++++++-----
 arch/powerpc/include/asm/paca.h          |    6 ++--
 arch/powerpc/include/asm/ppc_asm.h       |   27 +++++++++++++-
 arch/powerpc/include/asm/processor.h     |   12 ++++++
 arch/powerpc/include/asm/reg.h           |    1 +
 arch/powerpc/kernel/asm-offsets.c        |    1 +
 arch/powerpc/kernel/entry_64.S           |    6 +++-
 arch/powerpc/kernel/exceptions-64e.S     |    3 +-
 arch/powerpc/kernel/exceptions-64s.S     |   23 +++++++-----
 arch/powerpc/kernel/process.c            |    2 +
 11 files changed, 119 insertions(+), 28 deletions(-)

^ permalink raw reply	[flat|nested] 5+ messages in thread
* [PATCH 0/6] powerpc: SMT priority (PPR) save and restore
@ 2012-09-09 11:32 Haren Myneni
  0 siblings, 0 replies; 5+ messages in thread
From: Haren Myneni @ 2012-09-09 11:32 UTC (permalink / raw)
  To: benh, paulus, anton, mikey; +Cc: linuxppc-dev


On P7 systems, users can define SMT priority levels 2,3 and 4 for
processes so that some can run higher priority than the other ones.
In the current kernel, the default priority is set to 4 which prohibits
processes for using higher priority. Also the kernel boosts the priority to
4 during exceptions without saving the user defined priorities when
the task enters the kernel. So we will be loosing the process PPR value
and can not be restored it back when the task exits the kernel.

This patch set implements saving and restore the user defined PPR value
for all tasks.

Haren Myneni (6):
  powerpc: Move branch instruction from ACCOUNT_CPU_USER_ENTRY to caller
  powerpc: Add enable_ppr kernel parameter to enable PPR save/restore
  powerpc: Add ppr in thread_info struct
  powerpc: Increase exceptions arrays in paca struct to save PPR
  powerpc: Macros for saving/restore PPR
  powerpc: Implement PPR save/restore

 Documentation/kernel-parameters.txt      |    4 +++
 arch/powerpc/include/asm/cputable.h      |    6 ++--
 arch/powerpc/include/asm/exception-64s.h |   51 ++++++++++++++++++++++++++----
 arch/powerpc/include/asm/paca.h          |    6 ++--
 arch/powerpc/include/asm/ppc_asm.h       |    2 --
 arch/powerpc/include/asm/reg.h           |    1 +
 arch/powerpc/include/asm/thread_info.h   |   11 +++++++
 arch/powerpc/kernel/asm-offsets.c        |    1 +
 arch/powerpc/kernel/entry_64.S           |    7 +++-
 arch/powerpc/kernel/exceptions-64s.S     |   18 ++++++-----
 arch/powerpc/kernel/setup_64.c           |   14 ++++++++
 11 files changed, 99 insertions(+), 22 deletions(-)

-- 
1.7.10.4

^ permalink raw reply	[flat|nested] 5+ messages in thread

end of thread, other threads:[~2012-12-07  7:44 UTC | newest]

Thread overview: 5+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2012-10-31  6:49 [PATCH 0/6] powerpc: SMT priority (PPR) save and restore Haren Myneni
2012-11-01  0:44 ` Michael Neuling
2012-11-02  1:20   ` Haren Myneni
  -- strict thread matches above, loose matches on Subject: below --
2012-12-07  7:44 Haren Myneni
2012-09-09 11:32 Haren Myneni

This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.