On Tue, Apr 20, 2021 at 04:22:31PM +0800, Borislav Petkov wrote:
> On Tue, Apr 20, 2021 at 04:09:43PM +0800, Huang Rui wrote:
> > Some AMD Ryzen generations has different calculation method on maximum
> > perf. 255 is not for all asics, some specific generations used 166 as
>
e for AMD
systems")
Fixes: 3c55e94c0ade ("cpufreq: ACPI: Extend frequency tables to cover boost
frequencies")
Reported-by: Jason Bagavatsingham
Tested-by: Jason Bagavatsingham
Signed-off-by: Huang Rui
Cc: Alex Deucher
Cc: Nathan Fontenot
Cc: Rafael J. Wysocki
Cc: Bo
ood for me as well.
Acked-by: Huang Rui
> ---
> drivers/gpu/drm/ttm/ttm_pool.c | 44 +-
> 1 file changed, 22 insertions(+), 22 deletions(-)
>
> diff --git a/drivers/gpu/drm/ttm/ttm_pool.c b/drivers/gpu/drm/ttm/ttm_pool.c
> index cb38b1a17b09..955
On Wed, Apr 07, 2021 at 09:27:46AM +0800, songqiang wrote:
Please add the description in the commit message and subject.
Thanks,
Ray
> Signed-off-by: songqiang
> ---
> drivers/gpu/drm/ttm/ttm_page_alloc.c | 18 ++
> 1 file changed, 14 insertions(+), 4 deletions(-)
>
> diff --g
IOMMU is
> disabled
> iommu/amd: Keep track of amd_iommu_irq_remap state
Series are Acked-by: Huang Rui
>
> drivers/iommu/amd/init.c | 36
> 1 file changed, 20 insertions(+), 16 deletions(-)
>
> --
> 2.30.2
>
On Tue, Mar 16, 2021 at 11:00:26PM +0800, Joerg Roedel wrote:
> On Tue, Mar 16, 2021 at 09:36:02PM +0800, Huang Rui wrote:
> > Thanks for the comments. Could you please elaborate this?
> >
> > Do you mean while amd_iommu=off, we won't prepare the IVRS, and even
>
On Tue, Mar 16, 2021 at 09:16:34PM +0800, Joerg Roedel wrote:
> Hi Huang,
>
> On Thu, Mar 11, 2021 at 10:28:07PM +0800, Huang Rui wrote:
> > diff --git a/drivers/iommu/amd/iommu.c b/drivers/iommu/amd/iommu.c
> > index f0adbc48fd17..a08e885403b7 100644
> > --- a/drivers/
On Mon, Mar 15, 2021 at 11:21:36AM +0800, Bhaskar Chowdhury wrote:
>
> s/"an minimum"/"a minimum"/
> s/"an maxmum"/"a maximum"/
>
> Signed-off-by: Bhaskar Chowdhury
Reviewed-by: Huang Rui
> ---
> Changes from V1:
> Randy
u
Signed-off-by: Huang Rui
Cc: Joerg Roedel
Cc: Suravee Suthikulpanit
Cc: Alex Deucher
Cc: sta...@vger.kernel.org
---
drivers/iommu/amd/iommu.c | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/drivers/iommu/amd/iommu.c b/drivers/iommu/amd/iommu.c
index f0adbc48fd17..a08e88540
wise operator")
> Fixes: 3c9a7b7d6e75 ("drm/amdgpu: update mmhub mgcg&ls for mmhub_v2_3")
> Signed-off-by: Colin Ian King
Thanks.
Reviewed-by: Huang Rui
> ---
> drivers/gpu/drm/amd/amdgpu/mmhub_v2_3.c | 4 ++--
> 1 file changed, 2 insertions(+), 2 deletions(-)
>
On Mon, Jan 18, 2021 at 02:52:18PM +0800, Stephen Rothwell wrote:
> Hi Ray,
>
> On Mon, 18 Jan 2021 05:56:20 + "Huang, Ray" wrote:
> >
> > [AMD Public Use]
> >
> > Thanks Setphen. Please check attached V2 patch.
> > (If you can share the config file to me, I can do the test in my side)
>
>
On Fri, Jan 15, 2021 at 01:35:05PM +0800, Stephen Rothwell wrote:
> Hi all,
>
> After merging the amdgpu tree, today's linux-next build (powerpc
> allyesconfig) failed like this:
>
> drivers/gpu/drm/amd/amdgpu/../pm/swsmu/smu11/vangogh_ppt.c: In function
> 'vangogh_get_smu_metrics_data':
> drive
On Wed, Jan 13, 2021 at 10:21:26AM +0800, Huang Rui wrote:
> On Wed, Jan 13, 2021 at 10:13:02AM +0800, Alex Deucher wrote:
> > On Tue, Jan 12, 2021 at 8:19 PM Huang Rui wrote:
> > >
> > > On Wed, Jan 13, 2021 at 03:57:22AM +0800, Souptick Joarder wrote:
> > &
On Wed, Jan 13, 2021 at 10:13:02AM +0800, Alex Deucher wrote:
> On Tue, Jan 12, 2021 at 8:19 PM Huang Rui wrote:
> >
> > On Wed, Jan 13, 2021 at 03:57:22AM +0800, Souptick Joarder wrote:
> > > kernel test robot throws below warnings ->
> > >
> > >
On Wed, Jan 13, 2021 at 03:57:22AM +0800, Souptick Joarder wrote:
> kernel test robot throws below warnings ->
>
> drivers/gpu/drm/amd/amdgpu/../pm/swsmu/smu11/vangogh_ppt.c:594:6:
> warning: no previous prototype for 'vangogh_clk_dpm_is_enabled'
> [-Wmissing-prototypes]
> drivers/gpu/drm/amd/amdg
On Tue, Jan 05, 2021 at 07:43:51PM +0800, Borislav Petkov wrote:
> On Tue, Jan 05, 2021 at 07:08:52PM +0800, Huang Rui wrote:
> > Ah, this asic is a bit old and still use radeon driver. So we didn't
> > reproduce it on amdgpu driver. I don't have such the old asic in
On Tue, Jan 05, 2021 at 06:31:38PM +0800, Borislav Petkov wrote:
> Hi,
>
> On Tue, Jan 05, 2021 at 12:12:13PM +0800, Huang Rui wrote:
> > I am reproducing this issue as well, are you using a Raven board?
>
> I have no clue what Raven is. The workstation I trig
On Mon, Jan 04, 2021 at 06:58:02PM +0800, Borislav Petkov wrote:
> On Fri, Jan 01, 2021 at 03:34:28PM +0100, Christian K?nig wrote:
> > Going to double check the code, but can you reproduce this issue
> > reliable?
>
> Lemme find a test box which can trigger it too - the splat happened
> on my wor
orkaround
> as narrow as possible.
Yes, besides the comments from Alex and Felix, may we get your firmware
version (SMC firmware which is from SBIOS) and device id?
> >>>| [drm:amdgpu_job_timedout [amdgpu]] *ERROR* ring gfx timeout,
> >>> signaled seq=1, emitted seq=3
kfd_device_info raven_device_info = {
> ^~~~~~~~~
>
> As Huang Rui suggested, Raven already has the fallback path,
> so it should be out of IOMMU v2 flag.
>
> Suggested-by: Huang Rui
> Signed-off-by: YueHaibing
Acked-by: Huang Rui
On Thu, Sep 10, 2020 at 10:55:32AM +0800, YueHaibing wrote:
> If KFD_SUPPORT_IOMMU_V2 is not set, gcc warns:
>
> drivers/gpu/drm/amd/amdgpu/../amdkfd/kfd_device.c:121:37: warning:
> ‘raven_device_info’ defined but not used [-Wunused-const-variable=]
> static const struct kfd_device_info raven_de
; Fixes: 34a564eaf528 ("drm/amd/powerplay: implement fw image related smum
> interface for Polaris.")
> Cc: sta...@vger.kernel.org
> Signed-off-by: Gustavo A. R. Silva
Reviewed-by: Huang Rui
> ---
> drivers/gpu/drm/amd/powerplay/smumgr/polaris10_smumgr.c | 1 +
>
On Tue, Jun 05, 2018 at 04:44:04PM +0200, Borislav Petkov wrote:
> Hi guys,
>
> X just froze here ontop of 4.17-rc7+ tip/master (kernel is from last
> week) with the splat at the end.
>
> Box is a x470 chipset with Ryzen 2700X.
>
> GPU gets detected as
>
> [7.440971] [drm] radeon kernel mod
always
> false due to limited range of data type [-Wtype-limits]
>if (num > ATOM_MAX_HW_I2C_READ) {
>^
>
> Signed-off-by: Mathieu Malaterre
Reviewed-by: Huang Rui
> ---
> drivers/gpu/drm/radeon/atombios_i2c.c | 2 +-
> 1 file changed, 1 insertion(+
On Tue, Apr 10, 2018 at 04:59:55PM -0400, Sinan Kaya wrote:
> Code is expecing to observe the same number of buffers returned from
> dma_map_sg() function compared to sg_alloc_table_from_pages(). This
> doesn't hold true universally especially for systems with IOMMU.
>
> IOMMU driver tries to comb
On Tue, Nov 07, 2017 at 08:50:52PM +0800, Huang Rui wrote:
> Hi Mark,
>
> On Fri, Nov 03, 2017 at 11:33:56AM +, Mark Rutland wrote:
> > Hi,
> >
> > As a heads-up, I believe that arch/x86/events/amd/power.c is currently
> > missing initialisation of pmu::modul
Hi Mark,
On Fri, Nov 03, 2017 at 11:33:56AM +, Mark Rutland wrote:
> Hi,
>
> As a heads-up, I believe that arch/x86/events/amd/power.c is currently
> missing initialisation of pmu::module, which could result in problems
> when the module is unloaded.
>
> We've just spotted a similar problem
> x_show << ro.x_show;
> @@
>
> if not (x^"_show" = x_show) then Coccilib.include_match false
>
> @@
> declarer name DEVICE_ATTR_RO;
> identifier ro.x,ro.x_show;
> @@
>
> - DEVICE_ATTR(x, \(0444\|S_IRUGO\), x_show, NULL);
> + DEVICE_A
Hi Baoyou,
On Mon, Sep 19, 2016 at 03:28:39PM +0800, Baoyou Xie wrote:
> We get a few warnings when building kernel with W=1:
> drivers/gpu/drm/amd/amdgpu/../powerplay/smumgr/tonga_smumgr.c:146:5: warning:
> no previous prototype for 'tonga_program_jump_on_start' [-Wmissing-prototypes]
> drivers/
are only used in the file in which they are
> declared and don't need a declaration, but can be made static.
> So this patch marks these functions with 'static'.
>
> Signed-off-by: Baoyou Xie
Thanks.
Acked-by: Huang Rui
Hi Peter, Vince
On Fri, Aug 19, 2016 at 12:01:30PM +0200, Peter Zijlstra wrote:
> On Thu, Aug 18, 2016 at 10:46:31AM -0400, Vince Weaver wrote:
> > On Thu, 18 Aug 2016, Vince Weaver wrote:
> >
> > > Tried the perf_fuzzer on my A10 fam15h/model13h system with 4.8-rc2 and it
> > > falls over more o
On Tue, Jul 19, 2016 at 02:22:36PM -0400, Vince Weaver wrote:
> On Fri, 17 Jun 2016, Huang Rui wrote:
>
> > On Thu, Jun 16, 2016 at 06:47:00PM +0200, Borislav Petkov wrote:
> > > On Thu, Jun 16, 2016 at 01:38:14PM +0800, Huang Rui wrote:
> > > > I was told t
On Thu, Jun 16, 2016 at 11:12:18PM +0200, Borislav Petkov wrote:
> On Thu, Jun 16, 2016 at 05:00:04PM -0400, Vince Weaver wrote:
> >
> > According to the BKDG the AMD Family16h Model30h "Jaguar Mullins"
> > also supports the accumulated power interface. I've tested on
> > hardware I have and with
On Thu, Jun 16, 2016 at 04:44:20PM -0400, Vince Weaver wrote:
> On Thu, 16 Jun 2016, Huang Rui wrote:
>
> > > 1. In theory this should also work on an amd fam16h model 30h
> > > processor too, correct? The current code limits things to fam15h
> > > ev
On Thu, Jun 16, 2016 at 06:47:00PM +0200, Borislav Petkov wrote:
> On Thu, Jun 16, 2016 at 01:38:14PM +0800, Huang Rui wrote:
> > I was told this feature would be supported on fam15h 60h, 70h and
> > later processors before. Just checked the fam16h model 30h BKDG, yes,
> &
Hi Vince,
Thanks for asking.
On Wed, Jun 15, 2016 at 09:13:59PM -0400, Vince Weaver wrote:
>
> three questions about this functionality:
>
> 1. In theory this should also work on an amd fam16h model 30h
> processor too, correct? The current code limits things to fam15h
> even though t
On Thu, Jun 16, 2016 at 01:38:13PM +0800, Huang Rui wrote:
> On Wed, Jun 15, 2016 at 09:13:59PM -0400, Vince Weaver wrote:
> >
> > 2. Unless I'm misunderstanding things, the code seems to be accumulating
> > Power. (see chunk below) Power is an instantaneous meas
to Linus next week unless I get an objection.
>
Guenter, I already verified on AMD CZ(family 15h, model 60h) and model
70h processors.
Acked-and-tested-by: Huang Rui
On Wed, Apr 06, 2016 at 08:30:25AM -0700, Guenter Roeck wrote:
> On Wed, Apr 06, 2016 at 03:44:11PM +0800, Huang Rui wrote:
> >
> > +static void do_read_registers_on_cu(void *_data)
> > +{
> > + struct fam15h_power_data *data = _data;
> > + int cpu, cu;
>
PTSC is the performance timestamp counter value in a cpu core and the
cores in one compute unit have the fixed frequency. So it picks up the
performance timestamp counter value of the first core per compute unit
to measure the interval for average power per compute unit.
Signed-off-by: Huang Rui
.
Suggested-by: Borislav Petkov
Signed-off-by: Huang Rui
---
drivers/hwmon/fam15h_power.c | 72 +++-
1 file changed, 71 insertions(+), 1 deletion(-)
diff --git a/drivers/hwmon/fam15h_power.c b/drivers/hwmon/fam15h_power.c
index 4f695d8..4edbaf0 100644
--- a
This patch adds the description to explain the TDP reporting mechanism
and accumulated power algorithm.
Signed-off-by: Huang Rui
Cc: Borislav Petkov
---
Documentation/hwmon/fam15h_power | 65 +++-
drivers/hwmon/fam15h_power.c | 2 +-
2 files changed, 65
processor power consumption in 10
millisecond. The unit of the result is uWatt.
Suggested-by: Guenter Roeck
Signed-off-by: Huang Rui
Cc: Borislav Petkov
---
drivers/hwmon/fam15h_power.c | 128 +--
1 file changed, 124 insertions(+), 4 deletions(-)
diff --git a
This patch adds a platform check function to make code more readable.
Signed-off-by: Huang Rui
---
drivers/hwmon/fam15h_power.c | 9 +++--
1 file changed, 7 insertions(+), 2 deletions(-)
diff --git a/drivers/hwmon/fam15h_power.c b/drivers/hwmon/fam15h_power.c
index 7d9d697..eb97a92 100644
er1: 19.58 mW (avg = 2.55 mW, interval = 0.01 s)
(crit = 15.00 W)
...
These patches are rebased on v4.6-rc2.
Thanks,
Rui
Huang Rui (6):
hwmon: (fam15h_power) Add CPU_SUP_AMD as the dependence
hwmon: (fam15h_power) Add compute unit accumulated power
hwmon: (f
nction `fam15h_power_probe':
>> fam15h_power.c:(.text+0x26e3a3): undefined reference to
>> `amd_get_cores_per_cu'
fam15h_power.c:(.text+0x26e41e): undefined reference to
`amd_get_cores_per_cu'
Reported-by: build test robot
Acked-by: Borislav Petkov
Signed-off-by: Huang Rui
---
dri
Commit-ID: 8a22426184774d7ced9c1d3aa4d95d34101fb3be
Gitweb: http://git.kernel.org/tip/8a22426184774d7ced9c1d3aa4d95d34101fb3be
Author: Huang Rui
AuthorDate: Fri, 29 Jan 2016 16:29:56 +0800
Committer: Ingo Molnar
CommitDate: Thu, 31 Mar 2016 10:30:39 +0200
perf/x86/msr: Add AMD PTSC
Commit-ID: aaf248848db503927644d28e239bc399ed45959f
Gitweb: http://git.kernel.org/tip/aaf248848db503927644d28e239bc399ed45959f
Author: Huang Rui
AuthorDate: Fri, 29 Jan 2016 16:29:57 +0800
Committer: Ingo Molnar
CommitDate: Thu, 31 Mar 2016 10:30:39 +0200
perf/x86/msr: Add AMD IRPERF
Commit-ID: 34a4cceb78e48c75d1b48b25352a3f3b2cc2b2da
Gitweb: http://git.kernel.org/tip/34a4cceb78e48c75d1b48b25352a3f3b2cc2b2da
Author: Huang Rui
AuthorDate: Fri, 25 Mar 2016 10:08:40 +0800
Committer: Thomas Gleixner
CommitDate: Tue, 29 Mar 2016 11:12:11 +0200
x86/cpu: Add advanced
On Mon, Mar 28, 2016 at 11:33:27AM +0200, Borislav Petkov wrote:
> On Mon, Mar 28, 2016 at 01:32:14PM +0800, Huang Rui wrote:
> >
> > return 0;
> > @@ -330,6 +446,9 @@ static int fam15h_power_init_data(struct pci_dev *f4,
> >
> > data->max_cu_a
On Mon, Mar 28, 2016 at 11:29:52AM +0200, Borislav Petkov wrote:
> On Mon, Mar 28, 2016 at 01:32:12PM +0800, Huang Rui wrote:
> > +
> > + get_online_cpus();
> > + this_cpu = get_cpu();
>
> What now?
>
> get_online_cpus() i
This patch adds the description to explain the TDP reporting mechanism
and accumulated power algorithm.
Signed-off-by: Huang Rui
Cc: Borislav Petkov
---
Documentation/hwmon/fam15h_power | 57 +++-
drivers/hwmon/fam15h_power.c | 2 +-
2 files changed, 57
This patch adds a platform check function to make code more readable.
Signed-off-by: Huang Rui
---
drivers/hwmon/fam15h_power.c | 9 +++--
1 file changed, 7 insertions(+), 2 deletions(-)
diff --git a/drivers/hwmon/fam15h_power.c b/drivers/hwmon/fam15h_power.c
index c1cad26..622c646 100644
processor power consumption in 10
millisecond. The unit of the result is uWatt.
Suggested-by: Guenter Roeck
Signed-off-by: Huang Rui
Cc: Borislav Petkov
---
drivers/hwmon/fam15h_power.c | 119 +++
1 file changed, 119 insertions(+)
diff --git a/drivers/hwmon
e:
ray@hr-ub:~/tip$ sensors
fam15h_power-pci-00c4
Adapter: PCI adapter
power1: 19.58 mW (avg = 2.55 mW, interval = 0.01 s)
(crit = 15.00 W)
...
These patches are rebased on v4.6-rc1.
Thanks,
Rui
Huang Rui (6):
hwmon: (fam15h_power) Add CPU_SUP_AMD as the depen
nction `fam15h_power_probe':
>> fam15h_power.c:(.text+0x26e3a3): undefined reference to
>> `amd_get_cores_per_cu'
fam15h_power.c:(.text+0x26e41e): undefined reference to
`amd_get_cores_per_cu'
Reported-by: build test robot
Signed-off-by: Huang Rui
---
drivers/hwmon/Kconfig | 2 +-
PTSC is the performance timestamp counter value in a cpu core and the
cores in one compute unit have the fixed frequency. So it picks up the
performance timestamp counter value of the first core per compute unit
to measure the interval for average power per compute unit.
Signed-off-by: Huang Rui
.
Suggested-by: Borislav Petkov
Signed-off-by: Huang Rui
---
drivers/hwmon/fam15h_power.c | 65 +++-
1 file changed, 64 insertions(+), 1 deletion(-)
diff --git a/drivers/hwmon/fam15h_power.c b/drivers/hwmon/fam15h_power.c
index 4f695d8..ccbc944 100644
--- a
Commit-ID: a49ac9f83b31e41c8311d64bd2b3f97a23dcb38d
Gitweb: http://git.kernel.org/tip/a49ac9f83b31e41c8311d64bd2b3f97a23dcb38d
Author: Huang Rui
AuthorDate: Fri, 25 Mar 2016 11:18:25 +0800
Committer: Ingo Molnar
CommitDate: Fri, 25 Mar 2016 09:46:53 +0100
perf/x86: Move
NT_ATTR_STR'
EVENT_ATTR_STR(power-pkg, power_pkg, "event=0x01");
^
Reported-by: Randy Dunlap
Reported-by: build test robot
Signed-off-by: Huang Rui
Cc: Stephen Rothwell
Cc: a...@kernel.org
---
Hi Peter, Ingo, Randy,
According to the comments of below thread, I rebased thi
On Thu, Mar 24, 2016 at 10:05:03AM -0700, Randy Dunlap wrote:
> On 03/23/16 19:09, Stephen Rothwell wrote:
> > Hi all,
> >
> > Please do not add any v4.7 related material to your linux-next included
> > trees until after v4.6-rc1 is released.
> >
> > Changes since 20160323:
> >
>
> on i386:
>
Bit 11 of CPUID 8000_0007 edx is processor feedback interface.
Bit 12 of CPUID 8000_0007 edx is accumulated power.
So this patch fixes the output of cpuinfo, and add some new names to
make it more meaningful.
Reported-by: Borislav Petkov
Signed-off-by: Huang Rui
---
arch/x86/kernel/cpu
lstra (Intel)
I tested this patch both on fam15h and fam16h platforms, x86_max_cores
can report correct compute unit numbers. And
/sys/devices/system/cpu/cpuX/topology/thread_siblings_list
/sys/devices/system/cpu/cpuX/topology/core_siblings_list
are also right. Thanks.
Tested-by: Huang
On Fri, Jan 29, 2016 at 04:29:55PM +0800, Huang Rui wrote:
> Hi all,
>
> This serials of patches add two event counters that are PTSC
> (performance time-stamp counter) and IRperf (instructions retired
> count) for AMD new processors. They are incicated by
> CPUID.8000_0001H
On Mon, Mar 21, 2016 at 09:23:41AM +0100, Borislav Petkov wrote:
> On Mon, Mar 21, 2016 at 11:07:46AM +0800, Huang Rui wrote:
> > OK, we will find some fam15h, fam16h platforms to verify it. Please
> > wait for my feedback.
> >
> > But I am confused with c->x86_max_c
Commit-ID: 01fe03ff1c7ce6b6e2212cb6171a49c2858fbc7c
Gitweb: http://git.kernel.org/tip/01fe03ff1c7ce6b6e2212cb6171a49c2858fbc7c
Author: Huang Rui
AuthorDate: Thu, 14 Jan 2016 10:50:06 +0800
Committer: Ingo Molnar
CommitDate: Mon, 21 Mar 2016 09:35:29 +0100
x86/cpufeature, perf/x86: Add
Commit-ID: c7ab62bfbe0e27ef452d19d88b083f01e99f13a7
Gitweb: http://git.kernel.org/tip/c7ab62bfbe0e27ef452d19d88b083f01e99f13a7
Author: Huang Rui
AuthorDate: Wed, 9 Mar 2016 13:45:06 +0800
Committer: Ingo Molnar
CommitDate: Mon, 21 Mar 2016 09:37:15 +0100
perf/x86/amd/power: Add AMD
Commit-ID: 8dfeae0d73bf803be1a533e147b3b0ea69375596
Gitweb: http://git.kernel.org/tip/8dfeae0d73bf803be1a533e147b3b0ea69375596
Author: Huang Rui
AuthorDate: Thu, 14 Jan 2016 10:50:04 +0800
Committer: Ingo Molnar
CommitDate: Mon, 21 Mar 2016 09:08:22 +0100
perf/x86/amd: Move
On Mon, Mar 21, 2016 at 09:21:29AM +0100, Peter Zijlstra wrote:
> On Mon, Mar 21, 2016 at 11:07:46AM +0800, Huang Rui wrote:
> > > > The issue is that Linux assumes:
> > > >
> > > > nr_logical_cpus = nr_cores * nr_siblings
> > > >
>
On Mon, Mar 21, 2016 at 09:26:43AM +0100, Borislav Petkov wrote:
> On Mon, Mar 21, 2016 at 11:46:19AM +0800, Huang Rui wrote:
> > I quickly applied this patch on tip/master with on a fam15h machine.
> > The issue is still existed, only one core can be detected.
>
> Huh, wh
On Mon, Mar 21, 2016 at 11:07:44AM +0800, Huang Rui wrote:
> On Fri, Mar 18, 2016 at 05:41:01PM +0100, Borislav Petkov wrote:
> > On Fri, Mar 18, 2016 at 04:03:47PM +0100, Peter Zijlstra wrote:
> > > It turns out AMD gets x86_max_cores wrong when there are compute
> > &
On Fri, Mar 18, 2016 at 05:41:01PM +0100, Borislav Petkov wrote:
> On Fri, Mar 18, 2016 at 04:03:47PM +0100, Peter Zijlstra wrote:
> > It turns out AMD gets x86_max_cores wrong when there are compute
> > units.
> >
> > The issue is that Linux assumes:
> >
> > nr_logical_cpus = nr_cores * nr_s
On Fri, Mar 11, 2016 at 07:33:55PM -0800, Guenter Roeck wrote:
> On 03/10/2016 06:17 PM, Huang Rui wrote:
> >This patch adds a member in fam15h_power_data which specifies the
> >compute unit accumulated power. It adds do_read_registers_on_cu to do
> >all the read to all MSRs
This patch adds the description to explain the TDP reporting mechanism
and accumulated power algorithm.
Signed-off-by: Huang Rui
Cc: Borislav Petkov
---
Documentation/hwmon/fam15h_power | 57 +++-
drivers/hwmon/fam15h_power.c | 2 +-
2 files changed, 57
This patch adds a platform check function to make code more readable.
Signed-off-by: Huang Rui
---
drivers/hwmon/fam15h_power.c | 9 +++--
1 file changed, 7 insertions(+), 2 deletions(-)
diff --git a/drivers/hwmon/fam15h_power.c b/drivers/hwmon/fam15h_power.c
index 35800cd..a0bea56 100644
.
Suggested-by: Borislav Petkov
Signed-off-by: Huang Rui
---
drivers/hwmon/fam15h_power.c | 61 +++-
1 file changed, 60 insertions(+), 1 deletion(-)
diff --git a/drivers/hwmon/fam15h_power.c b/drivers/hwmon/fam15h_power.c
index 4f695d8..c5e2297 100644
--- a
processor power consumption in 10
millisecond. The unit of the result is uWatt.
Suggested-by: Guenter Roeck
Signed-off-by: Huang Rui
Cc: Borislav Petkov
---
drivers/hwmon/fam15h_power.c | 115 +++
1 file changed, 115 insertions(+)
diff --git a/drivers/hwmon
PTSC is the performance timestamp counter value in a cpu core and the
cores in one compute unit have the fixed frequency. So it picks up the
performance timestamp counter value of the first core per compute unit
to measure the interval for average power per compute unit.
Signed-off-by: Huang Rui
nction `fam15h_power_probe':
>> fam15h_power.c:(.text+0x26e3a3): undefined reference to
>> `amd_get_cores_per_cu'
fam15h_power.c:(.text+0x26e41e): undefined reference to
`amd_get_cores_per_cu'
Reported-by: build test robot
Signed-off-by: Huang Rui
---
drivers/hwmon/Kconfig | 2 +-
power1: 19.58 mW (avg = 2.55 mW, interval = 0.01 s)
(crit = 15.00 W)
...
These patches are rebased on groeck/hwmon-next.
Thanks,
Rui
Huang Rui (6):
hwmon: (fam15h_power) Add CPU_SUP_AMD as the dependence
hwmon: (fam15h_power) Add compute unit accumulated power
hwmon
5 seconds time elapsed
Suggested-by: Peter Zijlstra
Suggested-by: Ingo Molnar
Suggested-by: Borislav Petkov
Reviewed-by: Thomas Gleixner
Signed-off-by: Huang Rui
Cc: Guenter Roeck
---
Hi Boris,
I already redo this patch based on tip/master, it depends on some
previous patches you applied before
le CPU_DOWN_FAILED case.
- Remove unnecessary tmp variable.
- Re-write the initialization of for_each_online_cpu(cpu) loop.
- Move __register_cpu_notifier after perf_pmu_register.
Thanks,
Rui
Huang Rui (2):
perf/x86: Export events_sysfs_show()
perf/x86/amd/power: Add AMD accumulated power repor
This interface will be used in modular perf drivers.
Signed-off-by: Huang Rui
---
arch/x86/kernel/cpu/perf_event.c | 1 +
1 file changed, 1 insertion(+)
diff --git a/arch/x86/kernel/cpu/perf_event.c b/arch/x86/kernel/cpu/perf_event.c
index 1b443db..47f673c 100644
--- a/arch/x86/kernel/cpu
5 seconds time elapsed
Suggested-by: Peter Zijlstra
Suggested-by: Ingo Molnar
Suggested-by: Borislav Petkov
Signed-off-by: Huang Rui
Cc: Guenter Roeck
---
arch/x86/Kconfig | 9 +
arch/x86/kernel/cpu/Makefile | 1 +
arch/
On Thu, Mar 03, 2016 at 06:57:53PM +0100, Thomas Gleixner wrote:
> On Fri, 4 Mar 2016, Huang Rui wrote:
> > On Thu, Mar 03, 2016 at 04:26:46PM +0100, Thomas Gleixner wrote:
> > > Why? You do a full for_each_online_cpu(i) loop after that, which does
> > > ex
On Thu, Mar 03, 2016 at 04:26:46PM +0100, Thomas Gleixner wrote:
> On Thu, 3 Mar 2016, Huang Rui wrote:
> > On Thu, Mar 03, 2016 at 09:50:11AM +0100, Thomas Gleixner wrote:
> > > On Thu, 3 Mar 2016, Huang Rui wrote:
> > > And of course if CPU_DOWN_PREPARE fails and
On Thu, Mar 03, 2016 at 09:50:11AM +0100, Thomas Gleixner wrote:
> On Thu, 3 Mar 2016, Huang Rui wrote:
> > +
> > +static void power_cpu_init(int cpu)
> > +{
> > + /*
> > +* 1) If any CPU is set at cpu_mask in the same compute unit, do
> > +* not
This interface will be used in modular perf drivers.
Signed-off-by: Huang Rui
---
arch/x86/kernel/cpu/perf_event.c | 1 +
1 file changed, 1 insertion(+)
diff --git a/arch/x86/kernel/cpu/perf_event.c b/arch/x86/kernel/cpu/perf_event.c
index 1b443db..47f673c 100644
--- a/arch/x86/kernel/cpu
5 seconds time elapsed
Suggested-by: Peter Zijlstra
Suggested-by: Ingo Molnar
Suggested-by: Borislav Petkov
Signed-off-by: Huang Rui
Cc: Guenter Roeck
---
Hi Thomas,
Thanks to suggest the updates for power_cpu_init(), but there are some
minor issues with below codes.
target = cpumask_any_and(&a
pu_exit
- Use smp_num_siblings instead of cores_per_cu variable.
- Make this driver as a module.
- Add a patch to export events_sysfs_show.
Thanks,
Rui
Huang Rui (2):
perf/x86: Export events_sysfs_show()
perf/x86/amd/power: Add AMD accumulated power reporting mechanism
arch/x86/Kconfig
On Tue, Mar 01, 2016 at 02:58:39PM +0100, Borislav Petkov wrote:
> On Mon, Feb 29, 2016 at 12:30:47PM +0100, Thomas Gleixner wrote:
> > On Tue, 1 Mar 2016, Huang Rui wrote:
> > > On Fri, Feb 26, 2016 at 11:18:28AM +0100, Thomas Gleixner wrote:
> > > > > +static i
Hi Thomas,
Thank you to your comments. :-)
On Fri, Feb 26, 2016 at 11:18:28AM +0100, Thomas Gleixner wrote:
> On Fri, 26 Feb 2016, Huang Rui wrote:
>
> > +
> > +static DEFINE_PER_CPU(struct power_pmu_masks *, amd_power_pmu);
>
> This is complete overkill, re
On Fri, Feb 26, 2016 at 11:29:52AM +0100, Borislav Petkov wrote:
> On Fri, Feb 26, 2016 at 11:18:28AM +0100, Thomas Gleixner wrote:
> > On Fri, 26 Feb 2016, Huang Rui wrote:
> > > +/* Event code: LSB 8 bits, passed in attr->config any other bit is
> > &g
5 seconds time elapsed
Suggested-by: Peter Zijlstra
Suggested-by: Ingo Molnar
Suggested-by: Borislav Petkov
Signed-off-by: Huang Rui
Cc: Guenter Roeck
---
Hi,
This series of patches introduces the perf implementation of
accumulated power reporting algorithm. It will calculate the average
power con
AMD Zeppelin (Family 17h, Model 00h) introduces an instructions
retired performance counter which indicated by
CPUID.8000_0008H:EBX[1]. And dedicated Instructions Retired register
(MSR 0xC000_000E9) increments on once for every instruction retired.
Signed-off-by: Huang Rui
---
arch/x86/include
Hi all,
This serials of patches add two event counters that are PTSC
(performance time-stamp counter) and IRperf (instructions retired
count) for AMD new processors. They are incicated by
CPUID.8000_0001H:ECX[27] and CPUID.8000_0008H:EBX[1] separately.
Thanks,
Rui
Huang Rui (2):
perf/x86/msr
an interface into MSR PMU to get the PTSC
counter value.
Signed-off-by: Huang Rui
---
arch/x86/include/asm/cpufeature.h| 1 +
arch/x86/include/asm/msr-index.h | 1 +
arch/x86/kernel/cpu/perf_event_msr.c | 8
3 files changed, 10 insertions(+)
diff --git a/arch/x86/include/asm
On Thu, Jan 28, 2016 at 04:28:48PM +0100, Peter Zijlstra wrote:
> On Thu, Jan 28, 2016 at 10:03:15AM +0100, Borislav Petkov wrote:
>
> > +
> > +struct power_pmu {
> > + raw_spinlock_t lock;
>
> Now that the list is gone, what does this thing protect?
>
Protect the event count value b
On Thu, Jan 28, 2016 at 10:03:15AM +0100, Borislav Petkov wrote:
> On Thu, Jan 28, 2016 at 02:38:51PM +0800, Huang Rui wrote:
> > Introduce an AMD accumlated power reporting mechanism for Carrizo
> > (Family 15h, Model 60h) processor that should be used to calculate the
> > a
el.org/r/20150831160622.ga29...@nazgul.tnic
Suggested-by: Peter Zijlstra
Suggested-by: Ingo Molnar
Suggested-by: Borislav Petkov
Signed-off-by: Huang Rui
Cc: Guenter Roeck
---
Hi,
This series of patches introduces the perf implementation of
accumulated power reporting algorithm. It will calc
1 - 100 of 347 matches
Mail list logo