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, 27 Oct 2023 14:42:18 +0200
From:   Maciej Wieczór-Retman 
        <maciej.wieczor-retman@...el.com>
To:     Ilpo Järvinen <ilpo.jarvinen@...ux.intel.com>
CC:     <linux-kselftest@...r.kernel.org>,
        Reinette Chatre <reinette.chatre@...el.com>,
        Shuah Khan <shuah@...nel.org>,
        Shaopeng Tan <tan.shaopeng@...fujitsu.com>,
        Fenghua Yu <fenghua.yu@...el.com>,
        <linux-kernel@...r.kernel.org>
Subject: Re: [PATCH 21/24] selftests/resctrl: Get resource id from cache id

On 2023-10-24 at 12:26:31 +0300, Ilpo Järvinen wrote:
>Resource id is acquired differently depending on CPU. AMD tests use id
>from L3 cache, whereas CPUs from other vendors base the id on topology
>package id. In order to support L2 CAT test, this has to be
>generalized.
>
>The driver side code seems to get the resource ids from cache ids so
>the approach used by the AMD branch seems to match the kernel-side
>code. It will also work with L2 resource IDs as long as the cache level
>is generalized.
>
>Using the topology id was always fragile due to mismatch with the
>kernel-side way to acquire the resource id. It got incorrect resource
>id, e.g., when Cluster-on-Die (CoD) is enabled for CPU (but CoD is not
>well suited for resctrl in the first place so it has not been a big
>issues if test don't work correctly with it).

"not been a big issues" -> "not been a big issue"?

"if test don't work correctly" -> "if test doesn't work correctly" / "if tests
don't work correctly"?

>
>Taking all the above into account, generalize the resource id
>calculation by taking it from the cache id and do not hard-code the
>cache level.

In x86/resctrl files group of CPUs sharing a resctrl resource is called a
domain. Because of that I think "resource id" terms should be substituted with
"domain id" to match core resctrl code.

>
>Signed-off-by: Ilpo Järvinen <ilpo.jarvinen@...ux.intel.com>
>---
> tools/testing/selftests/resctrl/resctrl.h     |  2 +-
> tools/testing/selftests/resctrl/resctrl_val.c |  4 +--
> tools/testing/selftests/resctrl/resctrlfs.c   | 31 ++++++++++++-------
> 3 files changed, 23 insertions(+), 14 deletions(-)
>

-- 
Kind regards
Maciej Wieczór-Retman

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