Re: [PATCH v7 1/4] spinlock: A new lockref structure for lockless update of refcount

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



On Tue, Sep 3, 2013 at 2:13 PM, Linus Torvalds
<torvalds@xxxxxxxxxxxxxxxxxxxx> 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-fsdevel" in
the body of a message to majordomo@xxxxxxxxxxxxxxx
More majordomo info at  http://vger.kernel.org/majordomo-info.html




[Index of Archives]     [Linux Ext4 Filesystem]     [Union Filesystem]     [Filesystem Testing]     [Ceph Users]     [Ecryptfs]     [AutoFS]     [Kernel Newbies]     [Share Photos]     [Security]     [Netfilter]     [Bugtraq]     [Yosemite News]     [MIPS Linux]     [ARM Linux]     [Linux Security]     [Linux Cachefs]     [Reiser Filesystem]     [Linux RAID]     [Samba]     [Device Mapper]     [CEPH Development]
  Powered by Linux