[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <wlemodlvfokzfdswamwmdqeg5av7ylrj2w6i6orif6vf6jd7hc@zqmdopz64keb>
Date: Fri, 27 Oct 2023 13:39:31 +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 03/24] selftests/resctrl: Refactor get_cbm_mask()
On 2023-10-24 at 12:26:13 +0300, Ilpo Järvinen wrote:
>Callers of get_cbm_mask() are required to pass a string into which the
>CBM bit mask is read. Neither CAT nor CMT tests need the mask as string
"CBM bit mask" -> "CBM" / "capacity bitmask (CBM)"?
Generally isn't cbm_mask an odd name because of the repetition (capacity bitmask
mask)? After looking at x86/resctrl files putting "mask" after "cbm" only
happens there. Maybe a better naming scheme here would be get_cbm_bits()?
>but just convert it into an unsigned long value.
>
>The bit mask reader can only read .../cbm_mask files.
>
>Generalize the bit mask reading function into get_bit_mask() such that
>it can be used to handle other files besides the .../cbm_mask and
>handle the unsigned long conversion within get_bit_mask() using
>fscanf(). Alter get_cbm_mask() to construct the filename for
>get_bit_mask().
>
>Also mark cache_type const while at it.
>
>Co-developed-by: Fenghua Yu <fenghua.yu@...el.com>
>Signed-off-by: Fenghua Yu <fenghua.yu@...el.com>
>Signed-off-by: Ilpo Järvinen <ilpo.jarvinen@...ux.intel.com>
>---
--
Kind regards
Maciej Wieczór-Retman
Powered by blists - more mailing lists