[PATCH 3/7] selftests/resctrl: Add callback to start a benchmark

2018-10-16 Thread Fenghua Yu
-off-by: Arshiya Hayatkhan Pathan Signed-off-by: Fenghua Yu --- tools/testing/selftests/resctrl/resctrl.h | 27 tools/testing/selftests/resctrl/resctrl_val.c | 192 ++ 2 files changed, 219 insertions(+) create mode 100644 tools/testing/selftests/resctrl

[PATCH 7/7] selftests/resctrl: Add the test in MAINTAINERS

2018-10-16 Thread Fenghua Yu
The resctrl selftests will be maintained by RDT maintainers. Signed-off-by: Fenghua Yu --- MAINTAINERS | 1 + 1 file changed, 1 insertion(+) diff --git a/MAINTAINERS b/MAINTAINERS index 6ac000cc006d..07d597c68edc 100644 --- a/MAINTAINERS +++ b/MAINTAINERS @@ -12271,6 +12271,7 @@ S

[PATCH 1/7] selftests/resctrl: Add basic resctrl file system operations and data

2018-10-16 Thread Fenghua Yu
From: Sai Praneeth Prakhya The basic resctrl file system operations and data are added for future usage by resctrl selftest tool. Signed-off-by: Sai Praneeth Prakhya Signed-off-by: Arshiya Hayatkhan Pathan Signed-off-by: Fenghua Yu --- tools/testing/selftests/resctrl/Makefile | 10

[PATCH 4/7] selftests/resctrl: Add built in benchmark

2018-10-16 Thread Fenghua Yu
Praneeth Prakhya Signed-off-by: Arshiya Hayatkhan Pathan Signed-off-by: Fenghua Yu --- tools/testing/selftests/resctrl/fill_buf.c | 178 + 1 file changed, 178 insertions(+) create mode 100644 tools/testing/selftests/resctrl/fill_buf.c diff --git a/tools/testing/selftests

[PATCH 6/7] selftests/resctrl: Add mba test

2018-10-16 Thread Fenghua Yu
a , Signed-off-by: Fenghua Yu --- tools/testing/selftests/resctrl/Makefile| 2 +- tools/testing/selftests/resctrl/mba.c | 144 tools/testing/selftests/resctrl/resctrl.h | 3 + tools/testing/selftests/resctrl/resctrl_tests.c | 10 ++ 4 files ch

[PATCH 5/7] selftests/resctrl: Add mbm test

2018-10-16 Thread Fenghua Yu
to pass the test. Default benchmark is built-in fill_buf. But users can specify their own benchmark by option "-ben". We can add memory bandwidth monitoring for multiple processes in the future. Signed-off-by: Arshiya Hayatkhan Pathan Signed-off-by: Sai Praneeth Prakhya , Signed-off-by:

[PATCH 2/7] selftests/resctrl: Read memory bandwidth from perf IMC counter and from resctrl file system

2018-10-16 Thread Fenghua Yu
Signed-off-by: Fenghua Yu --- tools/testing/selftests/resctrl/resctrl_membw.c | 328 tools/testing/selftests/resctrl/resctrl_membw.h | 49 2 files changed, 377 insertions(+) create mode 100644 tools/testing/selftests/resctrl/resctrl_membw.c create mode 100644 tools

[PATCH 0/7] selftests/resctrl: Add resctrl selftest

2018-10-16 Thread Fenghua Yu
Pathan (2): selftests/resctrl: Add mbm test selftests/resctrl: Add mba test Fenghua Yu (1): selftests/resctrl: Add the test in MAINTAINERS Sai Praneeth Prakhya (4): selftests/resctrl: Add basic resctrl file system operations and data selftests/resctrl: Read memory bandwidth from perf IMC

Re: [PATCH 0/7] selftests/resctrl: Add resctrl selftest

2018-10-16 Thread Fenghua Yu
> From: Moger, Babu [mailto:babu.mo...@amd.com] > On 10/16/2018 11:56 AM, Fenghua Yu wrote: > > With more and more resctrl features are being added by Intel, AMD and > > ARM, a test tool is becoming more and more useful to validate that > > both hardware and softw

Re: [PATCH v4 08/13] arch/x86: Bring few more functions into the resource structure

2018-10-16 Thread Fenghua Yu
On Mon, Oct 15, 2018 at 08:55:49PM +, Moger, Babu wrote: > update_mba_bw : Feedback loop bandwidth update functionality is not > needed for AMD. Will you implement update_mba_bw() for AMD in future? > list_for_each_entry(crgrp, head, mon.crdtgrp_list) >

Re: [PATCH v4 10/13] arch/x86: Add AMD feature bit X86_FEATURE_MBA in cpuid bits array

2018-10-16 Thread Fenghua Yu
On Mon, Oct 15, 2018 at 08:55:54PM +, Moger, Babu wrote: > From: Sherry Hurwitz > > The feature bit X86_FEATURE_MBA is detected via CPUID leaf 0x8008 > EBX Bit 06. This bit indicates the support of AMD's MBA feature. > > This feature is supported by both Intel and AMD. But they are

Re: [PATCH 0/7] selftests/resctrl: Add resctrl selftest

2018-10-17 Thread Fenghua Yu
On Wed, Oct 17, 2018 at 11:04 AM Moger, Babu wrote: > > Hi Fenghua, > My few comments. > > On 10/17/2018 09:40 AM, Moger, Babu wrote: > > On 10/16/2018 03:32 PM, Fenghua Yu wrote: > >>> From: Moger, Babu [mailto:babu.mo...@amd.com] >

[PATCH 2/2] x86/cpufeatures: Enumerate MOVDIR64B instruction

