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]
Date: Fri, 2 Feb 2024 06:45:10 +0000
From: "Zhang, Rui" <rui.zhang@...el.com>
To: "tglx@...utronix.de" <tglx@...utronix.de>, "linux-kernel@...r.kernel.org"
	<linux-kernel@...r.kernel.org>
CC: "mhklinux@...look.com" <mhklinux@...look.com>, "jgross@...e.com"
	<jgross@...e.com>, "x86@...nel.org" <x86@...nel.org>, "arjan@...ux.intel.com"
	<arjan@...ux.intel.com>, "kprateek.nayak@....com" <kprateek.nayak@....com>,
	"Tang, Feng" <feng.tang@...el.com>, "kan.liang@...ux.intel.com"
	<kan.liang@...ux.intel.com>, "thomas.lendacky@....com"
	<thomas.lendacky@....com>, "ray.huang@....com" <ray.huang@....com>, "Mehta,
 Sohil" <sohil.mehta@...el.com>, "Sivanich, Dimitri"
	<dimitri.sivanich@....com>, "paulmck@...nel.org" <paulmck@...nel.org>,
	"andrew.cooper3@...rix.com" <andrew.cooper3@...rix.com>, "andy@...radead.org"
	<andy@...radead.org>, "peterz@...radead.org" <peterz@...radead.org>
Subject: Re: [patch v2 25/30] x86/cpu/topology: Use topology logical mapping
 mechanism

Hi, Thomas,

> @@ -147,6 +148,9 @@ static void topo_set_ids(struct topo_sca
>         c->topo.pkg_id = topo_shift_apicid(apicid, TOPO_PKG_DOMAIN);
>         c->topo.die_id = topo_shift_apicid(apicid, TOPO_DIE_DOMAIN);
>  
> +       c->topo.logical_pkg_id = topology_get_logical_id(apicid,
> TOPO_PKG_DOMAIN);
> +       c->topo.logical_die_id = topology_get_logical_id(apicid,
> TOPO_DIE_DOMAIN);
> +

Just wondering if we could have logical_core_id.

drivers/hwmon/coretemp.c uses an array to save per core temperature
information. We cannot use core_id as array index because it can be
sparse. Currently, to get the temperature info for a specified core,
we need to traverse the array to know which core each entry maps to.

Ideally, we could have a global logical_core_id, and use that as the
array index directly.
This can also simplify kernel code in many places when checking if two
cpus are in the same core or not.

For now, I don't see a need to expose this info to userspace.

thanks,
rui

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