[PATCH] drivers: GHES_ASSIST feature cause kernel to have a 5ms scheduling latency on AMD ROME's platform

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



From: Ruihui Dian <dianruihui@xxxxxxx>

 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@xxxxxxx>
---
 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




[Index of Archives]     [Linux IBM ACPI]     [Linux Power Management]     [Linux Kernel]     [Linux Laptop]     [Kernel Newbies]     [Share Photos]     [Security]     [Netfilter]     [Bugtraq]     [Yosemite News]     [MIPS Linux]     [ARM Linux]     [Linux Security]     [Linux RAID]     [Samba]     [Video 4 Linux]     [Device Mapper]     [Linux Resources]

  Powered by Linux