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: Windows password security audit tool. GUI, reports in PDF.
[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <b2de4c92-a883-40b0-92e0-16fac9e386b0@intel.com>
Date: Thu, 3 Jul 2025 09:45:15 -0700
From: Reinette Chatre <reinette.chatre@...el.com>
To: Tony Luck <tony.luck@...el.com>, 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>,
	Chen Yu <yu.c.chen@...el.com>
CC: <x86@...nel.org>, <linux-kernel@...r.kernel.org>,
	<patches@...ts.linux.dev>
Subject: Re: [PATCH v6 00/30] x86,fs/resctrl telemetry monitoring

Hi Tony and Dave,

On 6/26/25 9:49 AM, Tony Luck wrote:
>  --- 14 ---
> Add mon_evt::is_floating_point set by resctrl file system code to limit
> which events architecture code can request be displayed in floating point.
> 
> Simplified the fixed-point to floating point algorithm. Reinette is
> correct that the additional "lshift" and "rshift" operations are not
> required. All that is needed is to multiply the fixed point fractional
> part by 10**decimal_places, add a rounding amount equivalent to a "1"
> in the binary place after those supplied. Finally divide by 2**binary_places
> (with a right shift).
> 
> Explained in commit comment how I chose the number of decimal places to
> use for each binary places value.
> 
> N.B. Dave Martin expressed an opinion that the kernel should not do
> this conversion. Instead it should enumerate the scaling factor for
> each event where hardware reported a fixed point value. This patch
> could be dropped and replaced with one to enumerate scaling factors
> per event if others agree with Dave.

Could resctrl accommodate both usages? For example, it does not
look too invasive to add a second file <mon_evt::name>.raw for the
mon_evt::is_floating_point events that can output something like Dave
suggested in [1]:

.raw file format could be:
	#format:<output that depends on format>
	#fixed-point:<value>/<scaling factor>

Example output:
	fixed-point:0x60000/0x40000

Reinette

[1] https://lore.kernel.org/lkml/aEhMWBemtev%2Ff3yf@e133380.arm.com/


Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