Received: by 10.223.185.116 with SMTP id b49csp556705wrg; Fri, 16 Feb 2018 03:31:36 -0800 (PST) X-Google-Smtp-Source: AH8x225t9blqdkWyEEguVJtISUMs72VLQf2+p1QofNjpB6dAXj9846nY7nnPpLGPArVSDKi+Fmpc X-Received: by 2002:a17:902:b215:: with SMTP id t21-v6mr4440942plr.414.1518780696654; Fri, 16 Feb 2018 03:31:36 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1518780696; cv=none; d=google.com; s=arc-20160816; b=DG4Ix/f1vzb4NBqJsemj4+/KXWEwlqF7/PmNUnWCcmHD2hfW0e5pO1oFWbVJNzGdQE M3GiFxtPfY/IFM673NF/sS5862Ev70dvZDDnTt3dVzDWLYMneVCdoHd4YpdQ22L+hrf+ l9knZcYHP+2rAljraB5FPwJab2kNm0ZgY1HK8GvlLy13501nfI0BTBLgqPxl1A9yeIAr 2Fpl8P3+TSFYGi6hEE0Cn3aKmSU/8Jd0ST5uWXKSTvjTk3uDJ6DWAG8my3S57SPvU8by 9Vjh/HXQZad/hZn1H8wiyJTVFLReOTZszRakayPpXCqRFMmjsYwrzVvrXNN6NqH589GZ TTzw== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:sender:mime-version:message-id:in-reply-to :subject:cc:to:from:date:arc-authentication-results; bh=bI+/kDReDnofjMLRvZS4rLjOn034N45cfdYqJe46XgU=; b=1J9SvJJ7UjAwSohjL1XBnXKEAceIotdaKcxO73i4G9PhkhmyL4x/wPYzrWr3V1O45u OXh9PBRz9c4M7IKhjXvOfrpjOEge0UWui3zPxff5ILzDQ8IL89CgWhAPZkbopDTdjCkj zEoaU0DtNerh5RRoXVP+vflc6PCb4Hu/olGXl/e/s5R+v/Pj488V2M8SLX0J9gwBFIiU pbnvzQhCi1YcM4JxvchHX8zmqhg4I4b+ecnLN8nagwiV3AkDXJxOu2U6HJHVXrtQ9fdo yPUEwuE7hawllCWXHe8Y0Qt10T4DdfklOHe7166pbRczNjClGJZBfBjkbZMRBkczpfa9 8OKQ== ARC-Authentication-Results: i=1; mx.google.com; spf=pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org Return-Path: Received: from vger.kernel.org (vger.kernel.org. [209.132.180.67]) by mx.google.com with ESMTP id k128si1320343pgc.609.2018.02.16.03.31.21; Fri, 16 Feb 2018 03:31:36 -0800 (PST) Received-SPF: pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) client-ip=209.132.180.67; Authentication-Results: mx.google.com; spf=pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1165775AbeBORwA (ORCPT + 99 others); Thu, 15 Feb 2018 12:52:00 -0500 Received: from iolanthe.rowland.org ([192.131.102.54]:51774 "HELO iolanthe.rowland.org" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with SMTP id S1164231AbeBORv5 (ORCPT ); Thu, 15 Feb 2018 12:51:57 -0500 Received: (qmail 4281 invoked by uid 2102); 15 Feb 2018 12:51:56 -0500 Received: from localhost (sendmail-bs@127.0.0.1) by localhost with SMTP; 15 Feb 2018 12:51:56 -0500 Date: Thu, 15 Feb 2018 12:51:56 -0500 (EST) From: Alan Stern X-X-Sender: stern@iolanthe.rowland.org To: Akira Yokosawa cc: "Paul E. McKenney" , , , , , , , , , , , Patrick Bellasi Subject: Re: Trial of conflict resolution of Alan's patch In-Reply-To: Message-ID: MIME-Version: 1.0 Content-Type: TEXT/PLAIN; charset=US-ASCII Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On Fri, 16 Feb 2018, Akira Yokosawa wrote: > So, I attempted to rebase the patch to current (somewhat old) master of > https://github.com/aparri/memory-model. Why? Because the lkmm branch > in Paul's -rcu tree doesn't have linux-kernel-hardware.cat. > > However, after this change, Z6.0+pooncelock+pooncelock+pombonce still > has the result "Sometimes". I must have done something wrong in the > conflict resolution. > > Note: I have almost no idea what this patch is doing. I'm just hoping > to give a starting point of a discussion. Yes, that litmus test gives "Sometimes" both with and without the patch. But consider instead this slightly changed version of that test, in which P2 reads Z instead of writing it: C Z6.0-variant {} P0(int *x, int *y, spinlock_t *mylock) { spin_lock(mylock); WRITE_ONCE(*x, 1); WRITE_ONCE(*y, 1); spin_unlock(mylock); } P1(int *y, int *z, spinlock_t *mylock) { int r0; spin_lock(mylock); r0 = READ_ONCE(*y); WRITE_ONCE(*z, 1); spin_unlock(mylock); } P2(int *x, int *z) { int r1; int r2; r2 = READ_ONCE(*z); smp_mb(); r1 = READ_ONCE(*x); } exists (1:r0=1 /\ 2:r2=1 /\ 2:r1=0) Without the patch, this test gives "Sometimes"; with the patch it gives "Never". That is what I thought Paul was talking about originally. Sorry if my misunderstanding caused too much confusion for other people. Alan