All of lore.kernel.org
 help / color / mirror / Atom feed
* [PATCH] drivers: GHES_ASSIST feature cause kernel to have a 5ms scheduling latency on AMD ROME's platform
@ 2020-05-29 19:13 dianruihui
  2020-05-31 20:06 ` kbuild test robot
  2020-05-31 23:54   ` kbuild test robot
  0 siblings, 2 replies; 4+ messages in thread
From: dianruihui @ 2020-05-29 19:13 UTC (permalink / raw)
  To: ruihui.dian, rjw, lenb, linux-acpi; +Cc: Ruihui Dian

From: Ruihui Dian <dianruihui@163.com>

 AMD ROME's BIOS implement a feature(GHES_ASSIST)which is
 declared in ACPI 6.3,and can't be disabled by BIOS setting.
 This feature make kerenl register more than 10K poll timer.
 There are more than 10K GHESdevices under
 "/sys/bus/platform/drivers/GHES". These 10K timers will
 preempt the CPU resources and affect kernel's schedule.
 How to reproduce:
 running cyclictest benchmark on AMD ROME platform
 GHES_ASSIST still don't be supported by upsteam, and the
 ACPI 6.2 still isn't published, So we should disable it
 in drivers.

Signed-off-by: Ruihui Dian <dianruihui@163.com>
---
 drivers/acpi/apei/hest.c | 10 ++++++----
 include/acpi/actbl1.h    |  3 ++-
 2 files changed, 8 insertions(+), 5 deletions(-)

