[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <SJ1PR11MB6083946F00E5DA47754AC7D9FC98A@SJ1PR11MB6083.namprd11.prod.outlook.com>
Date: Fri, 23 May 2025 15:57:12 +0000
From: "Luck, Tony" <tony.luck@...el.com>
To: Peter Newman <peternewman@...gle.com>
CC: Fenghua Yu <fenghuay@...dia.com>, "Chatre, Reinette"
<reinette.chatre@...el.com>, "Wieczor-Retman, Maciej"
<maciej.wieczor-retman@...el.com>, James Morse <james.morse@....com>, "Babu
Moger" <babu.moger@....com>, Drew Fustini <dfustini@...libre.com>, "Dave
Martin" <Dave.Martin@....com>, "Keshavamurthy, Anil S"
<anil.s.keshavamurthy@...el.com>, "Chen, Yu C" <yu.c.chen@...el.com>,
"x86@...nel.org" <x86@...nel.org>, "linux-kernel@...r.kernel.org"
<linux-kernel@...r.kernel.org>, "patches@...ts.linux.dev"
<patches@...ts.linux.dev>
Subject: RE: [PATCH v5 04/29] x86,fs/resctrl: Prepare for more monitor events
> > static int arch_domain_mbm_alloc(u32 num_rmid, struct rdt_hw_mon_domain *hw_dom)
> > {
> > - size_t tsize;
> > -
> > - if (resctrl_is_mon_event_enabled(QOS_L3_MBM_TOTAL_EVENT_ID)) {
> > - tsize = sizeof(*hw_dom->arch_mbm_total);
> > - hw_dom->arch_mbm_total = kcalloc(num_rmid, tsize, GFP_KERNEL);
> > - if (!hw_dom->arch_mbm_total)
> > - return -ENOMEM;
> > - }
> > - if (resctrl_is_mon_event_enabled(QOS_L3_MBM_LOCAL_EVENT_ID)) {
> > - tsize = sizeof(*hw_dom->arch_mbm_local);
> > - hw_dom->arch_mbm_local = kcalloc(num_rmid, tsize, GFP_KERNEL);
> > - if (!hw_dom->arch_mbm_local) {
> > - kfree(hw_dom->arch_mbm_total);
> > - hw_dom->arch_mbm_total = NULL;
> > - return -ENOMEM;
> > - }
> > + size_t tsize = sizeof(struct arch_mbm_state);
>
> sizeof(*hw_dom->arch_mbm_states[0])?
>
> The previous code didn't assume a type.
>
> > static int domain_setup_mon_state(struct rdt_resource *r, struct rdt_mon_domain *d)
> > {
> > u32 idx_limit = resctrl_arch_system_num_rmid_idx();
> > - size_t tsize;
> > + size_t tsize = sizeof(struct mbm_state);
>
> Here too.
Peter,
Thanks for looking. I will fix both places for next version.
-Tony
Powered by blists - more mailing lists