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]
Message-ID: <aAahh0Mv6m1sIq1k@agluck-desk3>
Date: Mon, 21 Apr 2025 12:50:31 -0700
From: "Luck, Tony" <tony.luck@...el.com>
To: Reinette Chatre <reinette.chatre@...el.com>
Cc: Fenghua Yu <fenghuay@...dia.com>,
	Maciej Wieczor-Retman <maciej.wieczor-retman@...el.com>,
	Peter Newman <peternewman@...gle.com>,
	James Morse <james.morse@....com>, Babu Moger <babu.moger@....com>,
	Drew Fustini <dfustini@...libre.com>,
	Dave Martin <Dave.Martin@....com>,
	Anil Keshavamurthy <anil.s.keshavamurthy@...el.com>,
	linux-kernel@...r.kernel.org, patches@...ts.linux.dev
Subject: Re: [PATCH v3 12/26] fs/resctrl: Add hook for architecture code to
 set monitor event attributes

On Fri, Apr 18, 2025 at 04:11:22PM -0700, Reinette Chatre wrote:
> Hi Tony,
> 
> On 4/7/25 4:40 PM, Tony Luck wrote:
> > Architecture code knows whether an event can be read from any CPU, or
> > from a CPU on a specific domain. It also knows what format to use
> > when printing each event value.
> > 
> > Add a hook to set mon_event.any_cpu and mon_event.type.
> 
> If the architecture modifies the output format then the values exposed
> to user space will look different between architectures. User space will
> need to know how to parse the data. We do not want user space to need to
> know which architecture it is running on to determine how to interact with
> user space so this makes me think that this change needs to be accompanied
> with a change that exposes the event format to user space.

Would it be enough to include this in Documentation? I.e. add specific
entries for "core_energy" to say that it is reported as a floating point
value with unit Joules, and "activity" is reported as a floating point
value with unit of Farads.

Alternatively the filesystem code could convert the fixed point values
to integer values of micro-Joules and micro-Farads. Then the filesystem
code can print with "%llu" just like every other event. Would still need
the Documentation entries to explain the units. This has the limitation
that some future implementation that measures in greater precision would
be forced to round to nearest micro-{Joule,Farad}.

File system code controls the formating options available, so options
for architecture code to break the user interface are limited.

-Tony

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