Re: [RFC PATCH 00/36] arm_mpam: Add basic mpam driver
From: James Morse <james.morse@arm.com>
Date: 2025-08-08 07:24:00
Also in:
lkml
Hi Jonathan, On 01/08/2025 17:09, Jonathan Cameron wrote:
On Fri, 11 Jul 2025 18:36:12 +0000 James Morse [off-list ref] wrote:quoted
This is just enough MPAM driver for the ACPI and DT pre-requisites. It doesn't contain any of the resctrl code, meaning you can't actually drive it from user-space yet.
[..]
Whilst I get that this is minimal, I was a bit surprised that it doesn't contain enough to have the driver actually bind to the platform devices I think that needs the CPU hotplug handler to register a requester. So about another 4 arch patches from your tree. Maybe you can shuffle things around to help with that.
Ah, I hadn't spotted that. The register-requestor code should only serve to reduce the available PARTID - just in case the CPUs support less than the cache hierarchy. It's likely its the 'system_supports_mpam()' that prevents the driver being registered. I'll move that into the arm64 patches - its needed so any id register overrides in the CPU knock out the driver too.
That makes this a pain to test in isolation. Given desire to poke the corners, I'm rebasing the old QEMU emulation and will poke it some more. Now we are getting close to upstream kernel support maybe I'll even clean that up for potential upstream QEMU. For bonus points I 'could' hook it up to the cache simulator and actually generate real 'counts' but that's probably more for fun than because it's useful. Fake numbers are a lot cheaper to get.
I've not found a good source of fake numbers to use. Ideally it would just increment whenever the task was scheduled - but I've found that hard to hack that up in linux. I fall back to reading the counters instead of the MPAM registers ... but its hard to test for overflow or double counting with that. Thanks, James