Hi Peter,
On 7/26/2024 6:22 PM, Peter Newman wrote:
Hi Babu,
On Wed, Jul 3, 2024 at 2:50 PM Babu Moger <babu.moger@xxxxxxx> wrote:
@@ -3894,6 +3956,17 @@ static int rdtgroup_mkdir_ctrl_mon(struct kernfs_node *parent_kn,
if (ret)
goto out_closid_free;
+ /*
+ * Assign the counters if ABMC is already enabled.
+ * With the limited number of counters, there can be cases
+ * only on assignment succeed. It is not required to fail
+ * here in that case. Users have the option to assign the
+ * counter later.
+ */
+
+ if (rdtgroup_assign_cntrs(rdtgrp) < 0)
+ rdt_last_cmd_puts("Monitor assignment failed\n");
Supposing rdtgroup_init_alloc() below fails, would you want to release
the counters allocated here?
Yes. Sure. Fix it in v6.
+
kernfs_activate(rdtgrp->kn);
ret = rdtgroup_init_alloc(rdtgrp);
-Peter
--
- Babu Moger