2018-10-24 Thread Fenghua Yu
Features Programming Reference for more details on the CPUID feature MOVDIR64B flag. Signed-off-by: Fenghua Yu --- arch/x86/include/asm/cpufeatures.h | 1 + 1 file changed, 1 insertion(+) diff --git a/arch/x86/include/asm/cpufeatures.h b/arch/x86/include/asm/cpufeatures.h index 90934ee7b79a

[PATCH 0/2] x86: Enumerate direct stores instructions

2018-10-24 Thread Fenghua Yu
yet, this time these direct stores instructions patches are sent out separately. Fenghua Yu (2): x86/cpufeatures: Enumerate MOVDIRI instruction x86/cpufeatures: Enumerate MOVDIR64B instruction arch/x86/include/asm/cpufeatures.h | 2 ++ 1 file changed, 2 insertions(+) -- 2.5.0

[PATCH 1/2] x86/cpufeatures: Enumerate MOVDIRI instruction

2018-10-24 Thread Fenghua Yu
MOVDIRI flag. Signed-off-by: Fenghua Yu --- arch/x86/include/asm/cpufeatures.h | 1 + 1 file changed, 1 insertion(+) diff --git a/arch/x86/include/asm/cpufeatures.h b/arch/x86/include/asm/cpufeatures.h index 89a048c2faec..90934ee7b79a 100644 --- a/arch/x86/include/asm/cpufeatures.h +++ b/arch/x86

[PATCH v3 0/8] selftests/resctrl: Add resctrl selftest

2018-10-31 Thread Fenghua Yu
and use pipe to communicate b/w processes v2: - Change code based on comments from Babu Moger - Clean up other places. Arshiya Hayatkhan Pathan (2): selftests/resctrl: Add MBM test selftests/resctrl: Add MBA test Fenghua Yu (2): selftests/resctrl: Add README for resctrl tests selftests

[PATCH v3 5/8] selftests/resctrl: Add built in benchmark

2018-10-31 Thread Fenghua Yu
Praneeth Prakhya Signed-off-by: Arshiya Hayatkhan Pathan Signed-off-by: Fenghua Yu --- tools/testing/selftests/resctrl/fill_buf.c | 175 + 1 file changed, 175 insertions(+) create mode 100644 tools/testing/selftests/resctrl/fill_buf.c diff --git a/tools/testing/selftests

[PATCH v3 2/8] selftests/resctrl: Add basic resctrl file system operations and data

2018-10-31 Thread Fenghua Yu
From: Sai Praneeth Prakhya The basic resctrl file system operations and data are added for future usage by resctrl selftest tool. Signed-off-by: Sai Praneeth Prakhya Signed-off-by: Arshiya Hayatkhan Pathan Signed-off-by: Fenghua Yu --- tools/testing/selftests/resctrl/Makefile| 10

[PATCH v3 7/8] selftests/resctrl: Add MBA test

2018-10-31 Thread Fenghua Yu
Signed-off-by: Sai Praneeth Prakhya , Signed-off-by: Fenghua Yu --- tools/testing/selftests/resctrl/Makefile| 2 +- tools/testing/selftests/resctrl/mba_test.c | 173 tools/testing/selftests/resctrl/resctrl.h | 2 + tools/testing/selftests/resctrl/resct

[PATCH v3 3/8] selftests/resctrl: Read memory bandwidth from perf IMC counter and from resctrl file system

2018-10-31 Thread Fenghua Yu
Signed-off-by: Fenghua Yu --- tools/testing/selftests/resctrl/membw.c | 431 1 file changed, 431 insertions(+) create mode 100644 tools/testing/selftests/resctrl/membw.c diff --git a/tools/testing/selftests/resctrl/membw.c b/tools/testing/selftests/resctrl

[PATCH v3 6/8] selftests/resctrl: Add MBM test

2018-10-31 Thread Fenghua Yu
th Prakhya , Signed-off-by: Fenghua Yu --- tools/testing/selftests/resctrl/Makefile| 8 +- tools/testing/selftests/resctrl/mbm_test.c | 145 tools/testing/selftests/resctrl/membw.c | 2 + tools/testing/selftests/resctrl/resctrl.h | 3 + too

[PATCH v3 4/8] selftests/resctrl: Add callback to start a benchmark

2018-10-31 Thread Fenghua Yu
From: Sai Praneeth Prakhya The callback starts a child process and puts the child pid in created resctrl group with specified memory bandwidth in schemata. The child starts running benchmark. Signed-off-by: Sai Praneeth Prakhya Signed-off-by: Arshiya Hayatkhan Pathan Signed-off-by: Fenghua Yu

[PATCH v3 8/8] selftests/resctrl: Add the test in MAINTAINERS

2018-10-31 Thread Fenghua Yu
The resctrl selftest will be maintained by RDT maintainers. Signed-off-by: Fenghua Yu --- MAINTAINERS | 1 + 1 file changed, 1 insertion(+) diff --git a/MAINTAINERS b/MAINTAINERS index 48a65c3a4189..ecd1369ef761 100644 --- a/MAINTAINERS +++ b/MAINTAINERS @@ -12270,6 +12270,7 @@ S

[PATCH v3 1/8] selftests/resctrl: Add README for resctrl tests

2018-10-31 Thread Fenghua Yu
resctrl tests will be implemented. README is added for the tool first. Signed-off-by: Fenghua Yu --- tools/testing/selftests/resctrl/README | 53 ++ 1 file changed, 53 insertions(+) create mode 100644 tools/testing/selftests/resctrl/README diff --git a/tools

Re: Fwd: [PATCH v2 2/8] selftests/resctrl: Add basic resctrl file system operations and data

2018-10-30 Thread Fenghua Yu
> From: Moger, Babu > > From: Fenghua Yu > > From: Sai Praneeth Prakhya > > > > The basic resctrl file system operations and data are added for future > > usage by resctrl selftest tool. > > > > + return 0; > > +} > > + > >

