Re: [PATCH] x86/tsc: use real seqcount_latch in cyc2ns_read_begin()

2018-10-11 Thread kbuild test robot
Hi Eric, I love your patch! Perhaps something to improve: [auto build test WARNING on tip/x86/core] [also build test WARNING on v4.19-rc7 next-20181011] [if your patch is applied to the wrong git tree, please drop us a note to help improve the system] url:

Re: [PATCH] x86/tsc: use real seqcount_latch in cyc2ns_read_begin()

2018-10-11 Thread kbuild test robot
Hi Eric, I love your patch! Perhaps something to improve: [auto build test WARNING on tip/x86/core] [also build test WARNING on v4.19-rc7 next-20181011] [if your patch is applied to the wrong git tree, please drop us a note to help improve the system] url:

Re: [PATCH] x86/tsc: use real seqcount_latch in cyc2ns_read_begin()

2018-10-11 Thread Peter Zijlstra
On Thu, Oct 11, 2018 at 08:00:42AM -0700, Eric Dumazet wrote: > Yes, but the code size is bigger (I have looked at the disassembly) > > All these %gs plus offset add up > Total length : 0xA7 bytes effective length: 0x78 bytes > 02a0 : > 2a0: 4c 8d 54 24 08lea

Re: [PATCH] x86/tsc: use real seqcount_latch in cyc2ns_read_begin()

2018-10-11 Thread Peter Zijlstra
On Thu, Oct 11, 2018 at 08:00:42AM -0700, Eric Dumazet wrote: > Yes, but the code size is bigger (I have looked at the disassembly) > > All these %gs plus offset add up > Total length : 0xA7 bytes effective length: 0x78 bytes > 02a0 : > 2a0: 4c 8d 54 24 08lea

Re: [PATCH] x86/tsc: use real seqcount_latch in cyc2ns_read_begin()

2018-10-11 Thread Eric Dumazet
On Thu, Oct 11, 2018 at 12:31 AM Peter Zijlstra wrote: > > On Wed, Oct 10, 2018 at 05:33:36PM -0700, Eric Dumazet wrote: > > While looking at native_sched_clock() disassembly I had > > the surprise to see the compiler (gcc 7.3 here) had > > optimized out the loop, meaning the code is broken. > >

Re: [PATCH] x86/tsc: use real seqcount_latch in cyc2ns_read_begin()

2018-10-11 Thread Eric Dumazet
On Thu, Oct 11, 2018 at 12:31 AM Peter Zijlstra wrote: > > On Wed, Oct 10, 2018 at 05:33:36PM -0700, Eric Dumazet wrote: > > While looking at native_sched_clock() disassembly I had > > the surprise to see the compiler (gcc 7.3 here) had > > optimized out the loop, meaning the code is broken. > >

Re: [PATCH] x86/tsc: use real seqcount_latch in cyc2ns_read_begin()

2018-10-11 Thread Peter Zijlstra
On Thu, Oct 11, 2018 at 09:31:33AM +0200, Peter Zijlstra wrote: > On Wed, Oct 10, 2018 at 05:33:36PM -0700, Eric Dumazet wrote: > > While looking at native_sched_clock() disassembly I had > > the surprise to see the compiler (gcc 7.3 here) had > > optimized out the loop, meaning the code is

Re: [PATCH] x86/tsc: use real seqcount_latch in cyc2ns_read_begin()

2018-10-11 Thread Peter Zijlstra
On Thu, Oct 11, 2018 at 09:31:33AM +0200, Peter Zijlstra wrote: > On Wed, Oct 10, 2018 at 05:33:36PM -0700, Eric Dumazet wrote: > > While looking at native_sched_clock() disassembly I had > > the surprise to see the compiler (gcc 7.3 here) had > > optimized out the loop, meaning the code is

Re: [PATCH] x86/tsc: use real seqcount_latch in cyc2ns_read_begin()

2018-10-11 Thread Peter Zijlstra
On Wed, Oct 10, 2018 at 05:33:36PM -0700, Eric Dumazet wrote: > While looking at native_sched_clock() disassembly I had > the surprise to see the compiler (gcc 7.3 here) had > optimized out the loop, meaning the code is broken. > > Using the documented and approved API not only fixes the bug, >

Re: [PATCH] x86/tsc: use real seqcount_latch in cyc2ns_read_begin()

2018-10-11 Thread Peter Zijlstra
On Wed, Oct 10, 2018 at 05:33:36PM -0700, Eric Dumazet wrote: > While looking at native_sched_clock() disassembly I had > the surprise to see the compiler (gcc 7.3 here) had > optimized out the loop, meaning the code is broken. > > Using the documented and approved API not only fixes the bug, >

[PATCH] x86/tsc: use real seqcount_latch in cyc2ns_read_begin()

2018-10-10 Thread Eric Dumazet
While looking at native_sched_clock() disassembly I had the surprise to see the compiler (gcc 7.3 here) had optimized out the loop, meaning the code is broken. Using the documented and approved API not only fixes the bug, it also makes the code more readable. Replacing five this_cpu_read() by

[PATCH] x86/tsc: use real seqcount_latch in cyc2ns_read_begin()

2018-10-10 Thread Eric Dumazet
While looking at native_sched_clock() disassembly I had the surprise to see the compiler (gcc 7.3 here) had optimized out the loop, meaning the code is broken. Using the documented and approved API not only fixes the bug, it also makes the code more readable. Replacing five this_cpu_read() by