Re: [RFC PATCH 5/7] x86/resctrl: Enhance driver registration to hook into schemata files

From: Reinette Chatre
Date: Fri May 05 2023 - 19:20:14 EST


Hi Tony,

On 4/20/2023 3:06 PM, Tony Luck wrote:
> Add a new configuration type "DRIVER" for lines in the schemata files
> with a show() and update() callback functions to the driver to maintain
> these lines.

If the goal is to have unique APIs for resource, could an alternative
be the have show() and update() callbacks associated with resources in
resctrl self?

...

> @@ -2390,6 +2392,9 @@ static int schemata_list_add(struct rdt_resource *r, enum resctrl_conf_type type
> case CDP_NONE:
> suffix = "";
> break;
> + case DRIVER:
> + kfree(s);
> + return -EINVAL;
> }
>

(This could perhaps be simplified to not allocate the memory in the first place?)

Reinette