All of lore.kernel.org
 help / color / mirror / Atom feed
From: Drew Fustini <fustini@kernel.org>
To: sashiko-reviews@lists.linux.dev
Cc: linux-kernel@vger.kernel.org
Subject: Re: [PATCH RFC v6 06/18] fs/resctrl: Let bandwidth resources default to min_bw at reset
Date: Mon, 1 Jun 2026 18:11:52 -0700	[thread overview]
Message-ID: <ah4t2MYICLnpLNNd@x1> (raw)
In-Reply-To: <20260601205517.7AAAC1F00893@smtp.kernel.org>

On Mon, Jun 01, 2026 at 08:55:17PM +0000, sashiko-bot@kernel.org wrote:
> > @@ -405,7 +412,7 @@ static inline u32 resctrl_get_default_ctrl(struct rdt_resource *r)
> >  	case RESCTRL_SCHEMA_BITMAP:
> >  		return BIT_MASK(r->cache.cbm_len) - 1;
> [Severity: High]
> This is a pre-existing issue, but does the use of BIT_MASK cause an incorrect
> default mask to be generated on 32-bit architectures?
> 
> If a system has a maximum cache bitmask length of 32, which is
> architecturally allowed by the Intel CAT specification, BITS_PER_LONG is 32
> on 32-bit systems. The BIT_MASK macro evaluates to 
> (1UL << ((nr) % BITS_PER_LONG)).
> 
> For a cbm_len of 32, 32 % 32 evaluates to 0, which makes BIT_MASK(32) equal
> to 1. Subtracting 1 results in a default cache allocation mask of 0 instead
> of the expected 0xFFFFFFFF. Could this functionally break the cache
> allocation mechanism by starving groups of L3/L2 cache on group creation
> and reset?
> 
> >  	case RESCTRL_SCHEMA_RANGE:
> > -		return r->membw.max_bw;
> > +		return r->membw.default_to_min ? r->membw.min_bw : r->membw.max_bw;

That is irrelevant for this patch as it does not touch RESCTRL_SCHEMA_BITMAP.

Drew

  reply	other threads:[~2026-06-02  1:11 UTC|newest]

Thread overview: 58+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2026-06-01 20:35 [PATCH RFC v6 00/18] riscv: add Ssqosid and CBQRI resctrl support Drew Fustini
2026-06-01 20:35 ` Drew Fustini
2026-06-01 20:35 ` [PATCH RFC v6 01/18] dt-bindings: riscv: Add Ssqosid extension description Drew Fustini
2026-06-01 20:35   ` Drew Fustini
2026-06-01 20:35 ` [PATCH RFC v6 02/18] riscv: detect the Ssqosid extension Drew Fustini
2026-06-01 20:35   ` Drew Fustini
2026-06-01 20:35 ` [PATCH RFC v6 03/18] riscv: add support for srmcfg CSR from " Drew Fustini
2026-06-01 20:35   ` Drew Fustini
2026-06-01 20:49   ` sashiko-bot
2026-06-02  0:58     ` Drew Fustini
2026-06-01 20:35 ` [PATCH RFC v6 04/18] fs/resctrl: Add resctrl_is_membw() helper Drew Fustini
2026-06-01 20:35   ` Drew Fustini
2026-06-01 20:35 ` [PATCH RFC v6 05/18] fs/resctrl: Add RDT_RESOURCE_MB_MIN and RDT_RESOURCE_MB_WGHT Drew Fustini
2026-06-01 20:35   ` Drew Fustini
2026-06-01 20:36 ` [PATCH RFC v6 06/18] fs/resctrl: Let bandwidth resources default to min_bw at reset Drew Fustini
2026-06-01 20:36   ` Drew Fustini
2026-06-01 20:55   ` sashiko-bot
2026-06-02  1:11     ` Drew Fustini [this message]
2026-06-01 20:36 ` [PATCH RFC v6 07/18] riscv_cbqri: Add capacity controller probe and allocation device ops Drew Fustini
2026-06-01 20:36   ` Drew Fustini
2026-06-01 20:48   ` sashiko-bot
2026-06-02  2:17     ` Drew Fustini
2026-06-01 20:36 ` [PATCH RFC v6 08/18] riscv_cbqri: Add capacity controller monitoring " Drew Fustini
2026-06-01 20:36   ` Drew Fustini
2026-06-01 20:51   ` sashiko-bot
2026-06-02  2:20     ` Drew Fustini
2026-06-01 20:36 ` [PATCH RFC v6 09/18] riscv_cbqri: Add bandwidth controller probe and allocation " Drew Fustini
2026-06-01 20:36   ` Drew Fustini
2026-06-01 20:49   ` sashiko-bot
2026-06-02  4:27     ` Drew Fustini
2026-06-01 20:36 ` [PATCH RFC v6 10/18] riscv_cbqri: Add bandwidth controller monitoring " Drew Fustini
2026-06-01 20:36   ` Drew Fustini
2026-06-01 20:36 ` [PATCH RFC v6 11/18] riscv_cbqri: resctrl: Add cache allocation via capacity block mask Drew Fustini
2026-06-01 20:36   ` Drew Fustini
2026-06-01 20:56   ` sashiko-bot
2026-06-02  4:31     ` Drew Fustini
2026-06-01 20:36 ` [PATCH RFC v6 12/18] riscv_cbqri: resctrl: Add L3 cache occupancy monitoring Drew Fustini
2026-06-01 20:36   ` Drew Fustini
2026-06-01 20:58   ` sashiko-bot
2026-06-02  4:47     ` Drew Fustini
2026-06-01 20:36 ` [PATCH RFC v6 13/18] riscv_cbqri: resctrl: Add MB_MIN bandwidth allocation via Rbwb Drew Fustini
2026-06-01 20:36   ` Drew Fustini
2026-06-01 20:57   ` sashiko-bot
2026-06-02  5:00     ` Drew Fustini
2026-06-01 20:36 ` [PATCH RFC v6 14/18] riscv_cbqri: resctrl: Add MB_WGHT bandwidth allocation via Mweight Drew Fustini
2026-06-01 20:36   ` Drew Fustini
2026-06-01 20:57   ` sashiko-bot
2026-06-02 17:35     ` Drew Fustini
2026-06-01 20:36 ` [PATCH RFC v6 15/18] riscv_cbqri: resctrl: Add mbm_total_bytes bandwidth monitoring Drew Fustini
2026-06-01 20:36   ` Drew Fustini
2026-06-01 21:01   ` sashiko-bot
2026-06-02 21:09     ` Drew Fustini
2026-06-01 20:36 ` [PATCH RFC v6 16/18] ACPI: RISC-V: Parse RISC-V Quality of Service Controller (RQSC) table Drew Fustini
2026-06-01 20:36   ` Drew Fustini
2026-06-01 20:36 ` [PATCH RFC v6 17/18] ACPI: RISC-V: Add support for RISC-V Quality of Service Controller (RQSC) Drew Fustini
2026-06-01 20:36   ` Drew Fustini
2026-06-01 20:36 ` [PATCH RFC v6 18/18] riscv: enable resctrl filesystem for Ssqosid Drew Fustini
2026-06-01 20:36   ` Drew Fustini

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=ah4t2MYICLnpLNNd@x1 \
    --to=fustini@kernel.org \
    --cc=linux-kernel@vger.kernel.org \
    --cc=sashiko-reviews@lists.linux.dev \
    /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 an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.