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:	Thu, 15 Nov 2007 23:26:35 -0800
From:	Andrew Morton <akpm@...ux-foundation.org>
To:	Ingo Molnar <mingo@...e.hu>
Cc:	Arjan van de Ven <arjan@...radead.org>,
	Linux Kernel Mailing List <linux-kernel@...r.kernel.org>
Subject: Re: x86: disable preemption in delay_tsc()

On Fri, 16 Nov 2007 08:17:08 +0100 Ingo Molnar <mingo@...e.hu> wrote:

> 
> * Andrew Morton <akpm@...ux-foundation.org> wrote:
> 
> > It sounds like it would work OK.  What is the setup cost for a usleep?  
> > I'd have thought that code which does something like
> > 
> > 	while (i++ < 1000) {
> > 		foo();
> > 		udelay(1);
> > 	}
> > 
> > would take qiute a bit longer with such a change?
> 
> full roundtrip cost ought to be below 10 usecs, depending on the system. 

Ow.  So the above timeout would take 10x longer.  That probably won't break
anything, but quite a few drivers do udelay(1) for post-IO settling times
and they might not like it.

> There's no problem doing a non-preemptible udelay up to 10 usecs and we
> could use usleep above that.

Yup, with a few smarts in there we could work out which is the best to use,
and also compensate for the setup costs.

It doesn't sound very 2.6.24ish though.

As a quicky things perhaps we could only do the preempt_disable()/preempt_enable()
if the TSCs are unsynced?  Do we reliably know that?  I guess not..
-
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