Re: [tip:locking/urgent] compiler, atomics: Provide READ_ONCE_NOCHECK ()

2015-10-14 Thread Andy Lutomirski
On Wed, Oct 14, 2015 at 10:48 AM, Ingo Molnar wrote: > > * Peter Zijlstra wrote: > >> > I'd still rather find a way to just delete get_wchan, but whatever. >> >> :-) > > AFAICS can only do that at the price of slowing down various scheduler > functions > by saving the caller address. > A quick

Re: [tip:locking/urgent] compiler, atomics: Provide READ_ONCE_NOCHECK ()

2015-10-14 Thread Ingo Molnar
* Peter Zijlstra wrote: > > I'd still rather find a way to just delete get_wchan, but whatever. > > :-) AFAICS can only do that at the price of slowing down various scheduler functions by saving the caller address. Thanks, Ingo -- To unsubscribe from this list: send the line "unsub

Re: [tip:locking/urgent] compiler, atomics: Provide READ_ONCE_NOCHECK ()

2015-10-14 Thread Paul E. McKenney
On Wed, Oct 14, 2015 at 07:23:02PM +0200, Dmitry Vyukov wrote: > On Wed, Oct 14, 2015 at 7:04 PM, Paul E. McKenney > wrote: > >> >> >> > On Wed, Oct 14, 2015 at 08:28:43AM -0700, tip-bot for Andrey > >> >> >> > Ryabinin wrote: > >> >> >> >> Commit-ID: 4115ffdf4d6f8986a7abe1dd522c163f599bc0e6 > >

Re: [tip:locking/urgent] compiler, atomics: Provide READ_ONCE_NOCHECK ()

2015-10-14 Thread Dmitry Vyukov
On Wed, Oct 14, 2015 at 7:04 PM, Paul E. McKenney wrote: >> >> >> > On Wed, Oct 14, 2015 at 08:28:43AM -0700, tip-bot for Andrey >> >> >> > Ryabinin wrote: >> >> >> >> Commit-ID: 4115ffdf4d6f8986a7abe1dd522c163f599bc0e6 >> >> >> >> Gitweb: >> >> >> >> http://git.kernel.org/tip/4115ffdf4d6f8

Re: [tip:locking/urgent] compiler, atomics: Provide READ_ONCE_NOCHECK ()

2015-10-14 Thread Paul E. McKenney
On Wed, Oct 14, 2015 at 06:29:59PM +0200, Dmitry Vyukov wrote: > On Wed, Oct 14, 2015 at 6:19 PM, Andrey Ryabinin > wrote: > > > > > > On 10/14/2015 06:50 PM, Dmitry Vyukov wrote: > >> On Wed, Oct 14, 2015 at 5:45 PM, Paul E. McKenney > >> wrote: > >>> On Wed, Oct 14, 2015 at 08:28:43AM -0700, ti

Re: [tip:locking/urgent] compiler, atomics: Provide READ_ONCE_NOCHECK ()

2015-10-14 Thread Paul E. McKenney
On Wed, Oct 14, 2015 at 06:32:58PM +0200, Dmitry Vyukov wrote: > On Wed, Oct 14, 2015 at 6:20 PM, Paul E. McKenney > wrote: > > On Wed, Oct 14, 2015 at 06:08:16PM +0200, Dmitry Vyukov wrote: > >> On Wed, Oct 14, 2015 at 6:01 PM, Paul E. McKenney > >> wrote: > >> > On Wed, Oct 14, 2015 at 05:50:34

Re: [tip:locking/urgent] compiler, atomics: Provide READ_ONCE_NOCHECK ()

2015-10-14 Thread Peter Zijlstra
On Wed, Oct 14, 2015 at 06:34:16PM +0200, Dmitry Vyukov wrote: > On Wed, Oct 14, 2015 at 6:20 PM, Peter Zijlstra wrote: > > On Wed, Oct 14, 2015 at 06:18:58PM +0200, Dmitry Vyukov wrote: > >> > >> Well, if another thread writes it byte-by-byte, it pretty much does > >> not matter how you read it.

Re: [tip:locking/urgent] compiler, atomics: Provide READ_ONCE_NOCHECK ()