[PATCH v2 3/8] selftests/resctrl: Read memory bandwidth from perf IMC counter and from resctrl file system

2018-10-25 Thread Fenghua Yu
Signed-off-by: Fenghua Yu --- tools/testing/selftests/resctrl/membw.c | 403 1 file changed, 403 insertions(+) create mode 100644 tools/testing/selftests/resctrl/membw.c diff --git a/tools/testing/selftests/resctrl/membw.c b/tools/testing/selftests/resctrl

[PATCH v2 2/8] selftests/resctrl: Add basic resctrl file system operations and data

2018-10-25 Thread Fenghua Yu
From: Sai Praneeth Prakhya The basic resctrl file system operations and data are added for future usage by resctrl selftest tool. Signed-off-by: Sai Praneeth Prakhya Signed-off-by: Arshiya Hayatkhan Pathan Signed-off-by: Fenghua Yu --- tools/testing/selftests/resctrl/Makefile| 10

[PATCH v2 4/8] selftests/resctrl: Add callback to start a benchmark

2018-10-25 Thread Fenghua Yu
From: Sai Praneeth Prakhya The callback starts a child process and puts the child pid in created resctrl group with specified memory bandwidth in schemata. The child starts running benchmark. Signed-off-by: Sai Praneeth Prakhya Signed-off-by: Arshiya Hayatkhan Pathan Signed-off-by: Fenghua Yu

[PATCH v2 1/8] selftests/resctrl: Add README for resctrl tests

2018-10-25 Thread Fenghua Yu
resctrl tests will be implemented. README is added for the tool first. Signed-off-by: Fenghua Yu --- tools/testing/selftests/resctrl/README | 53 ++ 1 file changed, 53 insertions(+) create mode 100644 tools/testing/selftests/resctrl/README diff --git a/tools

[PATCH v2 5/8] selftests/resctrl: Add built in benchmark

2018-10-25 Thread Fenghua Yu
Praneeth Prakhya Signed-off-by: Arshiya Hayatkhan Pathan Signed-off-by: Fenghua Yu --- tools/testing/selftests/resctrl/fill_buf.c | 175 + 1 file changed, 175 insertions(+) create mode 100644 tools/testing/selftests/resctrl/fill_buf.c diff --git a/tools/testing/selftests

[PATCH v2 0/8] selftests/resctrl: Add resctrl selftest

2018-10-25 Thread Fenghua Yu
. Arshiya Hayatkhan Pathan (2): selftests/resctrl: Add mbm test selftests/resctrl: Add mba test Fenghua Yu (2): selftests/resctrl: Add README for resctrl tests selftests/resctrl: Add the test in MAINTAINERS Sai Praneeth Prakhya (4): selftests/resctrl: Add basic resctrl file system operations

[PATCH v2 8/8] selftests/resctrl: Add the test in MAINTAINERS

2018-10-25 Thread Fenghua Yu
The resctrl selftests will be maintained by RDT maintainers. Signed-off-by: Fenghua Yu --- MAINTAINERS | 1 + 1 file changed, 1 insertion(+) diff --git a/MAINTAINERS b/MAINTAINERS index 48a65c3a4189..ecd1369ef761 100644 --- a/MAINTAINERS +++ b/MAINTAINERS @@ -12270,6 +12270,7 @@ S

[PATCH v2 7/8] selftests/resctrl: Add mba test

2018-10-25 Thread Fenghua Yu
a , Signed-off-by: Fenghua Yu --- tools/testing/selftests/resctrl/Makefile| 2 +- tools/testing/selftests/resctrl/mba_test.c | 175 tools/testing/selftests/resctrl/resctrl.h | 4 + tools/testing/selftests/resctrl/resctrl_tests.c | 16 ++- 4 files ch

[PATCH v2 6/8] selftests/resctrl: Add mbm test

2018-10-25 Thread Fenghua Yu
to pass the test. Default benchmark is built-in fill_buf. But users can specify their own benchmark by option "-b". We can add memory bandwidth monitoring for multiple processes in the future. Signed-off-by: Arshiya Hayatkhan Pathan Signed-off-by: Sai Praneeth Prakhya , Signed-off-by:

Re: [RFC PATCH 00/10] arch/x86: AMD QoS support

2018-10-03 Thread Fenghua Yu
On Tue, Oct 02, 2018 at 07:16:23PM +, Moger, Babu wrote: > > > On 10/02/2018 01:46 PM, Fenghua Yu wrote: > > On Tue, Oct 02, 2018 at 05:44:47PM +, Moger, Babu wrote: > >> Hi Fenghua, > >> > >>> -----Original Message- > >>> Fro

Re: [RFC PATCH 00/10] arch/x86: AMD QoS support

2018-10-02 Thread Fenghua Yu
On Mon, Sep 24, 2018 at 07:18:54PM +, Moger, Babu wrote: > The public specification is still in works. Will add the link when it is > available. Is this the public AMD QoS spec? https://support.amd.com/TechDocs/56375_Quality_of_Service_Extensions.pdf Thanks. -Fenghua

Re: [RFC PATCH 10/10] arch/x86: Introduce QOS feature for AMD

2018-10-02 Thread Fenghua Yu
On Mon, Sep 24, 2018 at 07:19:16PM +, Moger, Babu wrote: > int parse_bw(void *_buf, struct rdt_resource *r, struct rdt_domain *d); > +int parse_bw_amd(void *_buf, struct rdt_resource *r, struct rdt_domain *d); Please note the type of _buf in parse_bw() is changed in latest kernel to fix

Re: [RFC PATCH 00/10] arch/x86: AMD QoS support

