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: <20081118160542.GC8088@elte.hu>
Date:	Tue, 18 Nov 2008 17:05:42 +0100
From:	Ingo Molnar <mingo@...e.hu>
To:	Joe Korty <joe.korty@...r.com>
Cc:	Venki Pallipadi <venkatesh.pallipadi@...el.com>,
	H Peter Anvin <hpa@...or.com>,
	Thomas Gleixner <tglx@...utronix.de>,
	linux-kernel <linux-kernel@...r.kernel.org>
Subject: Re: [PATCH] x86: Support always running TSC on Intel CPUs


* Joe Korty <joe.korty@...r.com> wrote:

> On Tue, Nov 18, 2008 at 09:09:52AM +0100, Ingo Molnar wrote:
> > 
> > * Venki Pallipadi <venkatesh.pallipadi@...el.com> wrote:
> > 
> > > +	if (c->x86_power & (1 << 8)) {
> > >  		set_cpu_cap(c, X86_FEATURE_CONSTANT_TSC);
> > > +		set_cpu_cap(c, X86_FEATURE_NOSTOP_TSC);
> > > +	}
> > 
> > hm, the naming is a bit confusing. We now have 3 variants:
> > 
> >   X86_FEATURE_TSC
> >   X86_FEATURE_CONSTANT_TSC
> >   X86_FEATURE_NOSTOP_TSC
> > 
> > NOSTOP_TSC is basically what CONSTANT_TSC should have been to begin 
> > with ;-)
> > 
> > i'd suggest to rename it to this:
> > 
> >   X86_FEATURE_TSC
> >   X86_FEATURE_CONSTANT_FREQ_TSC
> >   X86_FEATURE_STABLE_TSC
> > 
> > ... with CONSTANT_FREQ_TSC not having any real role in the long run. 
> > (it's similarly problematic to a completely unstable TSC)
> > 
> > does this sound ok?
> 
> 
> To me, the new naming has the same head-scratching potential
> as the old....
> 
> How about:
> 
> 	X86_FEATURE_TSC
> 	X86_FEATURE_STABLE_TSC_OBSOLETE
> 	X86_FEATURE_STABLE_TSC

the _honest_ naming would be:

 	X86_FEATURE_TSC
 	X86_FEATURE_STABLE_TSC_BUT_NOT_ALWAYS
 	X86_FEATURE_STABLE_TSC

;-) 

what's head-scratching about X86_FEATURE_CONSTANT_FREQ_TSC? It's a 
limited TSC variant: it follows a reference frequency that does not 
change with cpufreq changes, but it can stop at a whim in C states. So 
it's not "stable" nor really "constant" in the everyday sense.

What is 'constant' about it is its reference frequency - hence 
X86_FEATURE_CONSTANT_FREQ_TSC.

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