2015-10-14 Thread Dmitry Vyukov
On Wed, Oct 14, 2015 at 6:20 PM, Peter Zijlstra wrote: > On Wed, Oct 14, 2015 at 06:18:58PM +0200, Dmitry Vyukov wrote: >> >> Well, if another thread writes it byte-by-byte, it pretty much does >> not matter how you read it. >> Note that I said "at least one access is not atomic". If both are >> a

Re: [tip:locking/urgent] compiler, atomics: Provide READ_ONCE_NOCHECK ()

2015-10-14 Thread Peter Zijlstra
On Wed, Oct 14, 2015 at 09:23:33AM -0700, Andy Lutomirski wrote: > On Wed, Oct 14, 2015 at 9:20 AM, Peter Zijlstra wrote: > > On Wed, Oct 14, 2015 at 06:18:58PM +0200, Dmitry Vyukov wrote: > >> > >> Well, if another thread writes it byte-by-byte, it pretty much does > >> not matter how you read it

Re: [tip:locking/urgent] compiler, atomics: Provide READ_ONCE_NOCHECK ()

2015-10-14 Thread Dmitry Vyukov
On Wed, Oct 14, 2015 at 6:20 PM, Paul E. McKenney wrote: > On Wed, Oct 14, 2015 at 06:08:16PM +0200, Dmitry Vyukov wrote: >> On Wed, Oct 14, 2015 at 6:01 PM, Paul E. McKenney >> wrote: >> > On Wed, Oct 14, 2015 at 05:50:34PM +0200, Dmitry Vyukov wrote: >> >> On Wed, Oct 14, 2015 at 5:45 PM, Paul

Re: [tip:locking/urgent] compiler, atomics: Provide READ_ONCE_NOCHECK ()

2015-10-14 Thread Dmitry Vyukov
On Wed, Oct 14, 2015 at 6:19 PM, Andrey Ryabinin wrote: > > > On 10/14/2015 06:50 PM, Dmitry Vyukov wrote: >> On Wed, Oct 14, 2015 at 5:45 PM, Paul E. McKenney >> wrote: >>> On Wed, Oct 14, 2015 at 08:28:43AM -0700, tip-bot for Andrey Ryabinin wrote: Commit-ID: 4115ffdf4d6f8986a7abe1dd522c1

Re: [tip:locking/urgent] compiler, atomics: Provide READ_ONCE_NOCHECK ()

2015-10-14 Thread Andy Lutomirski
On Wed, Oct 14, 2015 at 9:20 AM, Peter Zijlstra wrote: > On Wed, Oct 14, 2015 at 06:18:58PM +0200, Dmitry Vyukov wrote: >> >> Well, if another thread writes it byte-by-byte, it pretty much does >> not matter how you read it. >> Note that I said "at least one access is not atomic". If both are >> a

Re: [tip:locking/urgent] compiler, atomics: Provide READ_ONCE_NOCHECK ()

2015-10-14 Thread Peter Zijlstra
On Wed, Oct 14, 2015 at 06:18:58PM +0200, Dmitry Vyukov wrote: > > Well, if another thread writes it byte-by-byte, it pretty much does > not matter how you read it. > Note that I said "at least one access is not atomic". If both are > atomic, then this is, of course, legal. And KTSAN considers > R

Re: [tip:locking/urgent] compiler, atomics: Provide READ_ONCE_NOCHECK ()

2015-10-14 Thread Dmitry Vyukov
On Wed, Oct 14, 2015 at 6:16 PM, Peter Zijlstra wrote: > On Wed, Oct 14, 2015 at 06:08:16PM +0200, Dmitry Vyukov wrote: >> >> > So I add READ_ONCE_NOCHECK() for accesses for which the compiler cannot >> >> > prove safe address for KASAN's benefit, but READ_ONCE() suffices for >> >> > the data-race

Re: [tip:locking/urgent] compiler, atomics: Provide READ_ONCE_NOCHECK ()

2015-10-14 Thread Paul E. McKenney
On Wed, Oct 14, 2015 at 06:08:16PM +0200, Dmitry Vyukov wrote: > On Wed, Oct 14, 2015 at 6:01 PM, Paul E. McKenney > wrote: > > On Wed, Oct 14, 2015 at 05:50:34PM +0200, Dmitry Vyukov wrote: > >> On Wed, Oct 14, 2015 at 5:45 PM, Paul E. McKenney > >> wrote: > >> > On Wed, Oct 14, 2015 at 08:28:43