2018-10-02 Thread Fenghua Yu
On Tue, Oct 02, 2018 at 05:44:47PM +, Moger, Babu wrote: > Hi Fenghua, > > > -Original Message- > > From: Fenghua Yu > > Sent: Tuesday, October 2, 2018 12:07 PM > > On Mon, Sep 24, 2018 at 07:18:54PM +, Moger, Babu wrote: > > > The public sp

Re: [PATCH v2 05/11] arch/x86: Introduce a new config parameter PLATFORM_QOS

2018-10-05 Thread Fenghua Yu
On Fri, Oct 05, 2018 at 08:55:52PM +, Moger, Babu wrote: > Introduces a new config parameter PLATFORM_QOS. > > This will be used as a common config parameter for both Intel and AMD. > Each vendor will have their own config parameter to enable RDT feature. > One for Intel(INTEL_RDT) and one

[PATCH] x86/intel_rdt: Add Reinette as co-maintainer for RDT

2018-09-20 Thread Fenghua Yu
Reinette Chatre is doing great job on enabling pseudo-locking and other features in RDT. Add her as co-maintainer for RDT. Suggested-by: Thomas Gleixner Signed-off-by: Fenghua Yu Acked-by: Ingo Molnar Acked-by: Reinette Chatre --- MAINTAINERS | 1 + 1 file changed, 1 insertion(+) diff --git

Re: [PATCH] x86/intel_rdt: Show missing resctrl mount options

2018-09-12 Thread Fenghua Yu
On Sat, Sep 08, 2018 at 02:07:41PM +0200, Thomas Gleixner wrote: > On Tue, 4 Sep 2018, Fenghua Yu wrote: > > > > Signed-off-by: Xiaochen Shen > > Signed-off-by: Fenghua Yu > > Sigh. Am I supposed to assume that this patch is authored by Xiaochen? Yes, Xi

[PATCH v2] x86/intel_rdt: Show missing resctrl mount options

2018-09-12 Thread Fenghua Yu
#mount -t resctrl resctrl -o cdp,mba_MBps /sys/fs/resctrl #grep resctrl /proc/mountts /sys/fs/resctrl /sys/fs/resctrl resctrl rw,relatime,cdp,mba_MBps 0 0 Signed-off-by: Xiaochen Shen Signed-off-by: Fenghua Yu --- arch/x86/kernel/cpu/intel_rdt_rdtgroup.c | 7 +++ 1 file change

[PATCH 3/9] x86/intel_rdt: Global closid helper to support future fixes

2018-09-14 Thread Fenghua Yu
of CLOSIDs supported by the resource. Introduce a helper function that can be used to query the number of CLOSIDs that is supported by all resources, irrespective of how many CLOSIDs are supported by a particular resource. Signed-off-by: Reinette Chatre Signed-off-by: Fenghua Yu --- arch/x86/kernel

[PATCH 4/9] x86/intel_rdt: Fix invalid mode warning when

2018-09-14 Thread Fenghua Yu
4/0xa9 [ 130.229733] RIP: 0033:0x7ff6f3c88701 Fix this by ensuring that only the number of supported CLOSIDs are considered. Fixes: e651901187ab8 ("x86/intel_rdt: Introduce "bit_usage" to display cache allocations details") Signed-off-by: Reinette Chatre Signed-off-by: Fenghu

[PATCH 6/9] x86/intel_rdt: Do not allow pseudo-locking of MBA resource

2018-09-14 Thread Fenghua Yu
resource. Fixes: e0bdfe8e3 ("x86/intel_rdt: Support creation/removal of pseudo-locked region") Signed-off-by: Reinette Chatre Signed-off-by: Fenghua Yu --- arch/x86/kernel/cpu/intel_rdt_ctrlmondata.c | 6 ++ 1 file changed, 6 insertions(+) diff --git a/arch/x86/

[PATCH 7/9] x86/intel_rdt: Fix incorrect loop end condition

2018-09-14 Thread Fenghua Yu
("x86/intel_rdt: Enable setting of exclusive mode") Signed-off-by: Reinette Chatre Signed-off-by: Fenghua Yu --- arch/x86/kernel/cpu/intel_rdt_rdtgroup.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/arch/x86/kernel/cpu/intel_rdt_rdtgroup.c b/arch/x86/

[PATCH 1/9] x86/intel_rdt: Fix MBA parsing callback

2018-09-14 Thread Fenghua Yu
e Chatre Signed-off-by: Fenghua Yu --- arch/x86/kernel/cpu/intel_rdt.h | 2 +- arch/x86/kernel/cpu/intel_rdt_ctrlmondata.c | 24 ++--- 2 files changed, 13 insertions(+), 13 deletions(-) diff --git a/arch/x86/kernel/cpu/intel_rdt.h b/arch/x86/kernel/cpu/intel_rdt.

[PATCH 8/9] x86/intel_rdt: Fix exclusive mode handling of MBA resource

2018-09-14 Thread Fenghua Yu
roup and ensuring that the CBM checking is only done on CAT/CDP resources. Fixes: 49f7b4efa ("x86/intel_rdt: Enable setting of exclusive mode") Signed-off-by: Reinette Chatre Signed-off-by: Fenghua Yu --- arch/x86/kernel/cpu/intel_rdt_rdtgroup.c | 14 -- 1 file changed, 12 i

[PATCH 5/9] x86/intel_rdt: Fix unchecked MSR access

2018-09-14 Thread Fenghua Yu
uot;) Signed-off-by: Reinette Chatre Signed-off-by: Fenghua Yu --- arch/x86/kernel/cpu/intel_rdt_rdtgroup.c | 12 1 file changed, 12 insertions(+) diff --git a/arch/x86/kernel/cpu/intel_rdt_rdtgroup.c b/arch/x86/kernel/cpu/intel_rdt_rdtgroup.c index ea91750ba27f..74821bc457c0 100644 --- a

[PATCH V2 8/9] x86/intel_rdt: Fix exclusive mode handling of MBA resource

