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 for Android: free password hash cracker in your pocket
[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Date:	Wed, 27 Jun 2007 15:23:20 +1000
From:	Nick Piggin <nickpiggin@...oo.com.au>
To:	Linus Torvalds <torvalds@...ux-foundation.org>
CC:	Eric Dumazet <dada1@...mosbay.com>,
	Chuck Ebbert <cebbert@...hat.com>, Ingo Molnar <mingo@...e.hu>,
	Jarek Poplawski <jarkao2@...pl>,
	Miklos Szeredi <miklos@...redi.hu>, chris@...ee.ca,
	linux-kernel@...r.kernel.org, tglx@...utronix.de,
	akpm@...ux-foundation.org
Subject: Re: [BUG] long freezes on thinkpad t60

Linus Torvalds wrote:
> 
> On Tue, 26 Jun 2007, Nick Piggin wrote:
> 
>>Hmm, not that I have a strong opinion one way or the other, but I
>>don't know that they would encourage bad code. They are not going to
>>reduce latency under a locked section, but will improve determinism
>>in the contended case.
> 
> 
> xadd really generally *is* slower than an add. One is often microcoded, 
> the other is not.

Oh. I found xadd to be not hugely slower on my P4, but it was a little
bit.


> But the real problem is that your "unlock" sequence is now about two 
> orders of magnitude slower than it used to be. So it used to be that a 
> spinlocked sequence only had a single synchronization point, now it has 
> two. *That* is really bad, and I guarantee that it makes your spinlocks 
> effectively twice as slow for the non-contended parts.

I don't know why my unlock sequence should be that much slower? Unlocked
mov vs unlocked add? Definitely in dumb micro-benchmark testing it wasn't
twice as slow (IIRC).


> But your xadd thing might be worth looking at, just to see how expensive 
> it is. As an _alternative_ to spinlocks, it's certainly viable.
> 
> (Side note: why make it a word? Word operations are slower on many x86 
> implementations, because they add yet another prefix. You only need a 
> byte)

No real reason I guess. I'll change it.

-- 
SUSE Labs, Novell Inc.
-
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