Messages in this thread | | | From | "Luck, Tony" <> | Subject | RE: [RFC PATCH 0/7] Add driver registration i/f to resctrl | Date | Thu, 11 May 2023 20:35:21 +0000 |
| |
Reinette,
You asked for examples of resources that don't fit well into the existing schemata model.
Here's the details behind one of those cases.
Existing resources have a single value per domain (e.g. a cache-way bitmask, or a memory bandwidth percentage or target). One of my new resources has several parameters. At first glance this might be solved by just listing a comma separated list of these parameters for each domain. So the schemata entry for feature XYZ that has two domains might look like this:
XYZ:0=param1,param2,param3;1=param1,param2,param3
But this feature has a second problem. The hardware supports a very limited set of variations. This could be handled by reporting num_closid for this resource to that low number. But then resctrl core code would limit all resources to that value. Instead the h/w allows programming a mapping feature from closid numbers to resource instances (as the saying goes "any computer science problem can be solved with one extra level of indirection").
So if the driver named these instances: A, B, C, D. Then a schemata file might look like:
XYZ:0=B;1=C
meaning that the driver will set up so CLOSID for this resctrl resource is mapped to instance "B" on domain 0 and to instance "C" on domain 1.
The driver provides a way to set param1, param2, param3 for each of the A, B, C, D instances.
-Tony
| |