2018-09-15 Thread Fenghua Yu
roup and ensuring that the CBM checking is only done on CAT/CDP resources. Fixes: 49f7b4efa ("x86/intel_rdt: Enable setting of exclusive mode") Signed-off-by: Reinette Chatre Signed-off-by: Fenghua Yu --- arch/x86/kernel/cpu/intel_rdt_rdtgroup.c | 14 -- 1 file changed, 12 i

[PATCH V2 1/9] x86/intel_rdt: Fix data type in parsing callbacks

2018-09-15 Thread Fenghua Yu
e Chatre Signed-off-by: Fenghua Yu --- arch/x86/kernel/cpu/intel_rdt.h | 16 arch/x86/kernel/cpu/intel_rdt_ctrlmondata.c | 21 - 2 files changed, 20 insertions(+), 17 deletions(-) diff --git a/arch/x86/kernel/cpu/intel_rdt.h b/arch/x86/kernel/c

[PATCH V2 7/9] x86/intel_rdt: Fix incorrect loop end condition

2018-09-15 Thread Fenghua Yu
("x86/intel_rdt: Enable setting of exclusive mode") Signed-off-by: Reinette Chatre Signed-off-by: Fenghua Yu --- arch/x86/kernel/cpu/intel_rdt_rdtgroup.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/arch/x86/kernel/cpu/intel_rdt_rdtgroup.c b/arch/x86/

[PATCH V2 9/9] x86/intel_rdt: Fix incorrect loop end condition

2018-09-15 Thread Fenghua Yu
on the minimum across all resources. Fixes: 95f0b77ef ("x86/intel_rdt: Initialize new resource group with sane defaults") Signed-off-by: Reinette Chatre Signed-off-by: Fenghua Yu --- arch/x86/kernel/cpu/intel_rdt_rdtgroup.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/arch/

[PATCH V2 4/9] x86/intel_rdt: Fix invalid mode warning when multiple resources are managed

2018-09-15 Thread Fenghua Yu
rdt_bit_usage_show+0x221/0x2b0 Fix this by ensuring that only the number of supported CLOSIDs are considered. Fixes: e651901187ab8 ("x86/intel_rdt: Introduce "bit_usage" to display cache allocations details") Signed-off-by: Reinette Chatre Signed-off-by: Fenghua Yu ---

[PATCH V2 6/9] x86/intel_rdt: Do not allow pseudo-locking of MBA resource

2018-09-15 Thread Fenghua Yu
resource. Fixes: e0bdfe8e3 ("x86/intel_rdt: Support creation/removal of pseudo-locked region") Signed-off-by: Reinette Chatre Signed-off-by: Fenghua Yu --- arch/x86/kernel/cpu/intel_rdt_ctrlmondata.c | 6 ++ 1 file changed, 6 insertions(+) diff --git a/arch/x86/

[PATCH V2 0/9] x86/intel_rdt: MBA integration fixes

2018-09-15 Thread Fenghua Yu
Chen Yu reported an issue where reading the resctrl "size" file results in a divide-by-zero issue on a system with a MBA resource. Further investigation revealed more issues where the recent RDT features are not well integrated with the MBA resource handling. This series consists out of: - One

[PATCH V2 2/9] x86/intel_rdt: Fix size reporting of MBA resource

2018-09-15 Thread Fenghua Yu
sted-by: Chen Yu Signed-off-by: Reinette Chatre Signed-off-by: Fenghua Yu --- arch/x86/kernel/cpu/intel_rdt_rdtgroup.c | 14 ++ 1 file changed, 10 insertions(+), 4 deletions(-) diff --git a/arch/x86/kernel/cpu/intel_rdt_rdtgroup.c b/arch/x86/kernel/cpu/intel_rdt_rdtgroup.c index

[PATCH V2 3/9] x86/intel_rdt: Global closid helper to support future fixes

2018-09-15 Thread Fenghua Yu
of CLOSIDs supported by the resource. Introduce a helper function that can be used to query the number of CLOSIDs that is supported by all resources, irrespective of how many CLOSIDs are supported by a particular resource. Signed-off-by: Reinette Chatre Signed-off-by: Fenghua Yu --- arch/x86/kernel

[PATCH V2 5/9] x86/intel_rdt: Fix unchecked MSR access

2018-09-15 Thread Fenghua Yu
the initial allocation is only attempted on a CAT resource. Fixes: 95f0b77ef ("x86/intel_rdt: Initialize new resource group with sane defaults") Signed-off-by: Reinette Chatre Signed-off-by: Fenghua Yu --- arch/x86/kernel/cpu/intel_rdt_rdtgroup.c | 12 1 file changed, 12

Re: [PATCH 1/9] x86/intel_rdt: Fix MBA parsing callback

2018-09-15 Thread Fenghua Yu
On Sat, Sep 15, 2018 at 12:13:53PM +0200, Thomas Gleixner wrote: > On Fri, 14 Sep 2018, Fenghua Yu wrote: > > +int parse_bw(void *_data, struct rdt_resource *r, struct rdt_domain *d); > > Sorry no. This keeps the code equally error prone as it was. Why is that > argum

[PATCH 2/9] x86/intel_rdt: Fix size reporting of MBA resource

2018-09-14 Thread Fenghua Yu
.kernel.org/r/20180904174614.26682-1-yu.c.c...@intel.com Reported-by: Chen Yu Tested-by: Chen Yu Signed-off-by: Reinette Chatre Signed-off-by: Fenghua Yu --- arch/x86/kernel/cpu/intel_rdt_rdtgroup.c | 14 ++ 1 file changed, 10 insertions(+), 4 deletions(-) diff --git a/arch/x

[PATCH 9/9] x86/intel_rdt: Fix incorrect loop end condition

