From: Ben Horgan <ben.horgan@arm.com>
To: "Luck, Tony" <tony.luck@intel.com>
Cc: "Chatre, Reinette" <reinette.chatre@intel.com>,
"x86@kernel.org" <x86@kernel.org>,
"Dave.Martin@arm.com" <Dave.Martin@arm.com>,
"james.morse@arm.com" <james.morse@arm.com>,
"babu.moger@amd.com" <babu.moger@amd.com>,
"fenghuay@nvidia.com" <fenghuay@nvidia.com>,
"bp@alien8.de" <bp@alien8.de>,
"linux-kernel@vger.kernel.org" <linux-kernel@vger.kernel.org>
Subject: Re: [PATCH v1] fs/resctrl: Allocate rmid_ptrs[] using kvzalloc_objs()
Date: Mon, 13 Jul 2026 10:16:58 +0100 [thread overview]
Message-ID: <7104a4a5-5401-447b-9c98-c920a29a5f02@arm.com> (raw)
In-Reply-To: <SJ1PR11MB60834F8C505B20C7C985C7E2FCFD2@SJ1PR11MB6083.namprd11.prod.outlook.com>
Hi Tony,
On 7/10/26 16:42, Luck, Tony wrote:
>> On an MPAM system the number of entries in rmid_ptrs[] is the number of PARTIDs
>> multiplied by the number of PMGs. The maximum possible number of PARTIDs is
>> 0x10000 and the maximum number of PMGs is 0x100. On a system pushing the limits
>> of the MPAM specification this can be large enough to consistently fail the
>> kzalloc_objs() allocation and hence fail to mount the resctrl filesystem.
>
> Wow!. 16 million RMIDs * 32 byte per structure = 512MB
>
> I generally don't sweat "big" allocations on servers that have hundreds of Gbytes
> of memory. But that seems like a lot. Probably 99.99% of it never used (unless
> users regularly use resctrl to create tens of thousands of mon_data directories).
>
> Your fix is fine. So
>
> Reviewed-by: Tony Luck <tony.luck@intel.com>
Thanks!
>
> But maybe at some point resctrl needs some sparse, or on-demand, allocator for
> RMIDs? Or is this a theoretical issue and nobody is likely to build a system that
> implements that many PARTIDs and/or PMGs?
It's a theoretical issue; I don't think anyone will build anything even close to the maximum of 'PMG
x PARTID'. Until the latest version, systems using CHI were limited to 1 bit of PMG. I was just
checking some of the extremes of the MPAM driver with a software model.
Ben
>
> -Tony
next prev parent reply other threads:[~2026-07-13 9:17 UTC|newest]
Thread overview: 4+ messages / expand[flat|nested] mbox.gz Atom feed top
2026-07-10 11:23 [PATCH v1] fs/resctrl: Allocate rmid_ptrs[] using kvzalloc_objs() Ben Horgan
2026-07-10 15:42 ` Luck, Tony
2026-07-13 9:16 ` Ben Horgan [this message]
2026-08-20 23:25 ` 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=7104a4a5-5401-447b-9c98-c920a29a5f02@arm.com \
--to=ben.horgan@arm.com \
--cc=Dave.Martin@arm.com \
--cc=babu.moger@amd.com \
--cc=bp@alien8.de \
--cc=fenghuay@nvidia.com \
--cc=james.morse@arm.com \
--cc=linux-kernel@vger.kernel.org \
--cc=reinette.chatre@intel.com \
--cc=tony.luck@intel.com \
--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 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.