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:	Tue, 3 May 2016 17:00:55 -0700 (PDT)
From:	Vikas Shivappa <vikas.shivappa@...el.com>
To:	Peter Zijlstra <peterz@...radead.org>
cc:	Vikas Shivappa <vikas.shivappa@...el.com>,
	Vikas Shivappa <vikas.shivappa@...ux.intel.com>,
	tony.luck@...el.com, ravi.v.shankar@...el.com,
	fenghua.yu@...el.com, x86@...nel.org, linux-kernel@...r.kernel.org,
	hpa@...or.com, tglx@...utronix.de, mingo@...nel.org,
	h.peter.anvin@...el.com
Subject: Re: [PATCH 2/4] perf/x86/mbm: Store bytes counted for mbm during
 recycle



On Tue, 3 May 2016, Peter Zijlstra wrote:

> On Mon, Apr 25, 2016 at 02:12:09PM -0700, Vikas Shivappa wrote:
>
>
>>> start:
>>>      prev_count = read_hw_counter();
>>
>> I am assuming this means we keep the prev_count when event is initialized.
>> This is done in the mbm_init which calls update_sample with first parameter
>> set to true..
>
> No, when pmu::start() is called.
>
>>> read:
>>>      do {
>>>              prev = prev_count;
>>>              cur_val = read_hw_counter();
>>>              delta = cur_val - prev;
>>>      } while (local_cmpxchg(&prev_count, prev, cur_val) != prev);
>>>      count += delta;
>
> And this you do on pmu::{stop,read}()

Ok. We have same function for del and stop in cqm. Also we do count for cqm..
So we end up reading the 
counter every sched_out. We avoided this to not have the overhead. Also we have 
the overflow of mbm counters on top of this.

But I see how this can be done using the update_sample as the wrapper.

start:
   prev = update_sample(rmid) // reads the counter and takes care of overflow.

Basically replace the hw_counter call with the update_sample and also do the 
part thats done in the read in the overflow timer as well..

Will send an update.

Thanks,
Vikas

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