RE: [PATCH v3 3/8] selftests/resctrl: Read memory bandwidth from perf IMC counter and from resctrl file system
From: Pathan, Arshiya Hayatkhan
Date: Wed Nov 21 2018 - 18:48:33 EST
> > +static int initialize_mem_bw_imc(void)
> > +{
> > + int imc, j;
> > +
> > + imcs = num_of_imcs();
> > + if (imcs < 0)
>
> I think this condition should be "<=". Pls check.
Thank you for pointing it out. It makes sense to change it to "<=". Will fix it in next version.
> > + return imcs;
> > +
> > + /* Initialize perf_event_attr structures for all iMC's */
> > + for (imc = 0; imc < imcs; imc++) {
> > + for (j = 0; j < 2; j++)
> > + membw_initialize_perf_event_attr(imc, j);
> > + }
> > +
> > + return 0;
> > +}
Thanks and Regards,
Arshiya