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: <4D945C4D.5090104@redhat.com>
Date:	Thu, 31 Mar 2011 12:49:49 +0200
From:	Avi Kivity <avi@...hat.com>
To:	Ingo Molnar <mingo@...e.hu>
CC:	Robin Holt <holt@....com>, Thomas Gleixner <tglx@...utronix.de>,
	Yinghai Lu <yinghai@...nel.org>,
	Andi Kleen <andi@...stfloor.org>, linux-kernel@...r.kernel.org,
	Ingo Molnar <mingo@...hat.com>,
	Alan Cox <alan@...rguk.ukuu.org.uk>
Subject: Re: [RFC 2/2] Make x86 calibrate_delay run in parallel.

On 03/31/2011 12:46 PM, Ingo Molnar wrote:
> * Avi Kivity<avi@...hat.com>  wrote:
>
> >  On 03/31/2011 11:57 AM, Ingo Molnar wrote:
> >  >>
> >  >>   I am not trying to be argumentative.  I never got an understanding of
> >  >>   what was going wrong with that earlier patch and am hoping for some
> >  >>   understanding now.
> >  >
> >  >  Well, if calibrate_delay() calls run in parallel then different
> >  >  hyperthreads will impact each other.
> >
> >  It's different but not more wrong.  If delay() later runs on a thread whose
> >  sibling is busy, it will in fact give more accurate results.
>
> No, it's actively wrong: because it makes the delay loop *run faster* when
> other siblings
>
> I.e. this shortens udelay(X)s potentially, which is far more dangerous than the
> current conservative approach of potentially *lengthening* them.
>
> >  >  Really, there's no good reason why every CPU should be calibrated on a
> >  >  system running identical CPUs, right? Mixed-frequency systems are rather
> >  >  elusive on x86.
> >
> >  Good point.  And udelay() users are probably not sensitive to accuracy anyway
> >  (which changes with load and thermal conditions).
>
> True with one important distinction: they are only sensitive to one fact, that
> the delay should not be *shorter* than specified. By shortening udelay() we
> essentially overclock the hardware's tolerances - not good.
>

Makes sense.  But I think the thermally controlled cpu frequency 
violates this in some way - if calibration is run while the cpu is how 
and udelay is later run when it is cool then it could execute faster.

How important is udelay() for hardware timing these days, btw?

-- 
error compiling committee.c: too many arguments to function

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