mirror of https://lore.kernel.org/lkml/
 help / color / mirror / Atom feed
From: "Ilpo Järvinen" <ilpo.jarvinen@linux.intel.com>
To: Maciej Wieczor-Retman <maciej.wieczor-retman@intel.com>
Cc: Fenghua Yu <fenghua.yu@intel.com>,
	Reinette Chatre <reinette.chatre@intel.com>,
	Thomas Gleixner <tglx@linutronix.de>,
	Ingo Molnar <mingo@redhat.com>, Borislav Petkov <bp@alien8.de>,
	Dave Hansen <dave.hansen@linux.intel.com>,
	x86@kernel.org, "H. Peter Anvin" <hpa@zytor.com>,
	Peter Newman <peternewman@google.com>,
	LKML <linux-kernel@vger.kernel.org>
Subject: Re: [PATCH v3 1/4] x86/resctrl: Rename arch_has_sparse_bitmaps
Date: Fri, 29 Sep 2023 17:36:44 +0300 (EEST)	[thread overview]
Message-ID: <ac2ec634-4666-cfe2-49d5-2cbda5a4412a@linux.intel.com> (raw)
In-Reply-To: <81216b7633a6838ea72ca6d4471be233b980e4f9.1695977733.git.maciej.wieczor-retman@intel.com>

