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] [thread-next>] [day] [month] [year] [list]
Message-ID: <5284DD7E.30604@gmail.com>
Date:	Thu, 14 Nov 2013 07:26:06 -0700
From:	David Ahern <dsahern@...il.com>
To:	Ingo Molnar <mingo@...nel.org>,
	Joseph Schuchart <joseph.schuchart@...dresden.de>,
	Peter Zijlstra <a.p.zijlstra@...llo.nl>,
	Fr??d??ric Weisbecker <fweisbec@...il.com>
CC:	Paul Mackerras <paulus@...ba.org>, Ingo Molnar <mingo@...hat.com>,
	Arnaldo Carvalho de Melo <acme@...stprotocols.net>,
	thomas.ilsche@...dresden.de, linux-kernel@...r.kernel.org
Subject: Re: [PATCH] Perf: Correct Assumptions about Sample Timestamps in
 Passes

On 11/14/13, 3:05 AM, Ingo Molnar wrote:

> What am I missing?

I have spent quite a bit of time on this problem on this well. I think 
the flush time needs to be based on the start time of each round, not 
the minimum time observed across mmaps. I have tried the minimum time 
stamp route and it still fails often enough to be annoying.

See builtin-kvm.c, perf_kvm__mmap_read(). The problem is that it takes 
time to move from mmap to mmap and sample can come in behind you - an 
mmap that has already be scanned with a timestamp less than what is 
determined to be the lowest minimum for the samples actually read. 'perf 
kvm stat live' in a nested environment is a stress test for the problem.

I believe reading perf_clock at the start of each round and using that 
as the flush time will fix the problem (to the degree that perf_clock is 
monotonic across all cpus and sockets).

But, right now we have no means of reading the perf_clock timestamp in 
userspace.

David
--
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@...r.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html
Please read the FAQ at  http://www.tux.org/lkml/

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