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: <CA+55aFxE0fpdrjhG82JcwgT4jrmDXJ_dPv5FkqiVHYe3DdjtWA@mail.gmail.com>
Date:	Tue, 3 Sep 2013 14:34:38 -0700
From:	Linus Torvalds <torvalds@...ux-foundation.org>
To:	Ingo Molnar <mingo@...nel.org>
Cc:	Al Viro <viro@...iv.linux.org.uk>,
	Sedat Dilek <sedat.dilek@...il.com>,
	Waiman Long <waiman.long@...com>,
	Benjamin Herrenschmidt <benh@...nel.crashing.org>,
	Jeff Layton <jlayton@...hat.com>,
	Miklos Szeredi <mszeredi@...e.cz>,
	Ingo Molnar <mingo@...hat.com>,
	Thomas Gleixner <tglx@...utronix.de>,
	linux-fsdevel <linux-fsdevel@...r.kernel.org>,
	Linux Kernel Mailing List <linux-kernel@...r.kernel.org>,
	Peter Zijlstra <peterz@...radead.org>,
	Steven Rostedt <rostedt@...dmis.org>,
	Andi Kleen <andi@...stfloor.org>,
	"Chandramouleeswaran, Aswin" <aswin@...com>,
	"Norton, Scott J" <scott.norton@...com>,
	Peter Zijlstra <a.p.zijlstra@...llo.nl>,
	Arnaldo Carvalho de Melo <acme@...radead.org>
Subject: Re: [PATCH v7 1/4] spinlock: A new lockref structure for lockless
 update of refcount

On Tue, Sep 3, 2013 at 2:13 PM, Linus Torvalds
<torvalds@...ux-foundation.org> wrote:
>
> This is the one that actually compiles.  Whether it *works* is still a
> total mystery.

It generates ok code, and it booted, so it seems to work at least for my config.

However, it seems to make no performance-difference what-so-ever, and
lg_local_lock is still using about 7% cpu per the profiles.

The code generation is slightly better, but the profile looks the same:

       │    ffffffff81078e70 <lg_local_lock>:
  0.62 │      push   %rbp
  0.28 │      mov    %rsp,%rbp
  0.22 │      add    %gs:0xcd48,%rdi
  0.27 │      mov    $0x100,%eax
 97.22 │      lock   xadd   %ax,(%rdi)
  0.01 │      movzbl %ah,%edx
       │      cmp    %al,%dl
  0.56 │    ↓ je     29
       │      xchg   %ax,%ax
  0.00 │20:   pause
  0.00 │      movzbl (%rdi),%eax
       │      cmp    %dl,%al
       │    ↑ jne    20
       │29:   pop    %rbp
  0.81 │    ← retq

but it still obviously doesn't do the "lock xadd %ax,%gs:(%rdi)"
(without the preceding 'add') that would be the optimal code.

I'll try to hack that up too, but it's looking like it really is just
the "lock xadd", not the memory dependency chain..

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