lists.openwall.net   lists  /  announce  owl-users  owl-dev  john-users  john-dev  passwdqc-users  yescrypt  popa3d-users  /  oss-security  kernel-hardening  musl  sabotage  tlsify  passwords  /  crypt-dev  xvendor  /  Bugtraq  Full-Disclosure  linux-kernel  linux-netdev  linux-ext4  linux-hardening  linux-cve-announce  PHC 
Open Source and information security mailing list archives
 
Hash Suite for Android: free password hash cracker in your pocket
[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Date: Tue, 23 Apr 2024 08:15:02 -0700
From: Ian Rogers <irogers@...gle.com>
To: Thomas Richter <tmricht@...ux.ibm.com>
Cc: Kan Liang <kan.liang@...ux.intel.com>, Peter Zijlstra <peterz@...radead.org>, 
	Ingo Molnar <mingo@...hat.com>, Arnaldo Carvalho de Melo <acme@...nel.org>, Namhyung Kim <namhyung@...nel.org>, 
	Mark Rutland <mark.rutland@....com>, 
	Alexander Shishkin <alexander.shishkin@...ux.intel.com>, Jiri Olsa <jolsa@...nel.org>, 
	Adrian Hunter <adrian.hunter@...el.com>, Jonathan Corbet <corbet@....net>, 
	Bjorn Helgaas <bhelgaas@...gle.com>, Randy Dunlap <rdunlap@...radead.org>, 
	Jing Zhang <renyu.zj@...ux.alibaba.com>, James Clark <james.clark@....com>, 
	Ravi Bangoria <ravi.bangoria@....com>, linux-kernel@...r.kernel.org, 
	linux-perf-users@...r.kernel.org
Subject: Re: [PATCH v2 0/6] Assume sysfs event names are always lowercase

On Mon, Apr 22, 2024 at 11:53 PM Thomas Richter <tmricht@...ux.ibm.com> wrote:
>
> 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:

Yikes, sigh.. thanks for catching this :-)

> [root@...lp67 ~]# 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@...lp67 ~]#
>
> 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?

Sorry not, I think everything would break anyway. I'll extend what
I've done so that event names can be lowercase or in shouty UPPERCASE.

Thanks,
Ian

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

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