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+55aFy9NsL6pGPs1gBQntpbCr0EUYFnWUUBj2-JGOLspryGvQ@mail.gmail.com>
Date:	Sat, 14 Apr 2012 09:28:29 -0700
From:	Linus Torvalds <torvalds@...ux-foundation.org>
To:	paulmck@...ux.vnet.ibm.com
Cc:	linux-kernel@...r.kernel.org, mingo@...e.hu, laijs@...fujitsu.com,
	dipankar@...ibm.com, akpm@...ux-foundation.org,
	mathieu.desnoyers@...icios.com, josh@...htriplett.org,
	niv@...ibm.com, tglx@...utronix.de, peterz@...radead.org,
	rostedt@...dmis.org, Valdis.Kletnieks@...edu, dhowells@...hat.com,
	eric.dumazet@...il.com, darren@...art.com, fweisbec@...il.com,
	patches@...aro.org
Subject: Re: [PATCH RFC 0/7] rcu: v2 Inlinable preemptible rcu_read_lock() and rcu_read_unlock()

On Sat, Apr 14, 2012 at 9:19 AM, Paul E. McKenney
<paulmck@...ux.vnet.ibm.com> wrote:
>
> It also compiles this:
>
>        void rcu_read_unlock_code(void)
>        {
>                rcu_read_unlock();
>        }
>
> to this:
>
>        000000e0 <rcu_read_unlock_code>:
>          e0:   64 a1 00 00 00 00       mov    %fs:0x0,%eax
>          e6:   83 f8 01                cmp    $0x1,%eax
>          e9:   74 0d                   je     f8 <rcu_read_unlock_code+0x18>
>          eb:   64 ff 0d 00 00 00 00    decl   %fs:0x0
>          f2:   c3                      ret
>          f3:   90                      nop
>          f4:   8d 74 26 00             lea    0x0(%esi,%eiz,1),%esi
>          f8:   64 c7 05 00 00 00 00    movl   $0x80000000,%fs:0x0
>          ff:   00 00 00 80
>         103:   64 a1 00 00 00 00       mov    %fs:0x0,%eax
>         109:   85 c0                   test   %eax,%eax
>         10b:   75 0c                   jne    119 <rcu_read_unlock_code+0x39>
>         10d:   64 c7 05 00 00 00 00    movl   $0x0,%fs:0x0
>         114:   00 00 00 00
>         118:   c3                      ret
>         119:   8d b4 26 00 00 00 00    lea    0x0(%esi,%eiz,1),%esi
>         120:   e8 fc ff ff ff          call   121 <rcu_read_unlock_code+0x41>
>         125:   eb e6                   jmp    10d <rcu_read_unlock_code+0x2d>
>
> It is therefore not at all clear to me that the final patch in this
> series is worthwhile.

Yeah, the read-unlock does not seem to be worth inlining as-is. As
mentioned earlier, it tends to be the rcu_read_lock() that we really
want to inline anyway (not just because it's small, but also because
the call clobbers registers, and that has other bad interaction).

                   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