Re: [PATCH v2 0/6] Assume sysfs event names are always lowercase

Thomas Richter
2024-04-23T06:54:11Z

On 4/23/24 05:17, Ian Rogers wrote:
> By assuming sysfs events are lower case, the case insensitive event
> parsing can probe for the existence of a file rather then loading all
> events in a directory. When the event is a json event like
> inst_retired.any on Intel, this reduces the number of openat calls on
> a Tigerlake laptop from 325 down to 255.
>

Ian, sorry for the late reply.
On s390 the events in the sysfs tree are all upper case:

[root@a35lp67 ~]# ls -l /sys/devices/cpum_cf/events/ | head -10
total 0
-r--r--r-- 1 root root 4096 Apr 17 14:47 AES_BLOCKED_CYCLES
-r--r--r-- 1 root root 4096 Apr 17 14:47 AES_BLOCKED_FUNCTIONS
-r--r--r-- 1 root root 4096 Apr 17 14:47 AES_CYCLES
-r--r--r-- 1 root root 4096 Apr 17 14:47 AES_FUNCTIONS
-r--r--r-- 1 root root 4096 Apr 17 14:47 BCD_DFP_EXECUTION_SLOTS
-r--r--r-- 1 root root 4096 Apr 17 14:47 CPU_CYCLES
-r--r--r-- 1 root root 4096 Apr 17 14:47 CRSTE_1MB_WRITES
-r--r--r-- 1 root root 4096 Apr 17 14:47 DCW_OFF_DRAWER
-r--r--r-- 1 root root 4096 Apr 17 14:47 DCW_OFF_DRAWER_MEMORY
[root@a35lp67 ~]#

Same is true for all other PMUs (currently 5 and growing).

Is there a branch to pull to try out the effect of your patch on s390?

Thanks Thomas
--
Thomas Richter, Dept 3303, IBM s390 Linux Development, Boeblingen, Germany
--
IBM Deutschland Research & Development GmbH

Vorsitzender des Aufsichtsrats: Wolfgang Wendt

Geschäftsführung: David Faller

Sitz der Gesellschaft: Böblingen / Registergericht: Amtsgericht Stuttgart, HRB 243294