Skip to contentSkip to conversation

read_all: limit per cpu nodes to first ten cpus

PATCH New Jan Stancek 3 participants 4 messages Apr 13, 2021 – Apr 15, 2021

lore
Share & tools
lore
#0 lore raw

PATCH 1/1 read_all: limit per cpu nodes to first ten cpus

Some per cpu sysfs entries have high lock contention and when this is combined with systems which have many CPUs (meaning they also have many per cpu sysfs entries) the test spends most of time on these nodes and occasionally also hits timeout.

For example, these entries are largest contributor on HPE Apollo 70 (aarch64, 256 CPUs):
/sys/kernel/tracing/per_cpu/cpu247/* /sys/devices/system/cpu/cpu239/acpi_cppc/*

To preserve some coverage, add a blacklist rule that will ignore "cpu" nodes with 2 or more digits.

Before:

  real    4m47.747s
  user    0m0.885s
  sys     5m47.909s

After:

  real    0m42.696s
  user    0m0.911s
  sys     0m4.759s
---
 testcases/kernel/fs/read_all/read_all.c | 1 +
 1 file changed, 1 insertion(+)
testcases/kernel/fs/read_all/read_all.c +1 -0
index 79c6b93fad73..a4123220afbe 100644
@@ -87,6 +87,7 @@ static char *blacklist[] = {
 	"/sys/kernel/debug/*",
 	"/sys/devices/platform/*/eeprom",
 	"/sys/devices/platform/*/nvmem",
+	"/sys/*/cpu??*(?)/*",	/* cpu* entries with 2 or more digits */
 };
 
 static int queue_pop(struct queue *q, char *buf)
Signature · 1 line
2.18.1
#1 lore raw

PATCH 1/1 read_all: limit per cpu nodes to first ten cpus

Hi Jan,

Quoted 9 lines

Some per cpu sysfs entries have high lock contention and when this is combined with systems which have many CPUs (meaning they also have many per cpu sysfs entries) the test spends most of time on these nodes and occasionally also hits timeout.

For example, these entries are largest contributor on HPE Apollo 70 (aarch64, 256 CPUs):
/sys/kernel/tracing/per_cpu/cpu247/* /sys/devices/system/cpu/cpu239/acpi_cppc/*

Kind regards,
Petr

#3 lore raw

PATCH 1/1 read_all: limit per cpu nodes to first ten cpus

----- Original Message -----

Quoted 2 lines

Hi!
Sounds reasonable to me as well.

Thanks for review, pushed.