lists.openwall.net   lists  /  announce  owl-users  owl-dev  john-users  john-dev  passwdqc-users  yescrypt  popa3d-users  /  oss-security  kernel-hardening  musl  sabotage  tlsify  passwords  /  crypt-dev  xvendor  /  Bugtraq  Full-Disclosure  linux-kernel  linux-netdev  linux-ext4  linux-hardening  linux-cve-announce  PHC 
Open Source and information security mailing list archives
 
Hash Suite: Windows password security audit tool. GUI, reports in PDF.
[<prev] [next>] [<thread-prev] [day] [month] [year] [list]
Date:   Wed, 21 Nov 2018 23:52:39 +0000
From:   "Pathan, Arshiya Hayatkhan" <arshiya.hayatkhan.pathan@...el.com>
To:     "Moger, Babu" <Babu.Moger@....com>,
        "Yu, Fenghua" <fenghua.yu@...el.com>,
        Thomas Gleixner <tglx@...utronix.de>,
        Ingo Molnar <mingo@...hat.com>,
        "H Peter Anvin" <hpa@...or.com>,
        "Luck, Tony" <tony.luck@...el.com>,
        "Peter Zijlstra" <peterz@...radead.org>,
        "Chatre, Reinette" <reinette.chatre@...el.com>,
        James Morse <james.morse@....com>,
        "Shankar, Ravi V" <ravi.v.shankar@...el.com>,
        "Prakhya, Sai Praneeth" <sai.praneeth.prakhya@...el.com>
CC:     linux-kernel <linux-kernel@...r.kernel.org>
Subject: RE: [PATCH v3 4/8] selftests/resctrl: Add callback to start a
 benchmark

> > +static int
> > +measure_vals(struct resctrl_val_param *param, unsigned long
> > +*bw_resc_start) {
> > +	unsigned long bw_imc, bw_resc, bw_resc_end;
> > +	int ret;
> > +
> > +	/*
> > +	 * Measure memory bandwidth from resctrl and from
> > +	 * another source which is perf imc value or could
> > +	 * be something else if perf imc event is not available.
> > +	 * Compare the two values to validate resctrl value.
> > +	 * It takes 1sec to measure the data.
> > +	 */
> > +	bw_imc = get_mem_bw_imc(param->cpu_no, param->bw_report);
> > +	if (bw_imc < 0)
> 
> I think this condition should be "<=". If the value is zero, it should exit.

Yes, it should be changed. Will fix it in next version.

> 
> > +		return bw_imc;
> > +
> > +	bw_resc_end = get_mem_bw_resctrl();
> > +	if (bw_resc_end < 0)
> 
> I am not very sure about this. Please check if it should be "<=" 0.

This one should also be changed. Will fix it too.

> 
> > +		return bw_resc_end;
> > +
> > +	bw_resc = (bw_resc_end - *bw_resc_start) / MB;
> > +	ret = print_results_bw(param->filename, bm_pid, bw_imc, bw_resc);
> > +	if (ret)
> > +		return ret;
> > +
> > +	*bw_resc_start = bw_resc_end;
> > +
> > +	return 0;
> > +}

Thanks and Regards,
Arshiya

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