Return-Path: Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1758610AbcDHP6P (ORCPT ); Fri, 8 Apr 2016 11:58:15 -0400 Received: from mail-ob0-f175.google.com ([209.85.214.175]:33119 "EHLO mail-ob0-f175.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1754035AbcDHP6N (ORCPT ); Fri, 8 Apr 2016 11:58:13 -0400 MIME-Version: 1.0 In-Reply-To: <20160408110232.GP3448@twins.programming.kicks-ass.net> References: <20151027235635.16059.11630.stgit@pjt-glaptop.roam.corp.google.com> <20160407120254.GY3448@twins.programming.kicks-ass.net> <20160407152432.GZ3448@twins.programming.kicks-ass.net> <20160407155312.GA3448@twins.programming.kicks-ass.net> <20160407201156.GC3448@twins.programming.kicks-ass.net> <20160408110232.GP3448@twins.programming.kicks-ass.net> From: Andy Lutomirski Date: Fri, 8 Apr 2016 08:57:53 -0700 Message-ID: Subject: Re: [RFC PATCH 0/3] restartable sequences v2: fast user-space percpu critical sections To: Peter Zijlstra Cc: Mathieu Desnoyers , "Paul E. McKenney" , Ingo Molnar , Paul Turner , Chris Lameter , Andi Kleen , Josh Triplett , Dave Watson , Linux API , "linux-kernel@vger.kernel.org" , Andrew Hunter , Linus Torvalds Content-Type: text/plain; charset=UTF-8 Sender: linux-kernel-owner@vger.kernel.org List-ID: X-Mailing-List: linux-kernel@vger.kernel.org Content-Length: 725 Lines: 19 On Apr 8, 2016 4:04 AM, "Peter Zijlstra" wrote: > > On Thu, Apr 07, 2016 at 03:05:26PM -0700, Andy Lutomirski wrote: > > > It doesn't, which is what I like about my variant. If the thread > > accesses the protected data structure, though, it should bump the > > sequence count, which will cause the first thread to about when it > > gets scheduled in. > > Nope it won't, because that first thread is right at the commit > instruction, nothing will stop it from executing that store and clobbing > what we just wrote. > I don't think so. I write an event number. You commit because you didn't notice. I haven't loaded yet from the value you wrote when you committed, so nothing goes wrong. --Andy