2018-09-14 Thread Fenghua Yu
on the minimum across all resources. Fixes: 95f0b77ef ("x86/intel_rdt: Initialize new resource group with sane defaults") Signed-off-by: Reinette Chatre Signed-off-by: Fenghua Yu --- arch/x86/kernel/cpu/intel_rdt_rdtgroup.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/arch/

[PATCH 0/9] x86/intel_rdt: MBA integration fixes

2018-09-14 Thread Fenghua Yu
Chen Yu reported an issue where reading the resctrl "size" file results in a divide-by-zero issue on a system with a MBA resource. Further investigation revealed more issues where the recent RDT features are not well integrated with the MBA resource handling. This series consists out of: - One

[PATCH 1/2]: define new percpu interface for shared data - version 4

2007-06-13 Thread Fenghua Yu
section, where all the data elements are cacheline aligned. And as such, this differentiates the local only data and remotely accessed data cleanly. Signed-off-by: Fenghua Yu <[EMAIL PROTECTED]> Acked-by: Suresh Siddha <[EMAIL PROTECTED]> Cc: Rusty Russell <[EMAIL PROTECTED]> Cc:

[PATCH 2/2]: use the new percpu interface for shared data - version 4

2007-06-13 Thread Fenghua Yu
the local only percpu data. Signed-off-by: Fenghua Yu <[EMAIL PROTECTED]> Acked-by: Suresh Siddha <[EMAIL PROTECTED]> Cc: Rusty Russell <[EMAIL PROTECTED]> Cc: Christoph Lameter <[EMAIL PROTECTED]> Signed-off-by: Andrew Morton <[EMAIL PROTECTED]> --- arch/i386/kernel

[PATCH 1/2] Define new percpu interface for shared data -- version 3

2007-05-22 Thread Fenghua Yu
are cacheline aligned. And as such, this differentiates the local only data and remotely accessed data cleanly. igned-off-by: Fenghua Yu <[EMAIL PROTECTED]> Acked-by: Suresh Siddha <[EMAIL PROTECTED]> --- arch/alpha/kernel/vmlinux.lds.S |5 + arch/arm/kernel/vmlinux.lds.

[PATCH 2/2] Use the new percpu interface for shared data -- version 3

2007-05-22 Thread Fenghua Yu
the local only percpu data. Signed-off-by: Fenghua Yu <[EMAIL PROTECTED]> Acked-by: Suresh Siddha <[EMAIL PROTECTED]> --- arch/i386/kernel/init_task.c |2 +- arch/i386/kernel/irq.c |2 +- arch/ia64/kernel/smp.c |2 +- arch/x86_64/kernel/init_task.c |

[PATCH 2/2] Use the new percpu interface for shared data -- version 2

2007-05-14 Thread Fenghua Yu
the local only percpu data. Signed-off-by: Fenghua Yu <[EMAIL PROTECTED]> Acked-by: Suresh Siddha <[EMAIL PROTECTED]> --- arch/i386/kernel/init_task.c |2 +- arch/i386/kernel/irq.c |2 +- arch/ia64/kernel/smp.c |2 +- arch/x86_64/kernel/init_task.c |

[PATCH 1/2] Define new percpu interface for shared data -- version 2

2007-05-14 Thread Fenghua Yu
, where all the data elements are cacheline aligned. And as such, this differentiates the local only data and remotely accessed data cleanly. Signed-off-by: Fenghua Yu <[EMAIL PROTECTED]> Acked-by: Suresh Siddha <[EMAIL PROTECTED]> --- arch/alpha/kernel/vmlinux.lds.S |5 + arc

[PATCH 1/2] Define percpu smp cacheline align interface

2007-05-04 Thread Fenghua Yu
Define percpu smp cacheline align interface Signed-off-by: Fenghua Yu <[EMAIL PROTECTED]> Acked-by: Suresh Siddha <[EMAIL PROTECTED]> diff -Nurp linux-2.6.21-rc7.0/arch/alpha/kernel/vmlinux.lds.S linux-2.6.21-rc7.1/arch/alpha/kernel/vmlinux.lds.S --- linux-2.6.21-rc7.0/arch/

[PATCH 0/2] Add percpu smp cacheline align section

2007-05-04 Thread Fenghua Yu
This is follow-up for Suresh's runqueue align in smp patch at: http://www.uwsg.iu.edu/hypermail/linux/kernel/0704.1/0340.html The patches place all of smp cacheline aligned percpu data into .data.percpu.cacheline_aligned_in_smp. Other percpu data is still in data.percpu section. The patches

[PATCH 2/2] Call percpu smp cacheline algin interface

2007-05-04 Thread Fenghua Yu
Call percpu smp cacheline align interface. Signed-off-by: Fenghua Yu <[EMAIL PROTECTED]> Acked-by: Suresh Siddha <[EMAIL PROTECTED]> diff -Nurp linux-2.6.21-rc7.0/arch/i386/kernel/init_task.c linux-2.6.21-rc7.1/arch/i386/kernel/init_task.c --- linux-2.6.21-rc7.0/arch/i386/kernel

Re: [PATCH 1/2] Define percpu smp cacheline align interface

2007-05-07 Thread Fenghua Yu
On Fri, May 04, 2007 at 05:12:18PM -0700, Fenghua Yu wrote: > > Define percpu smp cacheline align interface This is updated patch. Per cpu cacheline aligned data section name and macro name are changed to have better code understanding. The patches place all of smp cacheline aligned

Re: [PATCH 2/2] Call percpu smp cacheline algin interface

2007-05-07 Thread Fenghua Yu
On Fri, May 04, 2007 at 05:12:31PM -0700, Fenghua Yu wrote: > > Call percpu smp cacheline align interface. > This is updated patch. Use new macro name DEFINE_PER_CPU_SHARED_CACHELINE_ALIGNED for better code understanding. Signed-off-by: Fenghua Yu <[EMAIL PROTECTED]> Acked-by

