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: <20150107150136.GC2199@e104818-lin.cambridge.arm.com>
Date:	Wed, 7 Jan 2015 15:01:36 +0000
From:	Catalin Marinas <catalin.marinas@....com>
To:	Linus Torvalds <torvalds@...ux-foundation.org>
Cc:	One Thousand Gnomes <gnomes@...rguk.ukuu.org.uk>,
	Russell King - ARM Linux <linux@....linux.org.uk>,
	"nicolas.pitre@...aro.org" <nicolas.pitre@...aro.org>,
	Pavel Machek <pavel@....cz>,
	Marc Zyngier <Marc.Zyngier@....com>,
	kernel list <linux-kernel@...r.kernel.org>
Subject: Re: [PATCH] Revert 9fc2105aeaaf56b0cf75296a84702d0f9e64437b to fix
 pyaudio (and probably more)

On Wed, Jan 07, 2015 at 01:20:06AM +0000, Linus Torvalds wrote:
> On Tue, Jan 6, 2015 at 3:42 PM, Catalin Marinas <catalin.marinas@....com> wrote:
> >>
> >> That's what bogomips *is*, for chrissake! It's a bogus measure of how
> >> many times you go through the delay loop.
> >
> > I think that's where the misunderstanding is. We don't have any idea
> > how many times we go through the delay loop. We just go through the
> > delay loop until the counter (driven by an independent frequency)
> > changes X times.
> 
> .. and that's exactly what we do on x86 too with the TSC. It's fine.

I may be mistaken but isn't TSC somehow related to the CPU frequency on
x86?

On ARM, the generic/architected timer is not. It's just a timer+counter
(used as clocksource and event generator in Linux) clocked at a
frequency completely independent from the CPU frequency, *no* relation
between the two.

I think a better comparison would be to HPET rather than TSC. But on x86
we use HPET to calibrate the TSC and use the TSC for the delay loop. If
on x86 the BogoMIPS was changed to report the HPET frequency, would you
be ok with it?

> > With the current arm timer-based (and arm64) implementation, the
> > reported BogoMIPS has nothing to do with the CPU benchmark. It just
> > tells you that a X MHz counter needs X*1000000/HZ ticks per jiffy.
> 
> Yes. And that's a valid bogomips. We've done that for ages on x86.

See above, my understanding of TSC is that the x86 BogoMIPS is at least
in some way closely related to the CPU frequency. That's more like a
perf counter on ARM counting the CPU cycles but we don't use it for
udelay() (as it may or may not be enabled in a production system).

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