diff --git a/drivers/acpi/apei/hest.c b/drivers/acpi/apei/hest.c
index 8224024..f929bab 100644
--- a/drivers/acpi/apei/hest.c
+++ b/drivers/acpi/apei/hest.c
@@ -141,8 +141,9 @@ static int __init hest_parse_ghes_count(struct acpi_hest_header *hest_hdr, void
 {
 	int *count = data;
 
-	if (hest_hdr->type == ACPI_HEST_TYPE_GENERIC_ERROR ||
-	    hest_hdr->type == ACPI_HEST_TYPE_GENERIC_ERROR_V2)
+	if ((hest_hdr->type == ACPI_HEST_TYPE_GENERIC_ERROR &&
+	   !(hest_hdr->source_id&ACPI_HEST_GHES_ASSIST_MSK)) ||
+	   hest_hdr->type == ACPI_HEST_TYPE_GENERIC_ERROR_V2)
 		(*count)++;
 	return 0;
 }
@@ -153,8 +154,9 @@ static int __init hest_parse_ghes(struct acpi_hest_header *hest_hdr, void *data)
 	struct ghes_arr *ghes_arr = data;
 	int rc, i;
 
-	if (hest_hdr->type != ACPI_HEST_TYPE_GENERIC_ERROR &&
-	    hest_hdr->type != ACPI_HEST_TYPE_GENERIC_ERROR_V2)
+	if ((hest_hdr->type != ACPI_HEST_TYPE_GENERIC_ERROR &&
+	    hest_hdr->type != ACPI_HEST_TYPE_GENERIC_ERROR_V2) ||
+	    hest_hdr->source_id&CPI_HEST_GHES_ASSIST_MSK)
 		return 0;
 
 	if (!((struct acpi_hest_generic *)hest_hdr)->enabled)
diff --git a/include/acpi/actbl1.h b/include/acpi/actbl1.h
index 4354954..5dbbab4 100644
--- a/include/acpi/actbl1.h
+++ b/include/acpi/actbl1.h
@@ -1155,7 +1155,8 @@ struct acpi_hest_aer_common {
 #define ACPI_HEST_FIRMWARE_FIRST        (1)
 #define ACPI_HEST_GLOBAL                (1<<1)
 #define ACPI_HEST_GHES_ASSIST           (1<<2)
-
+/* If type==9 and Source ID bit [15:12] =!0, It is GHES_ASSIT structure*/
+#define ACPI_HEST_GHES_ASSIST_MSK	(0xF000)
 /*
  * Macros to access the bus/segment numbers in Bus field above:
  *  Bus number is encoded in bits 7:0
-- 
1.8.3.1


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

* Re: [PATCH] drivers: GHES_ASSIST feature cause kernel to have a 5ms scheduling latency on AMD ROME's platform
  2020-05-29 19:13 [PATCH] drivers: GHES_ASSIST feature cause kernel to have a 5ms scheduling latency on AMD ROME's platform dianruihui
@ 2020-05-31 20:06 ` kbuild test robot
  2020-05-31 23:54   ` kbuild test robot
  1 sibling, 0 replies; 4+ messages in thread
From: kbuild test robot @ 2020-05-31 20:06 UTC (permalink / raw)
  To: kbuild-all

[-- Attachment #1: Type: text/plain, Size: 3259 bytes --]

Hi,

Thank you for the patch! Yet something to improve:

[auto build test ERROR on pm/linux-next]
[also build test ERROR on v5.7-rc7 next-20200529]
[if your patch is applied to the wrong git tree, please drop us a note to help
improve the system. BTW, we also suggest to use '--base' option to specify the
base tree in git format-patch, please see https://stackoverflow.com/a/37406982]

url:    https://github.com/0day-ci/linux/commits/dianruihui-163-com/drivers-GHES_ASSIST-feature-cause-kernel-to-have-a-5ms-scheduling-latency-on-AMD-ROME-s-platform/20200601-002242
base:   https://git.kernel.org/pub/scm/linux/kernel/git/rafael/linux-pm.git linux-next
config: x86_64-allyesconfig (attached as .config)
compiler: clang version 11.0.0 (https://github.com/llvm/llvm-project 2388a096e7865c043e83ece4e26654bd3d1a20d5)
reproduce (this is a W=1 build):
        wget https://raw.githubusercontent.com/intel/lkp-tests/master/sbin/make.cross -O ~/bin/make.cross
        chmod +x ~/bin/make.cross
        # install x86_64 cross compiling tool for clang build
        # apt-get install binutils-x86-64-linux-gnu
        # save the attached .config to linux build tree
        COMPILER_INSTALL_PATH=$HOME/0day COMPILER=clang make.cross ARCH=x86_64 

If you fix the issue, kindly add following tag as appropriate
Reported-by: kbuild test robot <lkp@intel.com>

All errors (new ones prefixed by >>, old ones prefixed by <<):

>> drivers/acpi/apei/hest.c:159:26: error: use of undeclared identifier 'CPI_HEST_GHES_ASSIST_MSK'
hest_hdr->source_id&CPI_HEST_GHES_ASSIST_MSK)
^
1 error generated.

vim +/CPI_HEST_GHES_ASSIST_MSK +159 drivers/acpi/apei/hest.c

   150	
   151	static int __init hest_parse_ghes(struct acpi_hest_header *hest_hdr, void *data)
   152	{
   153		struct platform_device *ghes_dev;
   154		struct ghes_arr *ghes_arr = data;
   155		int rc, i;
   156	
   157		if ((hest_hdr->type != ACPI_HEST_TYPE_GENERIC_ERROR &&
   158		    hest_hdr->type != ACPI_HEST_TYPE_GENERIC_ERROR_V2) ||
 > 159		    hest_hdr->source_id&CPI_HEST_GHES_ASSIST_MSK)
   160			return 0;
   161	
   162		if (!((struct acpi_hest_generic *)hest_hdr)->enabled)
   163			return 0;
   164		for (i = 0; i < ghes_arr->count; i++) {
   165			struct acpi_hest_header *hdr;
   166			ghes_dev = ghes_arr->ghes_devs[i];
   167			hdr = *(struct acpi_hest_header **)ghes_dev->dev.platform_data;
   168			if (hdr->source_id == hest_hdr->source_id) {
   169				pr_warn(FW_WARN HEST_PFX "Duplicated hardware error source ID: %d.\n",
   170					hdr->source_id);
   171				return -EIO;
   172			}
   173		}
   174		ghes_dev = platform_device_alloc("GHES", hest_hdr->source_id);
   175		if (!ghes_dev)
   176			return -ENOMEM;
   177	
   178		rc = platform_device_add_data(ghes_dev, &hest_hdr, sizeof(void *));
   179		if (rc)
   180			goto err;
   181	
   182		rc = platform_device_add(ghes_dev);
   183		if (rc)
   184			goto err;
   185		ghes_arr->ghes_devs[ghes_arr->count++] = ghes_dev;
   186	
   187		return 0;
   188	err:
   189		platform_device_put(ghes_dev);
   190		return rc;
   191	}
   192	

---
0-DAY CI Kernel Test Service, Intel Corporation
https://lists.01.org/hyperkitty/list/kbuild-all(a)lists.01.org

[-- Attachment #2: config.gz --]
[-- Type: application/gzip, Size: 73513 bytes --]

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

* Re: [PATCH] drivers: GHES_ASSIST feature cause kernel to have a 5ms scheduling latency on AMD ROME's platform
  2020-05-29 19:13 [PATCH] drivers: GHES_ASSIST feature cause kernel to have a 5ms scheduling latency on AMD ROME's platform dianruihui
@ 2020-05-31 23:54   ` kbuild test robot
  2020-05-31 23:54   ` kbuild test robot
  1 sibling, 0 replies; 4+ messages in thread
From: kbuild test robot @ 2020-05-31 23:54 UTC (permalink / raw)
  To: dianruihui, ruihui.dian, rjw, lenb, linux-acpi; +Cc: kbuild-all, Ruihui Dian

[-- Attachment #1: Type: text/plain, Size: 3092 bytes --]

Hi,

Thank you for the patch! Yet something to improve:

[auto build test ERROR on pm/linux-next]
[also build test ERROR on v5.7-rc7 next-20200529]
[if your patch is applied to the wrong git tree, please drop us a note to help
improve the system. BTW, we also suggest to use '--base' option to specify the
base tree in git format-patch, please see https://stackoverflow.com/a/37406982]

url:    https://github.com/0day-ci/linux/commits/dianruihui-163-com/drivers-GHES_ASSIST-feature-cause-kernel-to-have-a-5ms-scheduling-latency-on-AMD-ROME-s-platform/20200601-002242
base:   https://git.kernel.org/pub/scm/linux/kernel/git/rafael/linux-pm.git linux-next
config: x86_64-rhel (attached as .config)
compiler: gcc-9 (Debian 9.3.0-13) 9.3.0
reproduce (this is a W=1 build):
        # save the attached .config to linux build tree
        make W=1 ARCH=x86_64 

If you fix the issue, kindly add following tag as appropriate
Reported-by: kbuild test robot <lkp@intel.com>

All errors (new ones prefixed by >>, old ones prefixed by <<):

drivers/acpi/apei/hest.c: In function 'hest_parse_ghes':
>> drivers/acpi/apei/hest.c:159:26: error: 'CPI_HEST_GHES_ASSIST_MSK' undeclared (first use in this function); did you mean 'ACPI_HEST_GHES_ASSIST_MSK'?
159 |      hest_hdr->source_id&CPI_HEST_GHES_ASSIST_MSK)
|                          ^~~~~~~~~~~~~~~~~~~~~~~~
|                          ACPI_HEST_GHES_ASSIST_MSK
drivers/acpi/apei/hest.c:159:26: note: each undeclared identifier is reported only once for each function it appears in

vim +159 drivers/acpi/apei/hest.c

   150	
   151	static int __init hest_parse_ghes(struct acpi_hest_header *hest_hdr, void *data)
   152	{
   153		struct platform_device *ghes_dev;
   154		struct ghes_arr *ghes_arr = data;
   155		int rc, i;
   156	
   157		if ((hest_hdr->type != ACPI_HEST_TYPE_GENERIC_ERROR &&
   158		    hest_hdr->type != ACPI_HEST_TYPE_GENERIC_ERROR_V2) ||
 > 159		    hest_hdr->source_id&CPI_HEST_GHES_ASSIST_MSK)
   160			return 0;
   161	
   162		if (!((struct acpi_hest_generic *)hest_hdr)->enabled)
   163			return 0;
   164		for (i = 0; i < ghes_arr->count; i++) {
   165			struct acpi_hest_header *hdr;
   166			ghes_dev = ghes_arr->ghes_devs[i];
   167			hdr = *(struct acpi_hest_header **)ghes_dev->dev.platform_data;
   168			if (hdr->source_id == hest_hdr->source_id) {
   169				pr_warn(FW_WARN HEST_PFX "Duplicated hardware error source ID: %d.\n",
   170					hdr->source_id);
   171				return -EIO;
   172			}
   173		}
   174		ghes_dev = platform_device_alloc("GHES", hest_hdr->source_id);
   175		if (!ghes_dev)
   176			return -ENOMEM;
   177	
   178		rc = platform_device_add_data(ghes_dev, &hest_hdr, sizeof(void *));
   179		if (rc)
   180			goto err;
   181	
   182		rc = platform_device_add(ghes_dev);
   183		if (rc)
   184			goto err;
   185		ghes_arr->ghes_devs[ghes_arr->count++] = ghes_dev;
   186	
   187		return 0;
   188	err:
   189		platform_device_put(ghes_dev);
   190		return rc;
   191	}
   192	

---
0-DAY CI Kernel Test Service, Intel Corporation
https://lists.01.org/hyperkitty/list/kbuild-all@lists.01.org

[-- Attachment #2: .config.gz --]
[-- Type: application/gzip, Size: 44874 bytes --]

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

* Re: [PATCH] drivers: GHES_ASSIST feature cause kernel to have a 5ms scheduling latency on AMD ROME's platform
@ 2020-05-31 23:54   ` kbuild test robot
  0 siblings, 0 replies; 4+ messages in thread
From: kbuild test robot @ 2020-05-31 23:54 UTC (permalink / raw)
  To: kbuild-all

[-- Attachment #1: Type: text/plain, Size: 3173 bytes --]

Hi,

Thank you for the patch! Yet something to improve:

[auto build test ERROR on pm/linux-next]
[also build test ERROR on v5.7-rc7 next-20200529]
[if your patch is applied to the wrong git tree, please drop us a note to help
improve the system. BTW, we also suggest to use '--base' option to specify the
base tree in git format-patch, please see https://stackoverflow.com/a/37406982]

url:    https://github.com/0day-ci/linux/commits/dianruihui-163-com/drivers-GHES_ASSIST-feature-cause-kernel-to-have-a-5ms-scheduling-latency-on-AMD-ROME-s-platform/20200601-002242
base:   https://git.kernel.org/pub/scm/linux/kernel/git/rafael/linux-pm.git linux-next
config: x86_64-rhel (attached as .config)
compiler: gcc-9 (Debian 9.3.0-13) 9.3.0
reproduce (this is a W=1 build):
        # save the attached .config to linux build tree
        make W=1 ARCH=x86_64 

If you fix the issue, kindly add following tag as appropriate
Reported-by: kbuild test robot <lkp@intel.com>

All errors (new ones prefixed by >>, old ones prefixed by <<):

drivers/acpi/apei/hest.c: In function 'hest_parse_ghes':
>> drivers/acpi/apei/hest.c:159:26: error: 'CPI_HEST_GHES_ASSIST_MSK' undeclared (first use in this function); did you mean 'ACPI_HEST_GHES_ASSIST_MSK'?
159 |      hest_hdr->source_id&CPI_HEST_GHES_ASSIST_MSK)
|                          ^~~~~~~~~~~~~~~~~~~~~~~~
|                          ACPI_HEST_GHES_ASSIST_MSK
drivers/acpi/apei/hest.c:159:26: note: each undeclared identifier is reported only once for each function it appears in

vim +159 drivers/acpi/apei/hest.c

   150	
   151	static int __init hest_parse_ghes(struct acpi_hest_header *hest_hdr, void *data)
   152	{
   153		struct platform_device *ghes_dev;
   154		struct ghes_arr *ghes_arr = data;
   155		int rc, i;
   156	
   157		if ((hest_hdr->type != ACPI_HEST_TYPE_GENERIC_ERROR &&
   158		    hest_hdr->type != ACPI_HEST_TYPE_GENERIC_ERROR_V2) ||
 > 159		    hest_hdr->source_id&CPI_HEST_GHES_ASSIST_MSK)
   160			return 0;
   161	
   162		if (!((struct acpi_hest_generic *)hest_hdr)->enabled)
   163			return 0;
   164		for (i = 0; i < ghes_arr->count; i++) {
   165			struct acpi_hest_header *hdr;
   166			ghes_dev = ghes_arr->ghes_devs[i];
   167			hdr = *(struct acpi_hest_header **)ghes_dev->dev.platform_data;
   168			if (hdr->source_id == hest_hdr->source_id) {
   169				pr_warn(FW_WARN HEST_PFX "Duplicated hardware error source ID: %d.\n",
   170					hdr->source_id);
   171				return -EIO;
   172			}
   173		}
   174		ghes_dev = platform_device_alloc("GHES", hest_hdr->source_id);
   175		if (!ghes_dev)
   176			return -ENOMEM;
   177	
   178		rc = platform_device_add_data(ghes_dev, &hest_hdr, sizeof(void *));
   179		if (rc)
   180			goto err;
   181	
   182		rc = platform_device_add(ghes_dev);
   183		if (rc)
   184			goto err;
   185		ghes_arr->ghes_devs[ghes_arr->count++] = ghes_dev;
   186	
   187		return 0;
   188	err:
   189		platform_device_put(ghes_dev);
   190		return rc;
   191	}
   192	

---
0-DAY CI Kernel Test Service, Intel Corporation
https://lists.01.org/hyperkitty/list/kbuild-all(a)lists.01.org

[-- Attachment #2: config.gz --]
[-- Type: application/gzip, Size: 44874 bytes --]

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

end of thread, other threads:[~2020-06-01  0:22 UTC | newest]

Thread overview: 4+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2020-05-29 19:13 [PATCH] drivers: GHES_ASSIST feature cause kernel to have a 5ms scheduling latency on AMD ROME's platform dianruihui
2020-05-31 20:06 ` kbuild test robot
2020-05-31 23:54 ` kbuild test robot
2020-05-31 23:54   ` kbuild test robot

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.