mbox series

[v2,0/2] intel_powerclamp: New module parameter

Message ID 20230205025902.2899734-1-srinivas.pandruvada@linux.intel.com
Headers show
Series intel_powerclamp: New module parameter | expand

Message

Srinivas Pandruvada Feb. 5, 2023, 2:59 a.m. UTC
Split from the series for powerclamp user of powercap idle-inject.

v2
- Build warnings reported by Rui
- Moved the powerclamp documentation to admin guide folder
- Commit log updated as suggested by Rafael and other code suggestion

Srinivas Pandruvada (2):
  Documentation:admin-guide: Move intel_powerclamp documentation
  thermal/drivers/intel_powerclamp: Add two module parameters

 Documentation/admin-guide/index.rst           |   1 +
 .../thermal/intel_powerclamp.rst              |  22 +++
 Documentation/driver-api/thermal/index.rst    |   1 -
 MAINTAINERS                                   |   1 +
 drivers/thermal/intel/intel_powerclamp.c      | 177 +++++++++++++++---
 5 files changed, 180 insertions(+), 22 deletions(-)
 rename Documentation/{driver-api => admin-guide}/thermal/intel_powerclamp.rst (93%)

Comments

Ricardo Neri Feb. 7, 2023, 1:42 p.m. UTC | #1
On Mon, Feb 06, 2023 at 02:02:28AM -0800, srinivas pandruvada wrote:
> On Mon, 2023-02-06 at 08:05 +0000, Zhang, Rui wrote:
> > On Sun, 2023-02-05 at 18:45 -0800, srinivas pandruvada wrote:
> > > Hi Rui,
> > > 
> > > On Sun, 2023-02-05 at 15:57 +0000, Zhang, Rui wrote:
> > > > Hi, Srinivas,
> > > > 
> > > > First of all, the previous build error is gone.
> > > > 
> > > > Second, I found something strange, which may be related with the
> > > > scheduler asym-packing, so CC Ricardo.
> > > > 
> > > I thought you disable ITMT before idle injection and reenebale
> > > after
> > > removal.
> > 
> > No.
> > 
> > I can reproduce this by playing with raw intel_powerclamp sysfs knobs
> > and ITMT enabled.
> > 
> 
> This issue is happening even if ITMT disabled. If the module mask is
> composed of P-cores it works or even on servers as expected.
> Also if you offline all P-cores then select mask among E-cores, it is
> working. Somehow P-core influences E-cores.
> 
> Since this patch is module mask related, that is functioning correctly.
> We have to debug this interaction with P and E cores separately.

Currently, when doing asym_packing, ECores will only pull tasks from a
PCore only if both SMT siblings are busy. It will only pull from the
lower-priority sibling. These patches [1] let ECores pull from either
sibling, if both are busy.

I presume that by injecting idle, the scheduler thinks that the CPU is
idle (i.e., idle_cpu() returns true) and it will not do asym_packing from
lower-priority CPUs.

However, in your experiment you have 16 threads. If a Pcore is overloaded,
an ECore should be able to help.

[1]. https://lore.kernel.org/lkml/20230207045838.11243-1-ricardo.neri-calderon@linux.intel.com/
Srinivas Pandruvada Feb. 7, 2023, 1:51 p.m. UTC | #2
On Tue, 2023-02-07 at 05:42 -0800, Ricardo Neri wrote:
> On Mon, Feb 06, 2023 at 02:02:28AM -0800, srinivas pandruvada wrote:
> > On Mon, 2023-02-06 at 08:05 +0000, Zhang, Rui wrote:
> > > On Sun, 2023-02-05 at 18:45 -0800, srinivas pandruvada wrote:
> > > > Hi Rui,
> > > > 
> > > > On Sun, 2023-02-05 at 15:57 +0000, Zhang, Rui wrote:
> > > > > Hi, Srinivas,
> > > > > 
> > > > > First of all, the previous build error is gone.
> > > > > 
> > > > > Second, I found something strange, which may be related with
> > > > > the
> > > > > scheduler asym-packing, so CC Ricardo.
> > > > > 
> > > > I thought you disable ITMT before idle injection and reenebale
> > > > after
> > > > removal.
> > > 
> > > No.
> > > 
> > > I can reproduce this by playing with raw intel_powerclamp sysfs
> > > knobs
> > > and ITMT enabled.
> > > 
> > 
> > This issue is happening even if ITMT disabled. If the module mask
> > is
> > composed of P-cores it works or even on servers as expected.
> > Also if you offline all P-cores then select mask among E-cores, it
> > is
> > working. Somehow P-core influences E-cores.
> > 
> > Since this patch is module mask related, that is functioning
> > correctly.
> > We have to debug this interaction with P and E cores separately.
> 
> Currently, when doing asym_packing, ECores will only pull tasks from
> a
> PCore only if both SMT siblings are busy. It will only pull from the
> lower-priority sibling. These patches [1] let ECores pull from either
> sibling, if both are busy.
> 
> I presume that by injecting idle, the scheduler thinks that the CPU
> is
> idle (i.e., idle_cpu() returns true) and it will not do asym_packing
> from
> lower-priority CPUs.
> 
> However, in your experiment you have 16 threads. If a Pcore is
> overloaded,
> an ECore should be able to help.
This issue happens with or without ITMT and also without any idle
injection active.

Thanks,
Srinivas


> 
> [1].
> https://lore.kernel.org/lkml/20230207045838.11243-1-ricardo.neri-calderon@linux.intel.com/
>