[PATCH] Fix uninitialized local variable "covered" in i386 acpi-cpufreq driver

2007-07-26 Thread Fenghua Yu
The local variable "covered" is used without initialization in i386 acpi-cpufreq driver. The initial value of covered should be 0. The bug will cause memory leak when hit. The following patch fixes this bug. Signed-off-by: Fenghua Yu <[EMAIL PROTECTED]> --- arch/i386/kernel/

Re:[PATCH] Fix uninitialized local variable "covered" in i386 acpi-cpufreq driver

2007-07-26 Thread Fenghua Yu
Updated patch: Use CPU_MASK_NONE for initil value. Signed-off-by: Fenghua Yu <[EMAIL PROTECTED]> --- arch/i386/kernel/cpu/cpufreq/acpi-cpufreq.c |2 +- 1 files changed, 1 insertion(+), 1 deletion(-) diff --git a/arch/i386/kernel/cpu/cpufreq/acpi-cpufreq.c b/arch/i386/kernel/cpu/c

[PATCH] Fix some x86/x86-64 acpi-cpufreq driver issues

2007-08-02 Thread Fenghua Yu
load driver in acpi_cpufreq_early_init() failure case. 3. Add __init for acpi_cpufreq_early_init(). Thanks. -Fenghua Signed-off-by: Fenghua Yu <[EMAIL PROTECTED]> --- arch/i386/kernel/cpu/cpufreq/acpi-cpufreq.c | 39 ++-- drivers/acpi/processor_per

[PATCH] More Sanity checks for DMAR

