Received: by 2002:ad5:474a:0:0:0:0:0 with SMTP id i10csp92584imu; Thu, 15 Nov 2018 22:45:54 -0800 (PST) X-Google-Smtp-Source: AJdET5cR5I4np0YaCIb7ST7W7dFj4+ozO3dfgZDYFRXSLBENdsY5+3i1rx10C67s6j3djNcPPxJ2 X-Received: by 2002:a17:902:930b:: with SMTP id bc11mr5660921plb.17.1542350754628; Thu, 15 Nov 2018 22:45:54 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1542350754; cv=none; d=google.com; s=arc-20160816; b=ekk7lgG4Bf9PaQxPo3RHhJcrC84pU3+4xTi91XpSGwarDqUYzjySl1W8gszZ/o4jll i0ylBSZOYeO/3dx6NvWuXodepEEWZijsiqtbuyRRUMMnY19vJkuSJ9F0sdJG1WLsEYxB G9pTRjPDu5m8VXETxkrrNy8ypsvPVaiUIOyuIA+8ekxuVr3J7bDansL0KKZ2rxdwY/7H Wp2WFRp7YMIlDyUL16WXcFIR9Fp8+lGQh6g7ABEAcZM8HFZufeeBEbhUqgm3CP4cZC/m mPcHNZzdgK+gHDlQwVHG85a3NC972BZBR3hmaV7Qzb+mBrR1MW5WcmsWUqSTGC0DIReT x/Fw== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:sender:message-id:user-agent:in-reply-to :content-disposition:mime-version:references:reply-to:subject:cc:to :from:date; bh=YX/YSMZuL0FAf3t71XEn/LXMKjDUwKuMD+uNstX5aiU=; b=rJQ4nKvKfqyHGScfAOqVjpy+66Fv2hvPMawO0e1k20/aAYr8FSIZu6iY0pPgjV32aR geQJeBeAHIn3xG2zxywRmOFfLXtDOYmoyOS48U1HNJaFf9hMLDJNevbb/gmAAFopmI/P OnbH8GW2R91XhA+7ZNqAA5BWgmPNz/GaiT18vK+71ZOcNmNoLzoShw82QYrbuhVfErEC Yh1M0c0zNp94vTqFh2AK+xgLvWP06ZxwOLVBeNirTsmRrl+sFWCEgF5OWALuS8OM0CcB m8MnQM+6tsaGs2vwN7Z6Iz/bB5qqmhpIgQgfZVtTmmBg+SPTSQBrJotaja329V9Fj5lr tVLw== 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; dmarc=fail (p=NONE sp=NONE dis=NONE) header.from=ibm.com Return-Path: Received: from vger.kernel.org (vger.kernel.org. [209.132.180.67]) by mx.google.com with ESMTP id bg1-v6si29100648plb.165.2018.11.15.22.45.39; Thu, 15 Nov 2018 22:45:54 -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; dmarc=fail (p=NONE sp=NONE dis=NONE) header.from=ibm.com Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S2389214AbeKPQyX (ORCPT + 99 others); Fri, 16 Nov 2018 11:54:23 -0500 Received: from mx0b-001b2d01.pphosted.com ([148.163.158.5]:33614 "EHLO mx0a-001b2d01.pphosted.com" rhost-flags-OK-OK-OK-FAIL) by vger.kernel.org with ESMTP id S1727353AbeKPQyX (ORCPT ); Fri, 16 Nov 2018 11:54:23 -0500 Received: from pps.filterd (m0098413.ppops.net [127.0.0.1]) by mx0b-001b2d01.pphosted.com (8.16.0.22/8.16.0.22) with SMTP id wAG6dZl6014369 for ; Fri, 16 Nov 2018 01:43:17 -0500 Received: from e16.ny.us.ibm.com (e16.ny.us.ibm.com [129.33.205.206]) by mx0b-001b2d01.pphosted.com with ESMTP id 2nsqc03j3w-1 (version=TLSv1.2 cipher=AES256-GCM-SHA384 bits=256 verify=NOT) for ; Fri, 16 Nov 2018 01:43:17 -0500 Received: from localhost by e16.ny.us.ibm.com with IBM ESMTP SMTP Gateway: Authorized Use Only! Violators will be prosecuted for from ; Fri, 16 Nov 2018 06:43:17 -0000 Received: from b01cxnp23032.gho.pok.ibm.com (9.57.198.27) by e16.ny.us.ibm.com (146.89.104.203) with IBM ESMTP SMTP Gateway: Authorized Use Only! Violators will be prosecuted; (version=TLSv1/SSLv3 cipher=AES256-GCM-SHA384 bits=256/256) Fri, 16 Nov 2018 06:43:12 -0000 Received: from b01ledav003.gho.pok.ibm.com (b01ledav003.gho.pok.ibm.com [9.57.199.108]) by b01cxnp23032.gho.pok.ibm.com (8.14.9/8.14.9/NCO v10.0) with ESMTP id wAG6hB5P19136628 (version=TLSv1/SSLv3 cipher=DHE-RSA-AES256-GCM-SHA384 bits=256 verify=FAIL); Fri, 16 Nov 2018 06:43:11 GMT Received: from b01ledav003.gho.pok.ibm.com (unknown [127.0.0.1]) by IMSVA (Postfix) with ESMTP id 1EAC4B2065; Fri, 16 Nov 2018 06:43:11 +0000 (GMT) Received: from b01ledav003.gho.pok.ibm.com (unknown [127.0.0.1]) by IMSVA (Postfix) with ESMTP id ED131B2064; Fri, 16 Nov 2018 06:43:10 +0000 (GMT) Received: from paulmck-ThinkPad-W541 (unknown [9.85.196.200]) by b01ledav003.gho.pok.ibm.com (Postfix) with ESMTP; Fri, 16 Nov 2018 06:43:10 +0000 (GMT) Received: by paulmck-ThinkPad-W541 (Postfix, from userid 1000) id 750AA16C357C; Thu, 15 Nov 2018 22:43:10 -0800 (PST) Date: Thu, 15 Nov 2018 22:43:10 -0800 From: "Paul E. McKenney" To: Alan Stern Cc: LKMM Maintainers -- Akira Yokosawa , Andrea Parri , Boqun Feng , Daniel Lustig , David Howells , Jade Alglave , Luc Maranget , Nicholas Piggin , Peter Zijlstra , Will Deacon , Kernel development list Subject: Re: [PATCH 0/3] tools/memory-model: Add SRCU support Reply-To: paulmck@linux.ibm.com References: MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: User-Agent: Mutt/1.5.21 (2010-09-15) X-TM-AS-GCONF: 00 x-cbid: 18111606-0072-0000-0000-000003C9D8E4 X-IBM-SpamModules-Scores: X-IBM-SpamModules-Versions: BY=3.00010059; HX=3.00000242; KW=3.00000007; PH=3.00000004; SC=3.00000270; SDB=6.01118148; UDB=6.00577118; IPR=6.00898257; MB=3.00024188; MTD=3.00000008; XFM=3.00000015; UTC=2018-11-16 06:43:15 X-IBM-AV-DETECTION: SAVI=unused REMOTE=unused XFE=unused x-cbparentid: 18111606-0073-0000-0000-00004A1FF863 Message-Id: <20181116064310.GU4170@linux.ibm.com> X-Proofpoint-Virus-Version: vendor=fsecure engine=2.50.10434:,, definitions=2018-11-16_04:,, signatures=0 X-Proofpoint-Spam-Details: rule=outbound_notspam policy=outbound score=0 priorityscore=1501 malwarescore=0 suspectscore=0 phishscore=0 bulkscore=0 spamscore=0 clxscore=1015 lowpriorityscore=0 mlxscore=0 impostorscore=0 mlxlogscore=999 adultscore=0 classifier=spam adjust=0 reason=mlx scancount=1 engine=8.0.1-1810050000 definitions=main-1811160059 Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On Thu, Nov 15, 2018 at 11:19:24AM -0500, Alan Stern wrote: > Paul and other LKMM maintainers: > > The following series of patches adds support for SRCU to the Linux > Kernel Memory Model. That is, it adds the srcu_read_lock(), > srcu_read_unlock(), and synchronize_srcu() primitives to the model. > > Patch 1/3 does some renaming of the RCU parts of the > memory model's existing CAT code, to help distinguish them > from the upcoming SRCU parts. > > Patch 2/3 refactors the definitions of some RCU relations > in the CAT code, in a way that the SRCU portions will need. > > Patch 3/3 actually adds the SRCU support. > > This new code requires herd7 version 7.51+4(dev) or later (now > available in the herdtools7 github repository) to run. Thanks to Luc > for making the necessary changes to support SRCU. These patches pass the tests that I have constructed, and also regression tests, very nice! Applied and pushed, thank you. > The code does not check that the index argument passed to > srcu_read_unlock() is the same as the value returned by the > corresponding srcu_read_lock() call. This is deemed to be a semantic > issue, not directly relevant to the memory model. Agreed. If I understand correctly, there are in theory some use cases that these patches do not support, for example: r1 = srcu_read_lock(a); do_1(); r2 = srcu_read_lock(a); do_2(); srcu_read_unlock(a, r1); do_3(); srcu_read_unlock(a, r2); In practice, I would be more worried about this had I ever managed to find a non-bogus use case for this pattern. ;-) Thanx, Paul