[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <CALPaoCi2dKoqGEPO6JDLG-4ce8y=uAg-9znQfNo6xg_0k=TknA@mail.gmail.com>
Date: Fri, 26 Jul 2024 16:22:43 -0700
From: Peter Newman <peternewman@...gle.com>
To: Babu Moger <babu.moger@....com>
Cc: corbet@....net, fenghua.yu@...el.com, reinette.chatre@...el.com,
tglx@...utronix.de, mingo@...hat.com, bp@...en8.de,
dave.hansen@...ux.intel.com, x86@...nel.org, hpa@...or.com,
paulmck@...nel.org, rdunlap@...radead.org, tj@...nel.org,
peterz@...radead.org, yanjiewtw@...il.com, kim.phillips@....com,
lukas.bulwahn@...il.com, seanjc@...gle.com, jmattson@...gle.com,
leitao@...ian.org, jpoimboe@...nel.org, rick.p.edgecombe@...el.com,
kirill.shutemov@...ux.intel.com, jithu.joseph@...el.com, kai.huang@...el.com,
kan.liang@...ux.intel.com, daniel.sneddon@...ux.intel.com,
pbonzini@...hat.com, sandipan.das@....com, ilpo.jarvinen@...ux.intel.com,
maciej.wieczor-retman@...el.com, linux-doc@...r.kernel.org,
linux-kernel@...r.kernel.org, eranian@...gle.com, james.morse@....com
Subject: Re: [PATCH v5 15/20] x86/resctrl: Assign/unassign counters by default
when ABMC is enabled
Hi Babu,
On Wed, Jul 3, 2024 at 2:50 PM Babu Moger <babu.moger@....com> 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?
> +
> kernfs_activate(rdtgrp->kn);
>
> ret = rdtgroup_init_alloc(rdtgrp);
-Peter
Powered by blists - more mailing lists