2007-11-19 Thread Fenghua Yu
check is not accurate and execution can pass when haw is less than one page size 4KB. This patch changes the haw sanity check to validate if haw is less than 4KB. 2. Add dmar_rmrr_units verification. 3. Add parse_dmar_table() verification. Thanks. -Fenghua Signed-off-by: Fenghua Yu <[EMAIL PROTEC

[PATCH] Fix incorrect comment on show_available_freqs() in freq_table.c

2007-10-17 Thread Fenghua Yu
In freq_table.c, show_available_freqs()'s comment is oberviously wrong. Change the comment to a new one to avoid confusion. Please apply it. Signed-off-by: Fenghua Yu <[EMAIL PROTECTED]> --- freq_table.c |2 +- 1 files changed, 1 insertion(+), 1 deletion(-) diff --git a/drivers/c

[PATCH] x86/copy_user.S: Remove zero byte check before copy user buffer.

2013-11-16 Thread Fenghua Yu
From: Fenghua Yu Operation of rep movsb instruction handles zero byte copy. As pointed out by Linus, there is no need to check zero size in kernel. Removing this redundant check saves a few cycles in copy user functions. Signed-off-by: Fenghua Yu --- arch/x86/lib/copy_user_64.S | 8

[PATCH] x86/apic: Justification for disabling IO APIC before Local APIC

2013-12-04 Thread Fenghua Yu
From: Fenghua Yu Since erratum AVR31 in "Intel Atom Processor C2000 Product Family Specification Update" is published, I add a justification comment for disabling IO APIC before Local APIC (commit 522e6646). Signed-off-by: Fenghua Yu --- arch/x86/kernel/reboot.c | 11 +

[PATCH] x86/microcode_intel_early.c: Get 32-bit physical address by __pa_nodebug()

2013-03-19 Thread Fenghua Yu
From: Fenghua Yu In 32-bit, __pa_symbol() in CONFIG_DEBUG_VIRTUAL accesses kernel data (e.g. max_low_pfn) that haven't been setup yet in such early boot phase. To fix the issue, __pa_nodebug() replaces __pa_symbol() to get a global symbol's physical address. Signed-off-by: Fenghua Yu --- arch

[PATCH 0/2] Quiet power limit notification

2013-05-15 Thread Fenghua Yu
From: Fenghua Yu Power Limit Notification (X86_FEATURE_PLN) was added in Sandy Bridge to give the OS the option of knowing when the package has reached a configured power threshold. Linux-2.6.36 enabled this feature: 0199114c31798af5b83841b21759b64171060d9b (x86, hwmon: Package Level Thermal

[PATCH 2/2] x86/AVX-512: Enable AVX-512 States Context Switch

2014-02-20 Thread Fenghua Yu
From: Fenghua Yu This patch enables Opmask, ZMM_Hi256, and Hi16_ZMM AVX-512 states for xstate context switch. Signed-off-by: Fenghua Yu --- arch/x86/include/asm/xsave.h | 16 ++-- 1 file changed, 10 insertions(+), 6 deletions(-) diff --git a/arch/x86/include/asm/xsave.h b/arch

[PATCH 1/2] x86/AVX-512: AVX-512 Feature Detection

2014-02-20 Thread Fenghua Yu
From: Fenghua Yu AVX-512 is an extention of AVX2. Its spec can be found at: http://download-software.intel.com/sites/default/files/managed/71/2e/319433-017.pdf This patch detects AVX-512 features by CPUID. Signed-off-by: Fenghua Yu --- arch/x86/include/asm/cpufeature.h | 4 1 file

[PATCH] x86/apic: Disable I/O APIC before shutdown local APIC

2013-10-23 Thread Fenghua Yu
From: Fenghua Yu In reboot and crash path, when shutdown local APIC, I/O APIC is still active. This may cause issues because external interrupts can still come in and disturb local APIC during shutdown process. To quiet external interrupts, disable I/O APIC before shutdown local APIC. Signed

[PATCH 01/15] x86/xsaves: Detect xsaves/xrstors feature

2014-05-26 Thread Fenghua Yu
From: Fenghua Yu Detect the xsaves feature in processor extended state enumberation sub-leaf (eax=0x0d, ecx=1): Bit 03: Supports xsaves/xrstors and IA32_XSS if set The IA32_XSS MSR (index DA0H) contains a state-component bitmap that specifies the state components that software has enabled

[PATCH 15/15] Define kernel API to get address of each state in xsave area

2014-05-26 Thread Fenghua Yu
From: Fenghua Yu In standard format, each state is saved in the xsave area in fixed offset. In compacted format, offset of each saved state only can be calculated during run time because some xstates may not be saved. get_xsave_addr() returns address of a given state saved in a xsave area

[PATCH 10/15] x86/xsaves: Clear reserved bits in xsave header

2014-05-26 Thread Fenghua Yu
From: Fenghua Yu The reserved bits (128~511) in the xsave header must be zero. Clear the bits here. Signed-off-by: Fenghua Yu --- arch/x86/kernel/i387.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/arch/x86/kernel/i387.c b/arch/x86/kernel/i387.c index d5dd808..a9a4229

[PATCH 14/15] x86/xsaves: Enable xsaves/xrstors

2014-05-26 Thread Fenghua Yu
From: Fenghua Yu If xsaves/xrstors is enabled, compacted format of xsave area will be used and less memory may be used for context switching per process. Modified optimization implemented in xsaves/xrstors improves performance of saving xstate as well. Signed-off-by: Fenghua Yu --- arch/x86

[PATCH 11/15] x86/xsaves: Add xsaves and xrstors support for booting time

2014-05-26 Thread Fenghua Yu
From: Fenghua Yu Since cpu caps are not enabled yet during early booting time, alternative can not be used in functions to access xsave area. Therefore, we define two new functions xrstor_state_booting and xsave_state_booting to access xsave area during early booting time. Because

[PATCH 13/15] x86/xsaves: Call booting time xsaves and xrstors in setup_init_fpu_buf

2014-05-26 Thread Fenghua Yu
From: Fenghua Yu setup_init_fpu_buf() calls booting time xsaves and xrstors to save/restore xstate in xsave area. Signed-off-by: Fenghua Yu --- arch/x86/kernel/xsave.c | 10 -- 1 file changed, 8 insertions(+), 2 deletions(-) diff --git a/arch/x86/kernel/xsave.c b/arch/x86/kernel

[PATCH 12/15] x86/xsaves: Save xstate to task's xsave area in __save_fpu during booting time

2014-05-26 Thread Fenghua Yu
From: Fenghua Yu __save_fpu() can be called during early booting time when cpu caps are not enabled and alternative can not be used yet. Therefore, it calls xsave_state_booting() to save xstate to task's xsave area. Signed-off-by: Fenghua Yu --- arch/x86/include/asm/fpu-internal.h | 9

[PATCH 07/15] x86/xsaves: Use xsaves/xrstors for saving and restoring xsave area

2014-05-26 Thread Fenghua Yu
From: Fenghua Yu If xsaves is eanbled, use xsaves/xrstors for saving and restoring xstate. xsaves supports compacted format, init optimization, modified optimization, and supervisor states. Signed-off-by: Fenghua Yu --- arch/x86/include/asm/xsave.h | 82

[PATCH 04/15] x86/xsaves: Change compacted format xsave area header

2014-05-26 Thread Fenghua Yu
From: Fenghua Yu With compacted format xsave area supported, the xsave area header is changed to support both compacted format and standard format xsave area. The XSAVE header of an XSAVE area comprises the 64 bytes starting at offset 512 from the area\u2019s base address: - Bytes 7:0

[PATCH 08/15] x86/xsaves: Use xsaves/xrstors for context switch

2014-05-26 Thread Fenghua Yu
From: Fenghua Yu If xsaves is eanbled, use xsaves/xrstors for context switch to utilize compacted format xsave area and modified optimization. Signed-off-by: Fenghua Yu --- arch/x86/include/asm/xsave.h | 37 - 1 file changed, 12 insertions(+), 25 deletions

[PATCH 09/15] x86/xsaves: Use xsave/xrstor for saving and restoring user space context

2014-05-26 Thread Fenghua Yu
From: Fenghua Yu We use legacy xsave/xrstor for user space context. No xsaveopt or xsaves is used here. We don't use modified optimization which is implemented in xsaveopt and xsaves because xrstor/xrstors might track a different application. We don't use compacted format xsave area in xsaves

[PATCH 06/15] x86/xsaves: Define macro for handle xsave/xrstor fault

2014-05-26 Thread Fenghua Yu
From: Fenghua Yu Define macro to handle fault generated by xsave, xsaveopt, xsaves, xrstor, xrstors instructions. Signed-off-by: Fenghua Yu --- arch/x86/include/asm/xsave.h | 7 +++ 1 file changed, 7 insertions(+) diff --git a/arch/x86/include/asm/xsave.h b/arch/x86/include/asm/xsave.h

[PATCH 05/15] x86/xsaves: Define macros for xsave instructions

2014-05-26 Thread Fenghua Yu
From: Fenghua Yu Define macros for xsave, xsaveopt, xsaves, xrstor, xrstors inline instructions. The instructions will be used for saving and rstoring xstate. Signed-off-by: Fenghua Yu --- arch/x86/include/asm/xsave.h | 6 ++ 1 file changed, 6 insertions(+) diff --git a/arch/x86/include

[PATCH 03/15] x86/alternative: Add alternative_input_2

2014-05-26 Thread Fenghua Yu
From: Fenghua Yu Add alternative_input_2 to take two features and respective instructions. If CPU has feature2, newinstr2 is used. Otherwise, if CPU has feature1, newinstr1 is used. Otherwise, oldinstr is used. Signed-off-by: Fenghua Yu --- arch/x86/include/asm/alternative.h | 13

<    1   2   3   4   5   6   7   8   9   10   >