From: "Luck, Tony" <tony.luck@intel.com>
To: Dave Martin <Dave.Martin@arm.com>
Cc: Christophe JAILLET <christophe.jaillet@wanadoo.fr>,
Reinette Chatre <reinette.chatre@intel.com>,
James Morse <james.morse@arm.com>,
Babu Moger <babu.moger@amd.com>, <linux-kernel@vger.kernel.org>,
<kernel-janitors@vger.kernel.org>
Subject: Re: [PATCH] fs/resctrl: Slightly optimize cbm_validate()
Date: Mon, 3 Nov 2025 10:17:16 -0800 [thread overview]
Message-ID: <aQjxrCa8t0TDc_pM@agluck-desk3> (raw)
In-Reply-To: <aP9a9ZtigAWCWSWk@e133380.arm.com>
On Mon, Oct 27, 2025 at 11:43:49AM +0000, Dave Martin wrote:
> Hi,
>
> [Tony, I have a side question on min_cbm_bits -- see below.]
> [...]
>
> <aside>
>
> Also, not directly related to this patch, but, looking at the final if
> statement:
>
> if ((zero_bit - first_bit) < r->cache.min_cbm_bits) {
> rdt_last_cmd_printf("Need at least %d bits in the mask\n",
> r->cache.min_cbm_bits);
> return false;
> }
>
> If min_cbm_bits is two or greater, this can fail if the bitmap has
> enough contiguous set bits but not in the first block of set bits,
> and it can succeed if there are blocks of set bits beyond the first
> block, that have fewer than min_cbm_bits.
>
> Is that intended? Do we ever expect arch_has_sparse_bitmasks alongside
> min_cbm_bits > 1, or should these be mutually exclusive?
>
> </aside>
There's no enumeration for the minimium number of bits in a CBM mask.
Haswell (first to implemenent L3 cache allocation) got a quirk to
to set it to "2". I don't expect that we'd do that again.
So safe to assume that resctrl doesn't have to handle the combination
of min_cbm_bits > 1 with arch_has_sparse_bitmasks.
-Tony
next prev parent reply other threads:[~2025-11-03 18:17 UTC|newest]
Thread overview: 7+ messages / expand[flat|nested] mbox.gz Atom feed top
2025-10-26 7:39 Christophe JAILLET
2025-10-27 11:43 ` Dave Martin
2025-11-01 13:40 ` Christophe JAILLET
2025-11-03 16:24 ` Dave Martin
2025-11-03 18:17 ` Luck, Tony [this message]
2025-11-05 14:51 ` Dave Martin
2025-11-03 22:13 ` Reinette Chatre
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=aQjxrCa8t0TDc_pM@agluck-desk3 \
--to=tony.luck@intel.com \
--cc=Dave.Martin@arm.com \
--cc=babu.moger@amd.com \
--cc=christophe.jaillet@wanadoo.fr \
--cc=james.morse@arm.com \
--cc=kernel-janitors@vger.kernel.org \
--cc=linux-kernel@vger.kernel.org \
--cc=reinette.chatre@intel.com \
/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®