Messages in this thread | | | Date | Fri, 12 Apr 2024 17:13:23 +0100 | From | Dave Martin <> | 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
| |