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:	Wed, 6 May 2015 19:52:19 -0700
From:	Andy Lutomirski <luto@...capital.net>
To:	Ingo Molnar <mingo2.kernel.org@...il.com>
Cc:	Borislav Petkov <bp@...en8.de>, Fenghua Yu <fenghua.yu@...el.com>,
	Dave Hansen <dave.hansen@...ux.intel.com>,
	Thomas Gleixner <tglx@...utronix.de>,
	Linus Torvalds <torvalds@...ux-foundation.org>,
	Oleg Nesterov <oleg@...hat.com>,
	"linux-kernel@...r.kernel.org" <linux-kernel@...r.kernel.org>,
	"H. Peter Anvin" <hpa@...or.com>
Subject: Re: [PATCH 207/208] x86/fpu: Add FPU performance measurement subsystem

On May 6, 2015 10:22 AM, "Ingo Molnar" <mingo2.kernel.org@...il.com> wrote:
>
>
> * Andy Lutomirski <luto@...capital.net> wrote:
>
> > On May 5, 2015 11:30 PM, "Ingo Molnar" <mingo@...nel.org> wrote:
> > >
> > > Add a short FPU performance suite that runs once during bootup.
> > >
> > > It can be enabled via CONFIG_X86_DEBUG_FPU_PERFORMANCE=y.
> >
> > Neat!
> >
> > Can you change "cycles" to "TSC ticks"?  They're not quite the same thing.
>
> Yeah, with constant TSC we have the magic TSC frequency that is used
> by RDTSC.
>
> I'm torn: 'TSC ticks' will mean very little to most people reading
> that output. We could convert it to nsecs with a little bit of
> calibration - but that makes it depend on small differences in CPU
> model frequencies, while the (cached) cycle costs are typically
> constant per microarchitecture.

Isn't it dependent on the ratio of max turbo frequency to TSC freq?
Typical non-ultra-mobile systems should be at or near max turbo
frequency during bootup.

>
> I suspect we could snatch a performance counter temporarily, to get
> the real cycles count, and maybe even add a uops column. Most of this
> needs to run in kernel space, so it's not a tooling project.

This will suck under KVM without extra care.  I know, because I'm
working on a similar userspace tool that uses RDPMC.

Another option would be rdmsr(MSR_IA32_APERF), but that isn't
available under KVM either.

>
> I also wanted to add cache-cold numbers which are very interesting as
> well, just awfully hard to measure in a stable fashion. For cache-cold
> numbers the natural unit would be memory bus cycles.

Yeah, maybe it's worth wiring up perf counters at some point.

--Andy
--
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