[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <Zhldo59cSmSLwFGZ@e133380.arm.com>
Date: Fri, 12 Apr 2024 17:13:23 +0100
From: Dave Martin <Dave.Martin@....com>
To: David Hildenbrand <david@...hat.com>
Cc: James Morse <james.morse@....com>, x86@...nel.org,
linux-kernel@...r.kernel.org, Fenghua Yu <fenghua.yu@...el.com>,
Reinette Chatre <reinette.chatre@...el.com>,
Thomas Gleixner <tglx@...utronix.de>,
Ingo Molnar <mingo@...hat.com>, Borislav Petkov <bp@...en8.de>,
H Peter Anvin <hpa@...or.com>, Babu Moger <Babu.Moger@....com>,
shameerali.kolothum.thodi@...wei.com,
D Scott Phillips OS <scott@...amperecomputing.com>,
carl@...amperecomputing.com, lcherian@...vell.com,
bobo.shaobowang@...wei.com, tan.shaopeng@...itsu.com,
baolin.wang@...ux.alibaba.com, Jamie Iles <quic_jiles@...cinc.com>,
Xin Hao <xhao@...ux.alibaba.com>, peternewman@...gle.com,
dfustini@...libre.com, amitsinght@...vell.com,
Rex Nie <rex.nie@...uarmicro.com>
Subject: Re: [PATCH v1 03/31] x86/resctrl: Move ctrlval string parsing policy
away from the arch code
Hi,
On Tue, Apr 09, 2024 at 05:13:01PM +0200, David Hildenbrand wrote:
[...]
> > @@ -195,6 +204,14 @@ int parse_cbm(struct rdt_parse_data *data, struct resctrl_schema *s,
> > return 0;
> > }
> > +static ctrlval_parser_t *get_parser(struct rdt_resource *res)
> > +{
> > + if (res->fflags & RFTYPE_RES_CACHE)
> > + return &parse_cbm;
> > + else
> > + return &parse_bw;
> > +}
>
> Besides what Reinette said, I'd have added here something that would fire in
> case someone adds something unexpected in the future, like
>
> WARN_ON_ONCE(!(res->fflags & (RFTYPE_RES_CACHE|RFTYPE_RES_MB));
>
> At the beginning of the function.
>
>
> Apart from that, nothing jumped at me.
>
> --
> Cheers,
>
> David / dhildenb
>
Thanks for that -- I guess that would benefit from discussion; please
see my reply to Reinette on this patch.
Cheers
---Dave
Powered by blists - more mailing lists