Re: [tip:locking/urgent] compiler, atomics: Provide READ_ONCE_NOCHECK ()

2015-10-14 Thread Andrey Ryabinin
On 10/14/2015 06:50 PM, Dmitry Vyukov wrote: > On Wed, Oct 14, 2015 at 5:45 PM, Paul E. McKenney > wrote: >> On Wed, Oct 14, 2015 at 08:28:43AM -0700, tip-bot for Andrey Ryabinin wrote: >>> Commit-ID: 4115ffdf4d6f8986a7abe1dd522c163f599bc0e6 >>> Gitweb: >>> http://git.kernel.org/tip/4115ff

Re: [tip:locking/urgent] compiler, atomics: Provide READ_ONCE_NOCHECK ()

2015-10-14 Thread Peter Zijlstra
On Wed, Oct 14, 2015 at 06:08:16PM +0200, Dmitry Vyukov wrote: > >> > So I add READ_ONCE_NOCHECK() for accesses for which the compiler cannot > >> > prove safe address for KASAN's benefit, but READ_ONCE() suffices for > >> > the data-race-detection logic in KTSAN, correct? > >> > >> KTSAN also need

Re: [tip:locking/urgent] compiler, atomics: Provide READ_ONCE_NOCHECK ()

2015-10-14 Thread Dmitry Vyukov
On Wed, Oct 14, 2015 at 6:01 PM, Paul E. McKenney wrote: > On Wed, Oct 14, 2015 at 05:50:34PM +0200, Dmitry Vyukov wrote: >> On Wed, Oct 14, 2015 at 5:45 PM, Paul E. McKenney >> wrote: >> > On Wed, Oct 14, 2015 at 08:28:43AM -0700, tip-bot for Andrey Ryabinin >> > wrote: >> >> Commit-ID: 4115ff

Re: [tip:locking/urgent] compiler, atomics: Provide READ_ONCE_NOCHECK ()

2015-10-14 Thread Paul E. McKenney
On Wed, Oct 14, 2015 at 05:50:34PM +0200, Dmitry Vyukov wrote: > On Wed, Oct 14, 2015 at 5:45 PM, Paul E. McKenney > wrote: > > On Wed, Oct 14, 2015 at 08:28:43AM -0700, tip-bot for Andrey Ryabinin wrote: > >> Commit-ID: 4115ffdf4d6f8986a7abe1dd522c163f599bc0e6 > >> Gitweb: > >> http://git.k

Re: [tip:locking/urgent] compiler, atomics: Provide READ_ONCE_NOCHECK ()

2015-10-14 Thread Dmitry Vyukov
On Wed, Oct 14, 2015 at 5:45 PM, Paul E. McKenney wrote: > On Wed, Oct 14, 2015 at 08:28:43AM -0700, tip-bot for Andrey Ryabinin wrote: >> Commit-ID: 4115ffdf4d6f8986a7abe1dd522c163f599bc0e6 >> Gitweb: >> http://git.kernel.org/tip/4115ffdf4d6f8986a7abe1dd522c163f599bc0e6 >> Author: Andre

Re: [tip:locking/urgent] compiler, atomics: Provide READ_ONCE_NOCHECK ()

2015-10-14 Thread Paul E. McKenney
On Wed, Oct 14, 2015 at 08:28:43AM -0700, tip-bot for Andrey Ryabinin wrote: > Commit-ID: 4115ffdf4d6f8986a7abe1dd522c163f599bc0e6 > Gitweb: http://git.kernel.org/tip/4115ffdf4d6f8986a7abe1dd522c163f599bc0e6 > Author: Andrey Ryabinin > AuthorDate: Tue, 13 Oct 2015 18:28:07 +0300 > Committ

[tip:locking/urgent] compiler, atomics: Provide READ_ONCE_NOCHECK ()

2015-10-14 Thread tip-bot for Andrey Ryabinin
Commit-ID: 4115ffdf4d6f8986a7abe1dd522c163f599bc0e6 Gitweb: http://git.kernel.org/tip/4115ffdf4d6f8986a7abe1dd522c163f599bc0e6 Author: Andrey Ryabinin AuthorDate: Tue, 13 Oct 2015 18:28:07 +0300 Committer: Ingo Molnar CommitDate: Wed, 14 Oct 2015 16:44:06 +0200 compiler, atomics: Provi