[-- Attachment #1: Type: text/plain, Size: 3630 bytes --]

On Fri, 29 Sep 2023, Maciej Wieczor-Retman wrote:

> A later patch exposes the value of arch_has_sparse_bitmaps to
> user space via the existing term of a bitmask. Rename
> arch_has_sparse_bitmaps to arch_has_sparse_bitmasks to ensure
> consistent terminology throughout resctrl.
> 
> Suggested-by: Reinette Chatre <reinette.chatre@intel.com>
> Reviewed-by: Peter Newman <peternewman@google.com>
> Tested-by: Peter Newman <peternewman@google.com>
> Signed-off-by: Maciej Wieczor-Retman <maciej.wieczor-retman@intel.com>
> ---
> Changelog v3:
> - Add Peter's tested-by and reviewed-by tags.
> - Make this patch first in the series. (Reinette)
> - Change the patch message. (Reinette)
> - Drop rmid_busy_llc comment name change. (Reinette)
> 
> Changelog v2:
> - Create this patch.
> 
>  arch/x86/kernel/cpu/resctrl/core.c        | 4 ++--
>  arch/x86/kernel/cpu/resctrl/ctrlmondata.c | 4 ++--
>  include/linux/resctrl.h                   | 4 ++--
>  3 files changed, 6 insertions(+), 6 deletions(-)
> 
> diff --git a/arch/x86/kernel/cpu/resctrl/core.c b/arch/x86/kernel/cpu/resctrl/core.c
> index 030d3b409768..c09e4fdded3c 100644
> --- a/arch/x86/kernel/cpu/resctrl/core.c
> +++ b/arch/x86/kernel/cpu/resctrl/core.c
> @@ -872,7 +872,7 @@ static __init void rdt_init_res_defs_intel(void)
>  
>  		if (r->rid == RDT_RESOURCE_L3 ||
>  		    r->rid == RDT_RESOURCE_L2) {
> -			r->cache.arch_has_sparse_bitmaps = false;
> +			r->cache.arch_has_sparse_bitmasks = false;
>  			r->cache.arch_has_per_cpu_cfg = false;
>  			r->cache.min_cbm_bits = 1;
>  		} else if (r->rid == RDT_RESOURCE_MBA) {
> @@ -892,7 +892,7 @@ static __init void rdt_init_res_defs_amd(void)
>  
>  		if (r->rid == RDT_RESOURCE_L3 ||
>  		    r->rid == RDT_RESOURCE_L2) {
> -			r->cache.arch_has_sparse_bitmaps = true;
> +			r->cache.arch_has_sparse_bitmasks = true;
>  			r->cache.arch_has_per_cpu_cfg = true;
>  			r->cache.min_cbm_bits = 0;
>  		} else if (r->rid == RDT_RESOURCE_MBA) {
> diff --git a/arch/x86/kernel/cpu/resctrl/ctrlmondata.c b/arch/x86/kernel/cpu/resctrl/ctrlmondata.c
> index b44c487727d4..ab45012288bb 100644
> --- a/arch/x86/kernel/cpu/resctrl/ctrlmondata.c
> +++ b/arch/x86/kernel/cpu/resctrl/ctrlmondata.c
> @@ -113,8 +113,8 @@ static bool cbm_validate(char *buf, u32 *data, struct rdt_resource *r)
>  	first_bit = find_first_bit(&val, cbm_len);
>  	zero_bit = find_next_zero_bit(&val, cbm_len, first_bit);
>  
> -	/* Are non-contiguous bitmaps allowed? */
> -	if (!r->cache.arch_has_sparse_bitmaps &&
> +	/* Are non-contiguous bitmasks allowed? */
> +	if (!r->cache.arch_has_sparse_bitmasks &&
>  	    (find_next_bit(&val, cbm_len, zero_bit) < cbm_len)) {
>  		rdt_last_cmd_printf("The mask %lx has non-consecutive 1-bits\n", val);
>  		return false;
> diff --git a/include/linux/resctrl.h b/include/linux/resctrl.h
> index 8334eeacfec5..66942d7fba7f 100644
> --- a/include/linux/resctrl.h
> +++ b/include/linux/resctrl.h
> @@ -94,7 +94,7 @@ struct rdt_domain {
>   *			zero CBM.
>   * @shareable_bits:	Bitmask of shareable resource with other
>   *			executing entities
> - * @arch_has_sparse_bitmaps:	True if a bitmap like f00f is valid.
> + * @arch_has_sparse_bitmasks:	True if a bitmask like f00f is valid.
>   * @arch_has_per_cpu_cfg:	True if QOS_CFG register for this cache
>   *				level has CPU scope.
>   */
> @@ -102,7 +102,7 @@ struct resctrl_cache {
>  	unsigned int	cbm_len;
>  	unsigned int	min_cbm_bits;
>  	unsigned int	shareable_bits;
> -	bool		arch_has_sparse_bitmaps;
> +	bool		arch_has_sparse_bitmasks;
>  	bool		arch_has_per_cpu_cfg;
>  };
>  
> 

Reviewed-by: Ilpo Järvinen <ilpo.jarvinen@linux.intel.com>


-- 
 i.

  reply	other threads:[~2023-09-29 14:43 UTC|newest]

Thread overview: 11+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2023-09-29  9:00 [PATCH v3 0/4] x86/resctrl: Non-contiguous bitmasks in Intel CAT Maciej Wieczor-Retman
2023-09-29  9:02 ` [PATCH v3 1/4] x86/resctrl: Rename arch_has_sparse_bitmaps Maciej Wieczor-Retman
2023-09-29 14:36   ` Ilpo Järvinen [this message]
2023-09-29  9:02 ` [PATCH v3 2/4] x86/resctrl: Enable non-contiguous CBMs in Intel CAT Maciej Wieczor-Retman
2023-09-29 14:43   ` Ilpo Järvinen
2023-09-29  9:02 ` [PATCH v3 3/4] x86/resctrl: Add sparse_masks file in info Maciej Wieczor-Retman
2023-09-29 14:47   ` Ilpo Järvinen
2023-09-29  9:02 ` [PATCH v3 4/4] Documentation/x86: Document resctrl's new sparse_masks Maciej Wieczor-Retman
2023-09-29 14:56   ` Ilpo Järvinen
2023-09-29 20:30 ` [PATCH v3 0/4] x86/resctrl: Non-contiguous bitmasks in Intel CAT Reinette Chatre
2023-10-02 13:00   ` Maciej Wieczór-Retman

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=ac2ec634-4666-cfe2-49d5-2cbda5a4412a@linux.intel.com \
    --to=ilpo.jarvinen@linux.intel.com \
    --cc=bp@alien8.de \
    --cc=dave.hansen@linux.intel.com \
    --cc=fenghua.yu@intel.com \
    --cc=hpa@zytor.com \
    --cc=linux-kernel@vger.kernel.org \
    --cc=maciej.wieczor-retman@intel.com \
    --cc=mingo@redhat.com \
    --cc=peternewman@google.com \
    --cc=reinette.chatre@intel.com \
    --cc=tglx@linutronix.de \
    --cc=x86@kernel.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox

all inboxes | Powered by JetHome®