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]
Date:	Fri, 3 Apr 2009 08:23:45 +1100
From:	Paul Mackerras <paulus@...ba.org>
To:	Ingo Molnar <mingo@...e.hu>
Cc:	Peter Zijlstra <a.p.zijlstra@...llo.nl>,
	Corey Ashford <cjashfor@...ux.vnet.ibm.com>,
	linux-kernel@...r.kernel.org
Subject: Re: [PATCH 2/6] RFC perf_counter: singleshot support

Ingo Molnar writes:

> Sure. One sidenote - the precision of sw clocks has dropped a bit 
> lately:
> 
> aldebaran:~/linux/linux/Documentation/perf_counter> ./perfstat -e 
> 1:0 -e 1:0 -e 1:0 -e 1:0 -e 1:0 sleep 1
> 
>  Performance counter stats for 'sleep':
> 
>        0.762664  cpu clock ticks      (msecs)
>        0.761440  cpu clock ticks      (msecs)
>        0.760977  cpu clock ticks      (msecs)
>        0.760587  cpu clock ticks      (msecs)
>        0.760287  cpu clock ticks      (msecs)
> 
>  Wall-clock time elapsed:  1003.139373 msecs
> 
> See that slight but noticeable skew? This used to work fine and we 
> had the exact same value everywhere. Can we fix that while still 
> keeping the code nice?

I suggest basing the software clock on counter->ctx->time_now, and
make get_context_time use cpu_clock() always.  That way we will only
call cpu_clock() once even if we have multiple cpu clock counters, and
that will eliminate the skew as well as being more efficient.

Paul.
--
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